Skip to content
CodeBook

Test factory, versions and rollback

Check routing and configuration before execution, compare definitions and restore a previous version.

Test factory walks the configured paths with scripted outcomes. It checks routing, failure paths, escalation, permissions, token controls and contracts without asking a model to do the work.

What a simulation proves

Use its readiness findings to locate disconnected paths, unsafe loops and missing configuration. A simulation is useful before an installation, reviewed change, blueprint update or environment promotion.

It does not prove that a repository credential works, that a tool response is correct, or that an agent can complete your real task. Follow it with a small real card and inspect the outputs and run trail.

When a station's routes or branches carry an impact level, the report walks the happy path once more at each level the workflow varies by — so a critical path that leads nowhere is found here first — and warns when levels are declared while the factory's risk routing is switched off.

Versions

Factory versions record definitions, not a backup of all operational data. Compare versions to see the changes in sentences. Runs record the factory version they used, allowing outcomes to be compared across definitions.

A reviewed publication, blueprint update or promotion creates a version. Direct definition changes are also captured by the versioning service.

Gate counting is included: the rule, minimum passes when applicable, and pass/fail wording. Compare and inspect versions to see those settings. New versions record defaults explicitly. Older snapshots that did not record counting show unknown history; matching covered values do not make that history complete.

The factory's and each station's model policy are included too. A version shows Factory model: … and each station's Model: …, and Compare lists a policy change. Saving or removing a policy creates a new version. Versions recorded before model policies were captured show a historical-coverage warning instead of a model. A worker's own policy is not part of a version.

Rollback

Choose a previous version in the factory’s Versions controls and inspect the comparison before restoring it. Rollback restores supported definition settings while preserving cards and run history. It does not reverse external effects such as a pull request, a tool call or an already-sent webhook.

Restoring an old snapshot with unknown gate counting preserves the current settings on surviving gates; a newly created gate uses defaults. The result warns that this is not an exact historical restoration. A reviewed rollback freezes those preserved settings in its draft for the reviewer. Model policies follow the same rule: restoring a version with unknown model history keeps the current policy on surviving scopes and lets new stations inherit.

If the version names a model your organization no longer has, the rollback does not choose another one. That factory or station is left without a policy of its own, so its runs inherit the wider choice, and the rollback outcome lists the missing model and is not reported as exact.

After restoring, test the definition and check affected stations before restarting work. See policies and operations for pausing and reviewing runs.

Work snapshots

A factory version says what the factory's rules were. A work snapshot says what the world was when a piece of work was done: the factory version, the current System Map version of every repository the card's workflow — or, for a work order, the factory's workflows — is attached to (or that none was built), and the content hash of every knowledge source a run there was allowed to read. One is taken when a card is created, when a work order's plan is turned into cards, when a story from OpenBook is accepted, and when every run starts — not again when a run resumes. A snapshot is an audit of the work, never a condition of it: if one cannot be taken, the work goes on and the failure is logged.

A snapshot is shown in one line — for example Factory v12 · Map c0ffee1 · 14 sources — on a work order, under its header, and on a run in a station's Runs tab when you open the run. It is not shown in the card's own view. Opened, a snapshot shows:

  • What the definition was — the factory version, its workflows and stations, and its changes in sentences.
  • Which nodes and edges were current — per repository, the map as it stood at the recorded version, a page at a time, with what later versions changed. Which nodes and edges existed is replayed exactly; their fields are shown as they are today, and the page says so.
  • Sources the worker could read — each with its hash, marked changed since when its text has changed and removed since when it is gone. The text of a source is not kept per snapshot, and the page says so rather than reconstructing it.
  • What the model read — for a run, its recorded context pack, every item included or left out. A run of a workflow with no mapped repository recorded no pack, and says so.

Export JSON saves the whole reconstruction as a file.

Work snapshot limits are listed in the implementation status.