e2e: a resumable tail — re-enter a drive at finish-setup/S12 without re-founding #333

Closed
opened 2026-08-08 15:03:58 +00:00 by ben · 5 comments
Owner

Every tail defect this arc (Defects J/K drive 17, Finding L drive 18) cost a full ~12–25m founding drive to reach the last two minutes of spec. The harness deliberately never re-drives to diagnose, which is right — but it has no way to RESUME either: a drive that died at the S12 tail can only be reproduced from S1.

Wanted: a debugging loop that re-enters at the tail. The state seam already exists (--user-data-dir = the run dir's state/; the helper persists founding-state.json at step: hand-off with the guest still up) — the missing piece is a harness entry point that relaunches the app against an EXISTING run dir + running guest and runs only the tail steps. Constraints: it must stay a debugging tool, never the spec (ADR 0132's drive is the proof); the guest-teardown preflight in scripts/smoke-private-path.sh must be bypassed knowingly; and it should refuse if the persisted step isn't at the tail (a half-founded resume is trial-reset territory).

From the private-path live e2e arc (ledger: .superpowers/sdd/2026-08-07-private-path-live-e2e/progress.md).

Every tail defect this arc (Defects J/K drive 17, Finding L drive 18) cost a full ~12–25m founding drive to reach the last two minutes of spec. The harness deliberately never re-drives to diagnose, which is right — but it has no way to RESUME either: a drive that died at the S12 tail can only be reproduced from S1. Wanted: a debugging loop that re-enters at the tail. The state seam already exists (`--user-data-dir` = the run dir's `state/`; the helper persists `founding-state.json` at `step: hand-off` with the guest still up) — the missing piece is a harness entry point that relaunches the app against an EXISTING run dir + running guest and runs only the tail steps. Constraints: it must stay a debugging tool, never the spec (ADR 0132's drive is the proof); the guest-teardown preflight in `scripts/smoke-private-path.sh` must be bypassed knowingly; and it should refuse if the persisted step isn't at the tail (a half-founded resume is trial-reset territory). From the private-path live e2e arc (ledger: `.superpowers/sdd/2026-08-07-private-path-live-e2e/progress.md`).
Author
Owner

This was generated by AI during triage.

Agent Brief

Category: enhancement
Summary: Add a debug-only entry point that resumes the private-path e2e drive harness at its tail steps, without re-running the full founding stand-up.

Current behavior: The live e2e harness always drives the app from a clean state through the entire founding journey (wizard S1 through stand-up completion). When a defect only manifests in the final steps (the hand-off tail), reproducing it costs a full ~12-25 minute drive from S1 every time, because the harness has no way to re-enter mid-journey. The underlying state seam already persists enough to resume: a run's --user-data-dir holds the operator app's state, including a founding-state.json snapshot written at the hand-off step while the guest is still running.

Desired behavior: A harness entry point (a script or flag) can relaunch the app against an EXISTING run directory and its still-running guest, and drive only the tail steps of the journey — skipping the founding stand-up that already completed. It must:

  • Refuse to resume a run directory whose persisted step is not at the tail (hand-off or later) — a partially-founded run is not a valid resume target and should fail loud rather than attempt a partial re-drive.
  • Deliberately and knowingly bypass the harness's normal guest-teardown preflight for this resume path (the whole point is reusing the still-running guest) — this bypass must be explicit in the entry point's own logic, not an accidental gap in the general preflight.
  • Remain strictly a debugging aid: it must not become an alternate spec path or be invoked by the harness's normal drive. The full from-S1 drive stays the source of truth for pass/fail.

Key interfaces:

  • Whatever function/module currently loads the persisted founding state snapshot and determines the current step — reuse its step model to decide whether a run dir is tail-resumable.
  • The harness's guest lifecycle management (start/stop/teardown) — the resume path needs a variant that treats an already-running guest as expected, not stale.

