provrun.stagers
InProcessStager copies each snapshot into the input folder of the run,
with a copy-on-write clone where the disk has one, and keeps every file
read-only. A clone shares no inode with the snapshot, so nothing a run does to
its inputs reaches the snapshot that other runs use. The PydanticAI backend mounts that folder read-only at /input. The
Docker stager will bind-mount the same folder; a Foundry stager will upload
the files instead, so integrity rests on the digests, which verify_inputs
checks after the run.
class InputCheckError
A staged input changed during the run.
class Stager
Makes the snapshots of a run visible to its agent, and checks them after the run.
Stager.stage
Stager.stage(ctx: RunContext, inputs: list[tuple[str, Snapshot]]) -> RunSpecStage (name, snapshot) pairs for one run.
| Parameter | Type | Default | Description |
|---|---|---|---|
ctx |
RunContext | required | The run; its recorder takes the evidence |
inputs |
list[tuple[str, Snapshot]] | required | Each input’s name under /input, and its snapshot |
| returns | RunSpec | The staged inputs and the run’s folders, as the backend gets them |
Stager.verify_inputs
Stager.verify_inputs(ctx: RunContext, run: RunSpec) -> NoneHash each staged input again, and write input_verified for each.
Raises InputCheckError if one changed.
| Parameter | Type | Default | Description |
|---|---|---|---|
ctx |
RunContext | required | The run; its recorder takes one input_verified for each input |
run |
RunSpec | required | The run spec that stage returned |
class InProcessStager
Copies each snapshot, read-only, into the run folder’s input folder.
InProcessStager.stage
InProcessStager.stage(ctx: RunContext, inputs: list[tuple[str, Snapshot]]) -> RunSpecCopy each snapshot to
Then make the input folder read-only. Raises ValueError for a bad or repeated name, and InputCheckError if a copy differs from its snapshot.
| Parameter | Type | Default | Description |
|---|---|---|---|
ctx |
RunContext | required | The run; its folder holds the input folder, and its recorder takes input_staged |
inputs |
list[tuple[str, Snapshot]] | required | Each input’s name, one part of a path and not repeated, and its snapshot |
| returns | RunSpec | The staged inputs, seen by the agent at /input/ |