snapshot rail after founding-prefix — archive drive starts from a FOUNDED guest snapshot, ~11 min off every run (split from #1270 C) #1280
Labels
No labels
agent-blocked
agent-working
autopilot
bug
deferred
deploy-pending
enhancement
landing-pr
model-haiku
model-opus
model-sonnet
needs-design
needs-info
needs-triage
no-triage
out-of-scope
priority
ready-for-agent
ready-for-human
ready-for-session
rehearsal-183
snapshot-pending
standing-drive
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Matou/idss#1280
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
Split from #1270 Part C on Ben's ruling (2026-09-06). Every #1235 archive-drive run pays ~11 min of
founding-prefixbefore the archive legs start (run 12: 651 863 ms of a 1 119 s red; the closing green20260906T113212Zspent the same prefix before its 342 sdeploy-archive). Ten minutes off every run of this drive, regardless of who fixes what.Ask (two-way, ADR 0174)
Land the phase-7 spec's snapshot rail for the private-path guest so
provision-archive.live.spec.ts(and any laterlocal-*drive sharing the founding prefix) can start from a FOUNDED snapshot instead of re-founding:runFoundingPrefix(app/tests/e2e/fixtures/foundingPrefix.ts) gains a snapshot path: after a green founding it records the guest's founded state (qemu snapshot or disk-image copy + thestate/sidecars the later legs read); on the next run, if a snapshot exists AND its recorded HEAD/served-pin matches the current bits (GOTCHAS #92 — derivable ≠ deployed; a stale snapshot must NOT be reused), restore it and skip the prefix.scripts/rehearsal-cycle.sh,smoke-private-path.sh) reportsfounding-prefix: snapshotvsfounding-prefix: foundedinlegs.jsonso the leg list stays honest (a snapshot restore is still a green leg with its ownms).Acceptance: an archive drive on the standing elitebook-03 queue reaches
operator-sessionwithin ~2 min of its stamp on the second fire, with the leg list unchanged (9 legs) andfounding-prefixmarkedsnapshot. Independent of #1270 Part A and of #1279.Blocked — cannot-proceed (no live private-path guest environment in the swarm sandbox)
I claimed this (run=19240) and worked the design out in full, but the deliverable has no offline seam I can build test-first against and prove green here. The whole rail is live-guest orchestration whose only real proof is the acceptance itself — two back-to-back live archive drives on the elitebook-03 standing queue (second fire reaches
operator-sessionin ~2 min,founding-prefixmarkedsnapshot). This worktree is a code-implementer, not the drive host: no live QEMU/KVM guest, no standing private-path home, no way to run the drive. Shipping the capture→restore→adopt-boot orchestration blind risks a half-restored guest that reds the drive worse than a clean re-found today — the "cheap green fix" #1270 Part A warned against — so I am not landing it unexercised.To re-arm
Pick this up from a session with the live private-path guest (or on elitebook-03 directly), where the two-fire acceptance can actually be exercised. Re-add
ready-for-agentonly once that environment is in hand.Design worked out (a gift for the next actor)
This is the private-path analogue of ADR 0208's standing-rented community, applied to the local-guest founded state.
Persistence home. The founded private-path state IS the app state dir:
<stateDir>/state/already holdsvm/guest.qcow2,clan-config/,guest-trust/,community-ca/,founding-state.json. Give thelocal-archivedrive a persistent home (test-results/standing-private/, mirroringstanding-rented/), launched-on across fires vialaunchApp({stateDir})(theREHEARSAL_STANDING_DIRseam already exists inlaunch.ts).Input-keyed gate (item 2, the GOTCHAS #92 core). Mirror
oc_standing_staleness(scripts/lib/rehearsal-standing-lib.sh) but simpler:reuseonly when the snapshot's recorded founding inputs — guest-image sha, agent pin, brand-kit fingerprint — still equal the current bits. Key on what the snapshot actually baked at capture time, never on whatmainmerely derives now (derivable ≠ deployed). Any drift →founding-prefixruns in full. No env switch may force a stale snapshot green (offline self-test).The session problem is solvable — the private path founds with a passkey (not the rented path's password), but the CDP virtual authenticator's resident key round-trips through
WebAuthn.getCredentials/addCredential(seetransplantCredentials,ceremony.ts). So capture exports the credential beside the snapshot; the adopt branch re-imports it into a fresh authenticator and signs in — no re-run of the S12 reset-token ceremony.runFoundingPrefixsnapshot branch (item 1). BeforelaunchApp, if the gate says fresh: restorestate/(incl.vm/guest.qcow2) + the user unit, start the guest,waitForGuestBanner. The app then boots to the dashboard (idempotentManager.Create), not Welcome; the branch re-imports the credential, signs in, and returns aFoundingPrefixResultequivalent to a founded one. Degrade-to-full-founding on any doubt (missing/stale snapshot, restore error, guest won't boot, no dashboard, credential re-import fails) — this makes the rail no-regression by construction: worst case = today.Marker (item 3).
runFoundingPrefixreturnsmode: 'snapshot' | 'founded'; the spec records it in thefounding-prefixleg record (same shape as the door marker onoperator-session), solegs.jsonstays honest and a snapshot restore is still a green leg with its ownms.Scope guard (item 4): snapshot rail only — park / transient rails stay unexercised.
Rerouted
ready-for-agent→ready-for-session(Ben's session, 2026-09-06)The swarm worker's block is right: the rail's only proof is two back-to-back live archive drives on the elitebook-03 standing queue, and the sandbox has no guest. This is a session's build (host standing, live QEMU/KVM, the standing queue) — the same class as #1270 Part A and #1279.
agent-blockeddropped; nothing else changes. The acceptance in the body stands.Baseline it is measured against: the P4 archive drive retrospective (
docs/research/2026-09-06-p4-archive-drive-retrospective.md) —founding-prefix579–652 s per fire, ~2.5 h of the arc's 4.7 h drive time.HELD by Ben's local session (2026-09-07 00:17Z) —
ready-for-sessionDROPPED to keep the session-runner off itBen's interactive session on the laptop picked this up at 00:17Z (building on the worker's design; paused briefly for #1281). My 00:14Z reroute to
ready-for-sessionmade it sweepable by the workstation session-runner at the same time — a duplication hazard, so the label is off. No swarm-visible label remains on purpose: the local session lands it. If that session drops it, re-addready-for-session.BUILT — commit
436440a1onmain(babysitting session, Ben's 'do it now'; live acceptance pending)The worked-out design above landed almost exactly as gifted — thank you, it was a real gift.
app/tests/e2e/fixtures/snapshotRail.ts, wired into BOTHprovision-archiveandprovision-brands(the brands drive is the live queue right now and shares the prefix):poweroff, unit-stop backstop) → state home (minus disk + volatile Electron caches) + consistentguest.qcow2+ the operator's resident passkey (WebAuthn.getCredentials, your item-3 insight — it round-trips the private key) →test-results/standing-private/(outside the pruned tree). Adopt = restore under the run's OWN home with a copy-on-write qcow2 overlay on the read-only master (refinement: a red run can never dirty the master, every run stays isolated, and the restore is near-instant), rewrite the captured unit's paths, start the guest to a real SSH banner, import the passkey into the resolver-carrying ceremony browser — no wizard, no app ceremony window.nix/guest+flake pins (stage-vm-guest-slot's content-key idiom) +internal+control-plane+dashboard(the surfaces the pre-first-deploy legs read live: the browse/catalogue legs read the CAPTURED closure until the first whole-system switch). A harness-only heal keeps the key; any product drift re-founds in full. No force-reuse input exists — the pure gate takes (recorded key, current key, kill switch) andOC_SNAPSHOT_RAIL=0can only force FOUNDED; pinned bysnapshotRail.test.ts.founding: snapshot|founded+ the gate verdict into its LegMarkers record.Proof so far (offline): vitest fixtures 351/351 (+9 rail pins),
vue-tscclean, ALL rehearsal offline tests green (+1 rail-wiring check in the brands target test: decision BEFORE launch, honest marker, home outside the pruned tree).Live acceptance: rides the standing #1277 loop — the next founded fire captures, the fire after adopts (~2 min to
operator-session,founding: snapshotin legs.json). This ticket stays open until that two-fire proof lands; I am watching the loop and will post the legs.json evidence here.Ruled by agent under ADR 0174 — veto anytime
Ruling: apply
ready-for-session(keeping the additivepriority+rehearsal-183). This is the only open issue carrying no state role, and this run must not leave it untriaged.State now: code-complete on
main— commit436440a1landed the snapshot rail (app/tests/e2e/fixtures/snapshotRail.ts+ wiring intoprovision-archiveandprovision-brands, smoke, and the brands target test). Offline proof is green (fixtures 351/351 incl. +9 rail pins,vue-tscclean, all rehearsal offline tests). The only work left is the live two-fire acceptance on the standing loop (next founded fire captures, the fire after adopts →operator-sessionin ~2 min,founding: snapshotinlegs.json, 9 legs unchanged).Why
ready-for-sessionand not the alternatives:ready-for-agent— the swarm worker already blocked this (run 19240,agent-blocked): the sandbox has no live private-path guest, and the remaining work is live-guest drive orchestration. Re-addingready-for-agentjust re-triggers that exact block and walks it back toagent-blocked.deploy-pending/snapshot-pending— those name specific trees with auto-close rails:deploy-pending= deployed-service tree (broker/**,go.mod/sum) closed by the deploy rail;snapshot-pending= the gateway image bake (nix/guest/**,scripts/gateway-image/**) closed by the #661 auto-rebuild.436440a1touches neither — it lives in the e2e harness, and its proof rides the rehearsal drive loop, which has no auto-close rail. (#1280's "snapshot" is a test-guest snapshot — an unrelated mechanism.)ready-for-human— live acceptance is observing the standing loop'slegs.jsonfor afounding: snapshotfire and closing with that evidence. No Ben's-hands, no Ben's-eyes, no one-way door.ready-for-sessionfits and matches your own standing instruction — your 00:42Z comment: "If that session drops it, re-addready-for-session." The building session posted BUILT at 00:51Z and has since ended, so by that instruction the correct state isready-for-session: a session on the drive host sweeps it, reads the two-fire evidence off the standing #1277 loop, and closes with thelegs.jsonproof (or keeps watching if the two fires haven't landed yet).Why this is a two-way door: a label change is trivially revertible and you veto anytime; it is not on the one-way-door list (no personal credentials, no security-posture widening, no member-facing trust accept, no data destruction, no non-routine spend).
What proves it: the acceptance in the body (second fire →
operator-session~2 min,founding: snapshot, 9 legs) plus the offlinesnapshotRail.test.tspins (incl. the no-force-reuse-input rule;OC_SNAPSHOT_RAIL=0can only force FOUNDED).Session-runner attempt (matou-dev-server-01, run 1473315) — code re-verified green, live acceptance is elitebook-03-bound; leaving
ready-for-sessionRuled by agent under ADR 0174 — veto anytime
What I could prove here (two-way, on current
maind42da82d): the snapshot-railcode is landed and its offline proof is intact —
pnpm exec vitest run tests/e2e/fixtures/snapshotRail.test.ts→ 9/9 (the purerailGateVerdictgate pins incl. "no force-reuse input" and theOC_SNAPSHOT_RAIL=0kill-switch-only-forces-FOUNDED shape).
pnpm exec vue-tsc -p tsconfig.json --noEmit→ clean.pnpm exec vitest run tests/e2e/fixtures/provision.test.ts(the wiring) → 20/20.Why this attempt did not close it — a missing door, not a defect. The remaining
work is the body's live two-fire acceptance (fire 1 founds+captures, fire 2 adopts
→
operator-sessionin ~2 min,founding-prefixmarkedsnapshot, 9 legs), whose onlyevidence is
artifacts/legs.json. That rail is exercised by thelocal-archive/brandsstanding queue, which runs on elitebook-03 (
scripts/rehearsal-executor.sh:20—"an unmigrated executor (elitebook-03)"). This session is on matou-dev-server-01, which:
idipdroplet queue (REHEARSAL_DRIVE_QUEUE=1234, targetidip), notthe local queue —
test-results/here holdsdrive-dropletonly, noprivate-path/,no
standing-private/home, noguest.qcow2master;~/.ssh/config,known_hosts, or anyhost env; no netbird peer);
legs.json.Running a cold local-guest two-fire here instead would mean staging the guest world from
scratch and paying a 1–3 h heavy drive twice inside a one-shot session (ADR 0184) — the
"cheap green fix" the swarm worker warned against, and out of a session-runner's honest
reach. Not attempted.
State of the prefix-sharer right now: the standing drive is #1277 (brands, shares
the founding prefix). Its last fires (
…T234910Z,…T004410Z) are RED atremove-archive— an archive leg AFTER a green founding prefix, unrelated to the rail — and re-firing
behind #1281/#1282. So no clean GREEN two-fire has landed on the queue since
436440a1(00:51Z); the
founding: snapshotevidence, if the capture is already happening on thegreen-founding fires, is sitting in elitebook-03's
legs.jsonwhere no tracker reader can see it.Systemic unblock filed: #1283 — make the GREEN close-comment surface the
founding-prefix: snapshot|founded (…ms)marker (+ leg count) read fromlegs.json, sothis acceptance (and every later prefix-sharing
local-*drive) closes from a trackerread on any host instead of requiring elitebook-03 shell access. Offline-testable; no
live drive needed to land it.
Routing: leaving
ready-for-sessionper ADR 0174 rule 8 (a missing door, statedhonestly). The next actor that can close this is a session on / adjacent to elitebook-03
reading
test-results/private-path/<stamp>/artifacts/legs.jsonfrom the next clean GREENtwo-fire (
founding: snapshot, 9 legs, operator-session ~2 min) — or, once #1283 lands,anyone reading the drive's GREEN close-comment. Respecting Ben's 01:08Z ruling that this is
session work, not
ready-for-human. Droppingagent-working(this session is endingwithout landing it) so the queue re-offers it.
LIVE ACCEPTANCE MET — closing (evidence from the standing #1277 loop)
Two back-to-back fires on elitebook-03, exactly the acceptance shape:
Fire 1 — capture (drive
20260907T013453Z, run 5): full founding (leg green,founding: founded,rail: no snapshot captured yet), thencaptureFoundedSnapshotshut the guest down cleanly, landed master + manifest + state undertest-results/standing-private/(key7d89ca4aad965182) and restarted the guest at 01:48:44.Fire 2 — adopt (drive
20260907T015459Z, run 6),artifacts/legs.jsonverbatim:396 ms against the P4 baseline's 579–652 s founding prefix;
operator-sessiongreen ~3 min after the run stamp (restore + guest boot to a SERVING control plane rides before the launch). The leg list is unchanged — a restore is still a greenfounding-prefixleg with its ownmsand the honestfounding: snapshotmarker (item 3). The run then drove the full archive cycle green on the adopted community (deploy/healthy/wears-kit/remove), so the adopted session is a real operator session, not a shell.Notes for the record:
provision-archive.live.spec.tscarries the identical wiring (same fixture path, pinned offline byrehearsal-local-brands-target-test.sh§4 over BOTH specs), so the archive drive adopts the same way.operator-sessionred) — the healer's9567f4b2gates both rail restarts onwaitForControlPlaneServingnow.42c9e644(#1284, touchesinternal/) honestly drifts the key, so the next fire re-founds in full and re-captures; harness-only heals keep the snapshot warm.Item 4 respected: park/transient rails untouched.
deploy-servicesand never reachedhealth-checks(drive 20260907T023209Z, sig 8bcb93da00e3) #1285