Acceptance criteria:

  • Given a run directory whose persisted state is at the tail (hand-off step, guest still running), the new entry point relaunches the app against that state dir and drives only the remaining tail steps.
  • Given a run directory whose persisted state is earlier than the tail, the entry point refuses with a named error rather than attempting a partial drive.
  • The entry point does not invoke the normal guest-teardown preflight, and this is documented inline as deliberate.
  • The harness's main drive (the full S1 journey) is unchanged and does not call the new entry point.

Out of scope:

  • Making the tail-resume path part of the drive's pass/fail spec (the full drive stays the proof).
  • General harness resumability beyond the tail (e.g. resuming mid-founding).

Note on branch: This harness (the private-path live e2e drive script and spec, and the founding state seam it drives) lives on the private-standup-polish branch — it is not present on main yet. Build this change on top of that branch, not main.

> *This was generated by AI during triage.* ## Agent Brief **Category:** enhancement **Summary:** Add a debug-only entry point that resumes the private-path e2e drive harness at its tail steps, without re-running the full founding stand-up. **Current behavior:** The live e2e harness always drives the app from a clean state through the entire founding journey (wizard S1 through stand-up completion). When a defect only manifests in the final steps (the hand-off tail), reproducing it costs a full ~12-25 minute drive from S1 every time, because the harness has no way to re-enter mid-journey. The underlying state seam already persists enough to resume: a run's `--user-data-dir` holds the operator app's state, including a `founding-state.json` snapshot written at the `hand-off` step while the guest is still running. **Desired behavior:** A harness entry point (a script or flag) can relaunch the app against an EXISTING run directory and its still-running guest, and drive only the tail steps of the journey — skipping the founding stand-up that already completed. It must: - Refuse to resume a run directory whose persisted step is not at the tail (`hand-off` or later) — a partially-founded run is not a valid resume target and should fail loud rather than attempt a partial re-drive. - Deliberately and knowingly bypass the harness's normal guest-teardown preflight for this resume path (the whole point is reusing the still-running guest) — this bypass must be explicit in the entry point's own logic, not an accidental gap in the general preflight. - Remain strictly a debugging aid: it must not become an alternate spec path or be invoked by the harness's normal drive. The full from-S1 drive stays the source of truth for pass/fail. **Key interfaces:** - Whatever function/module currently loads the persisted founding state snapshot and determines the current step — reuse its step model to decide whether a run dir is tail-resumable. - The harness's guest lifecycle management (start/stop/teardown) — the resume path needs a variant that treats an already-running guest as expected, not stale. **Acceptance criteria:** - [ ] Given a run directory whose persisted state is at the tail (`hand-off` step, guest still running), the new entry point relaunches the app against that state dir and drives only the remaining tail steps. - [ ] Given a run directory whose persisted state is earlier than the tail, the entry point refuses with a named error rather than attempting a partial drive. - [ ] The entry point does not invoke the normal guest-teardown preflight, and this is documented inline as deliberate. - [ ] The harness's main drive (the full S1 journey) is unchanged and does not call the new entry point. **Out of scope:** - Making the tail-resume path part of the drive's pass/fail spec (the full drive stays the proof). - General harness resumability beyond the tail (e.g. resuming mid-founding). **Note on branch:** This harness (the private-path live e2e drive script and spec, and the founding state seam it drives) lives on the `private-standup-polish` branch — it is not present on `main` yet. Build this change on top of that branch, not `main`.
Author
Owner

Blocked for a main-landing Sandcastle worker — branch conflict.

The Agent Brief's own "Note on branch" rules this explicitly: "This harness … lives on the private-standup-polish branch — it is not present on main yet. Build this change on top of that branch, not main."

Confirmed on main: there is no private-path e2e drive harness (app/tests/e2e/, app/playwright.config.ts, the drive scripts) and no founding-state.json hand-off snapshot seam — all of it lives only on origin/private-standup-polish, which is not an ancestor of main.

The Sandcastle workflow lands every commit on origin/main; it cannot honour the "build on private-standup-polish" ruling. Resolving this needs a human decision: either run a Sandcastle worker rooted on private-standup-polish for this arc's tasks, or merge the private-path e2e arc into main first (same underlying decision as #338/#337). Moving to ready-for-human.

