Skip to main content
The agent’s data_dir lives on the host that runs it. A developer’s laptop does not have it. A bundle carries one incident across that gap: the event, the already-redacted recording, and the contract version. Nothing else.

Export

Every incident row printed by pikopod agent incidents carries the exact line to run. For everything in a window, as a JSON array:
The bundle carries no salt, no token and no configuration. The recording inside it is the redacted one, so it is as safe to attach to an issue as anything pikopod agent inspect prints.

Reproduce and fix from it

Both read nothing from the local data_dir, and the file keeps working after the origin host’s retention has aged the incident out. The bundle records the export time, the origin host, and, when retention is configured, the time the origin will forget the incident.

Import it, and the local sandbox behaves as production did

reproduce runs the pack once. import makes the incident part of the local sandbox:
Three things happen, each idempotent, so importing the same bundle twice changes nothing:
  1. The event and its redacted recording land in the local log, so agent incidents lists it and reproduce <fingerprint> works here without the file.
  2. A rule with provenance imported:<fingerprint> answers the recorded route with the recorded status and body. When the bundle carries the resource’s state, the rule is conditioned on it, so the sandbox fails the way production did only while that resource is in that state.
  3. The resource the recording touched is seeded into the sandbox’s store under its token key, with the attributes and state the agent last saw.
Then the sandbox answers that request the way the provider did, and says why:
The key is the token from the recording, because that is what the bundle holds; the raw identifier never left the origin host. Drop the rule when the incident is fixed, or keep it as the regression the sandbox always rehearses.

Where this fits

In rough order of how often they apply:
  1. Export a bundle when one developer needs one incident now, and import it when the local sandbox should keep behaving that way.
  2. Commit the generated pack so the path is guarded forever with no recording at all.
  3. Share data_dir read-only for a team that wants every incident.
  4. Automate the export with --since 24h in a cron job, attached to an issue or pull request.

Safety on the way back in

A bundle is untrusted input. Its schema version is checked, unknown fields are refused, an incomplete bundle is refused, and the file is capped at 8 MiB. See the bundle format.