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/. Backsiterion 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 andgit add -Awould stage their own work.worktree: autoruns 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 afail:<node>:<iter>boundary when a node's execution does not complete, apause:<node>:<iter>one when it parks, and aresume:<node>:<iter>one when it picks back up (instead of overwritingpre:, which used to redefine "what this node started from" as "whatever is on disk now"). Without thempre:(an alias, which does not advance the chain head) would be the newest boundary and the scope would be empty.pause:/fail:open andresume: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 ownLabelis written once. See docs/workspace-versioning.mdpkg/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 (InjectAllat every launch surface): the mono/dual review topology (review_mode/mono_family, ADR-052 —autoresolves to mono on any detected family whose slot has a servable route (a backed family with none refuses the launch, #1221 below; dual only where none is detected at all, deleting amono_familypin with it), so dual is an explicit spend; consumed byreview-prandevolve), 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: offbeing its own switch, and the campaign receives the plan stamped with itsplan_provenance), and the raw family list (llm_families) so any bot can build its own policy without a new engine role var. On cloud,cloudpublisherderives the family set from the run's SEALED bundle (all five credential tiers) and injects the same vars onto queued runs. Amono_familyno credential serves — or one a credential backs whose slot has no servable route (#1221: the inventory publishes each family as its candidate routes with launch states in llmroute's failure-class vocabulary, so a GLM-only host without the claude_code CLI refuses at launch instead of dying at the reviewer node) — refuses rather than being silently substituted, at BOTH moments that can still refuse and through one read-only predicate (RefusePinnedFamily): at launch (#2258), and at RESUME on every lane — cloud (SubmitResume, against the bundle it re-seals), studio/API/detached (runview.Service.Resume) anditerion resume, each against the set its own launch reads. A resume replays the inputs FROZEN at launch, so nothing else re-judges them and a run whose credential died since used to come back, start and die at its first review node — on the forge lane, a required check going dark on every pull request of the repo (#1221, measured 2026-09-22). The judgement writes nothing: the frozen inputs stay the launch's byte for byte. The refusal is typed (ErrUnservableFamily) because it is PERMANENT — the cloud auto-retry sweeper abandons such a run with the reason on its document instead of re-arming a queued→failed flap until the attempt budget burns. See docs/adr/052-review-topology-mono-dual.md + docs/adr/091-fallback-skip-route-and-plan-peer-review.mdpkg/sandbox/— Sandbox engine: Docker/Kubernetes drivers, devcontainer parsing, CONNECT proxypkg/runshell/— Spawns an interactive post-mortem PTY shell in a preserved run worktree (studio "Open shell"); Unix-only with a Windows stubpkg/cloud/— Cloud-mode runtime wiring (queue dispatch, runner orchestration, multitenancy)