**Blocked for a main-landing Sandcastle worker — branch conflict.** The Agent Brief's own "Note on branch" rules this explicitly: *"This harness … lives on the `private-standup-polish` branch — it is not present on `main` yet. Build this change on top of that branch, not `main`."* Confirmed on `main`: there is **no private-path e2e drive harness** (`app/tests/e2e/`, `app/playwright.config.ts`, the drive scripts) and **no `founding-state.json` `hand-off` snapshot seam** — all of it lives only on `origin/private-standup-polish`, which is not an ancestor of `main`. The Sandcastle workflow lands every commit on `origin/main`; it cannot honour the "build on `private-standup-polish`" ruling. Resolving this needs a human decision: either run a Sandcastle worker rooted on `private-standup-polish` for this arc's tasks, or merge the private-path e2e arc into `main` first (same underlying decision as #338/#337). Moving to `ready-for-human`.
Author
Owner

Approved by Ben 2026-08-08 (decision sweep) as scoped: debug-only entry point that relaunches against an existing run dir + running guest and runs only the tail; refuses when the persisted step isn't at the tail; bypasses the teardown preflight knowingly; never the spec (ADR 0132's drive stays the proof). Harness work proven by local drives → stays session work, no-triage.

Approved by Ben 2026-08-08 (decision sweep) as scoped: debug-only entry point that relaunches against an existing run dir + running guest and runs only the tail; refuses when the persisted step isn't at the tail; bypasses the teardown preflight knowingly; **never the spec** (ADR 0132's drive stays the proof). Harness work proven by local drives → stays session work, `no-triage`.
Author
Owner

Backlog walk (Ben, 2026-08-12): promoted ready-for-agent with offline-test acceptance (the entry point's refuse/bypass logic unit-tested); the live tail-resume proof happens at the next e2e sitting. The in-body constraints are the contract: debugging tool only (never the spec — ADR 0132's drive is the proof), knowing teardown-preflight bypass, refuse a non-tail persisted step.

Backlog walk (Ben, 2026-08-12): promoted `ready-for-agent` with offline-test acceptance (the entry point's refuse/bypass logic unit-tested); the live tail-resume proof happens at the next e2e sitting. The in-body constraints are the contract: debugging tool only (never the spec — ADR 0132's drive is the proof), knowing teardown-preflight bypass, refuse a non-tail persisted step.
Author
Owner

close-report for #333 — status success

✅ close-report gates passed — every claim verified against main; closing.

