provrun.resolve
Resolution: from a granted URI to a read-only snapshot.
ProvcatResolver pins the URI through provcat, fetches that version and
copies it into a snapshot that no later fetch changes. It writes
context_resolved and snapshot_materialized.
class Snapshot
Snapshot(uri: str, pinned: str, path: Path, digest: str, kind: str)One granted input, copied where no later fetch changes it.
| Parameter | Type | Default | Description |
|---|---|---|---|
uri |
str | required | The URI as asked for |
pinned |
str | required | The physical URI at a fixed version, where the store has versions |
path |
Path | required | A read-only file or folder |
digest |
str | required | The SHA-256 of the file, or of the folder as provcat.cache.tree_digest defines it |
kind |
str | required | “file” or “folder” |
class Resolver
Turns a grant into a read-only snapshot of what it grants.
Resolver.snapshot
Resolver.snapshot(ctx: RunContext, grant: Grant) -> SnapshotMake the snapshot of one granted input, and write its evidence.
| Parameter | Type | Default | Description |
|---|---|---|---|
ctx |
RunContext | required | The run that asks; its recorder takes the evidence |
grant |
Grant | required | The broker’s grant for one input |
| returns | Snapshot | The snapshot of the granted URI |
class ProvcatResolver
ProvcatResolver(catalog: Catalog)Pins each granted URI through provcat and snapshots that version.
| Parameter | Type | Default | Description |
|---|---|---|---|
catalog |
Catalog | required | The catalog that resolves, pins and fetches each URI |
ProvcatResolver.snapshot
ProvcatResolver.snapshot(ctx: RunContext, grant: Grant) -> SnapshotResolve the granted URI, then snapshot it through the catalog at a pinned version.
| Parameter | Type | Default | Description |
|---|---|---|---|
ctx |
RunContext | required | The run that asks; its recorder takes context_resolved and snapshot_materialized |
grant |
Grant | required | The broker’s grant; a deny raises ValueError |
| returns | Snapshot | The pinned, read-only snapshot, with its SHA-256 and kind |