Skip to content
Like what we’re building? Star on GitHub

Workspace, review scope and sandboxes — package invariants ​

One entry per package, verbatim from the engine map this tree replaces. The generated map-packages.md lists every package with its purpose and interfaces; these leaves carry the invariants. iterion map find|impact|path answer the exact questions.

  • pkg/workspacetrack/ — workspace versioning: content-addressed capture/restore of the files a run produces, with a store-global object pool at <store>/workspace-objects/ and per-run chained snapshot manifests + stat cache under <store>/runs/<id>/workspace/. Backs iterion rewind's file restore for runs with no isolated worktree — the default shape, where git cannot serve because the workspace is the operator's live checkout and git add -A would stage their own work. worktree: auto runs keep the per-node git snapshots. Ignore rules are iterion's own (.iterionignore, falling back to .gitignore). That restore is SCOPED (--restore-scope produced, the in-place default): it puts back only the paths the run is recorded to have changed — the union of the diffs between consecutive boundaries in [pre:<pivot> … the run's last boundary] — because the documented loop is "edit the files, THEN rewind", so a full-tree restore reverts the operator's own work along with the run's (issue #380). What iterion cannot attribute it REPORTS (files.overwritten / files.left_in_place) rather than guesses. The engine writes a fail:<node>:<iter> boundary when a node's execution does not complete, a pause:<node>:<iter> one when it parks, and a resume:<node>:<iter> one when it picks back up (instead of overwriting pre:, which used to redefine "what this node started from" as "whatever is on disk now"). Without them pre: (an alias, which does not advance the chain head) would be the newest boundary and the scope would be empty. pause:/fail: open and resume: closes the interval in which NOTHING of the run executes — the only window where authorship is decidable, which the scope excludes; it is read from the CLOSING end because a label is a pointer the engine re-points, while a snapshot's own Label is written once. See docs/workspace-versioning.md

  • pkg/git/ — Git helpers (worktree create/finalize, branch detection, fast-forward checks)

  • pkg/reviewtopology/ — Resolves the credential-derived topology vars, each opt-in by var declaration (InjectAll at every launch surface): the review topology (review_mode, ADR-052 amended by ADR-169 — auto resolves to single on every host, a second reviewer being a deliberate spend (paired); the retired mono/dual spellings are still read as single/paired while integrations migrate; consumed by review-pr and evolve), the cross-model plan-review switch (plan_review, ADR-091 — auto → on iff ≥2 distinct model families are credentialed; it gates ONLY the peer review of the 7 campaign bots' plan phase — the phase itself runs by default, plan_phase: off being its own switch, and the campaign receives the plan stamped with its plan_provenance), and the raw family list (llm_families) so any bot can build its own policy without a new engine role var. On cloud, cloudpublisher derives the family set from the run's SEALED bundle (all five credential tiers) and injects the same vars onto queued runs. No family is a var and nothing refuses a launch for one: the nodes name roles (reviewer, reviewer_alternate, converge) and the family a role runs on is a routing question — the node's literal plus the llmroute cells over it — so a route no credential serves fails at its own first node, the ordinary fate of every literal route in the catalogue. See docs/adr/052-review-topology-mono-dual.md, ADR-169 + docs/adr/091-fallback-skip-route-and-plan-peer-review.md

  • pkg/sandbox/ — Sandbox engine: Docker/Kubernetes drivers, devcontainer parsing, CONNECT proxy

  • pkg/runshell/ — Spawns an interactive post-mortem PTY shell in a preserved run worktree (studio "Open shell"); Unix-only with a Windows stub

  • pkg/cloud/ — Cloud-mode runtime wiring (queue dispatch, runner orchestration, multitenancy)