What the pack does
reproduce writes an ordinary scenario pack with three steps:
- A
NOTEcarrying the provenance: which incident, when it was first seen, and what was reconstructed. - An
INJECT_FAULTthat arms the same failure on the same method and path template, once, then recovers. A 5xx or 4xx becomes anerrorwith that status, answering with the recorded response body when the provider sent JSON. A 429 becomesrate_limit. An unreachable upstream becomes aconnection_reset, because reproducing it as a 502 would test the wrong branch of your error handling. - A
REQUESTthat replays the recorded request and asserts the recorded status.
--sandbox <name>.
The honest limit
Requests and responses are rebuilt from redacted recordings. Identifiers are format-preserving tokens and anything the sanitizer could not classify was dropped before it reached disk, so neither body is byte-identical. Error codes and spec-declared enum values survive redaction, so the armed response body still carries what your code switches on. Every generated pack says so in its note.- For a 5xx, a 429 or an unreachable upstream this changes nothing: the fault is armed on method and path, so the failure reproduces regardless.
- For a 4xx your own payload caused, the request body matters. If the pack does not reproduce the rejection, compare it against what your code actually sends.
Exit codes
reproduce exits 0 when it writes a pack and the failure recurs, and 2 when it refuses: the recording aged out of retention, or the pack ran and the failure did not recur, which means pikopod cannot stand behind it as a reproduction. It never fabricates a request to avoid refusing. There is no exit 1. See Exit codes.
From another machine
When the agent runs on a host that is not your laptop, export the incident and reproduce from the file:import installs the incident locally: the event, a rule that answers as the provider did, and the resource the recording touched, so reproduce <fingerprint> lands on the seeded resource and the sandbox keeps the failure after the pack has run. See Incident bundles.
Shape changes
For a shape change rather than a failure,from-drift pins the old contract instead. See Generated packs.