envelope
{
  "issue": 333,
  "status": "success",
  "commits": [
    "67776c0d72d2aabc6ddd95c76bab280484e8c47c"
  ],
  "changed_files": [
    "app/tests/e2e/fixtures/resume.ts",
    "app/tests/e2e/fixtures/resume.test.ts",
    "app/tests/e2e/private-path-tail.resume.spec.ts",
    "scripts/resume-private-path-tail.sh",
    "STATUS.md"
  ],
  "tests": [
    {
      "command": "cd app && CI=true pnpm exec vitest run tests/e2e/fixtures/resume.test.ts",
      "exit_code": 0
    },
    {
      "command": "cd app && CI=true pnpm exec vue-tsc -p tsconfig.json --noEmit",
      "exit_code": 0
    },
    {
      "command": "CI=true npx eslint app/tests/e2e/fixtures/resume.ts app/tests/e2e/fixtures/resume.test.ts app/tests/e2e/private-path-tail.resume.spec.ts",
      "exit_code": 0
    }
  ],
  "criteria": {
    "Given a run directory whose persisted state is at the tail (hand-off, guest still running), the new entry point relaunches the app against that state dir and drives only the remaining tail steps": "scripts/resume-private-path-tail.sh relaunches via launchApp against OC_E2E_RUN_DIR's existing state; app/tests/e2e/private-path-tail.resume.spec.ts asserts resume-to-hand-off (ADR 0050) then drives passkey ceremony -> kit-deferred scrub -> Operator home. Live proof deferred to next e2e sitting per Ben 2026-08-12.",
    "Given a run directory whose persisted state is earlier than the tail, the entry point refuses with a named error rather than attempting a partial drive": "assertTailResumable (app/tests/e2e/fixtures/resume.ts) throws NotAtTailError for any step != hand-off / missing file / missing standup; proven offline by resume.test.ts (9 tests green, including seeded/deploying/private-vm/reachability refusals). The resume spec calls it as its FIRST act.",
    "The entry point does not invoke the normal guest-teardown preflight, and this is documented inline as deliberate": "scripts/resume-private-path-tail.sh never calls oc_teardown_guest; its header + inline preflight comment document the deliberate inverse (reuse the running guest) and instead REQUIRE the guest active, refusing loud if not.",
    "The harness's main drive (the full S1 journey) is unchanged and does not call the new entry point": "scripts/smoke-private-path.sh and app/tests/e2e/private-path.live.spec.ts are untouched (git diff empty); the resume path is a SEPARATE spec selected only via resume-private-path-tail.sh's OC_E2E_SPEC override."
  },
  "summary": "Added a debug-only tail-resume loop (gate + entry script + resume spec) that re-enters the private-path e2e drive at hand-off against an existing run dir + running guest, with an offline-tested refuse/bypass gate.",
  "blockers": []
}
**close-report** for #333 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; closing. <details><summary>envelope</summary> ```json { "issue": 333, "status": "success", "commits": [ "67776c0d72d2aabc6ddd95c76bab280484e8c47c" ], "changed_files": [ "app/tests/e2e/fixtures/resume.ts", "app/tests/e2e/fixtures/resume.test.ts", "app/tests/e2e/private-path-tail.resume.spec.ts", "scripts/resume-private-path-tail.sh", "STATUS.md" ], "tests": [ { "command": "cd app && CI=true pnpm exec vitest run tests/e2e/fixtures/resume.test.ts", "exit_code": 0 }, { "command": "cd app && CI=true pnpm exec vue-tsc -p tsconfig.json --noEmit", "exit_code": 0 }, { "command": "CI=true npx eslint app/tests/e2e/fixtures/resume.ts app/tests/e2e/fixtures/resume.test.ts app/tests/e2e/private-path-tail.resume.spec.ts", "exit_code": 0 } ], "criteria": { "Given a run directory whose persisted state is at the tail (hand-off, guest still running), the new entry point relaunches the app against that state dir and drives only the remaining tail steps": "scripts/resume-private-path-tail.sh relaunches via launchApp against OC_E2E_RUN_DIR's existing state; app/tests/e2e/private-path-tail.resume.spec.ts asserts resume-to-hand-off (ADR 0050) then drives passkey ceremony -> kit-deferred scrub -> Operator home. Live proof deferred to next e2e sitting per Ben 2026-08-12.", "Given a run directory whose persisted state is earlier than the tail, the entry point refuses with a named error rather than attempting a partial drive": "assertTailResumable (app/tests/e2e/fixtures/resume.ts) throws NotAtTailError for any step != hand-off / missing file / missing standup; proven offline by resume.test.ts (9 tests green, including seeded/deploying/private-vm/reachability refusals). The resume spec calls it as its FIRST act.", "The entry point does not invoke the normal guest-teardown preflight, and this is documented inline as deliberate": "scripts/resume-private-path-tail.sh never calls oc_teardown_guest; its header + inline preflight comment document the deliberate inverse (reuse the running guest) and instead REQUIRE the guest active, refusing loud if not.", "The harness's main drive (the full S1 journey) is unchanged and does not call the new entry point": "scripts/smoke-private-path.sh and app/tests/e2e/private-path.live.spec.ts are untouched (git diff empty); the resume path is a SEPARATE spec selected only via resume-private-path-tail.sh's OC_E2E_SPEC override." }, "summary": "Added a debug-only tail-resume loop (gate + entry script + resume spec) that re-enters the private-path e2e drive at hand-off against an existing run dir + running guest, with an offline-tested refuse/bypass gate.", "blockers": [] } ``` </details>
ben closed this issue 2026-08-12 17:18:08 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Matou/idss#333
No description provided.