founding: resumability-and-logging — resumable stand-up state, refuse-or-migrate, logged steps #67

Closed
opened 2026-07-25 04:57:32 +00:00 by ben · 1 comment
Owner

Parent

Feature spec: #11 (founding).

What to build

The cross-cutting durability and honesty of the stand-up stage: it survives closing the app, may take days, and logs everything without ever leaking secrets. All client-side founding state — the draft, the checklist, and the clan seam's opaque Enrollment snapshot — is one versioned JSON document with a single writer (ADR 0050); closing the app mid-stand-up and reopening it resumes the checklist at the same item, so real-world pace (routers, device owners, DNS propagation) never breaks founding. If the state file's schema version doesn't match the app, it refuses-or-migrates — never silently misreads (ADR 0050). Every stand-up step is logged with drill-in: its events and logs are visible (ADR 0027), and secret-bearing frames are never logged on either side of the app↔helper boundary (ADR 0051).

This behaviour spans S7/S7a/S7b/VAR and S9–S12 rather than any single screen. It runs on the founding orchestrator (ADR 0052): the same versioned founding-state file the soft-phase draft lives in, extended across the stand-up checklist.

Acceptance criteria

  • (story 33) Given the operator closes the app mid-stand-up, when they reopen it, then the checklist resumes at the same item from the single versioned founding-state file (draft + checklist + the clan seam's opaque Enrollment snapshot; single writer — ADR 0050).
  • (story 33) Given the state file's schema version doesn't match the app, when it loads, then the app refuses-or-migrates — never silently misreads (ADR 0050).
  • (story 34) Given any stand-up step runs, when the operator drills in, then its events and logs are visible (ADR 0027), and secret-bearing frames are never logged on either side of the app↔helper boundary (ADR 0051).

Blocked by

  • #31 — extends the same versioned founding-state file.
  • #57 — the checklist to resume/log spans through deploy.

Task manifest

task: founding:resumability-and-logging
implements_flow: p1-founding
implements_edge: (cross-cutting — resume at any stand-up item; single versioned founding-state file, ADR 0050)
wireframe: (no dedicated screen — behaviour across S7/S7a/S7b/VAR/S9–S12)
interface: the `founding` orchestrator's state and event faces — persist draft + checklist + opaque Enrollment snapshot as one versioned single-writer JSON document, resume the checklist at the same item on restart, refuse-or-migrate on schema-version mismatch, and emit per-step events/logs with drill-in while never logging secret-bearing frames across the app↔helper boundary
seam: "`founding` orchestrator seam tests (bundled helper, Go) \u2014 restart mid-stand-up and assert resume; load a version-mismatched state file and assert refuse-or-migrate; assert no secret-bearing frames are logged (ADRs 0050/0027/0051)"
acceptance:
  - given: the app closes mid-stand-up
    when: it reopens
    then: the checklist resumes at the same item from the single versioned founding-state file (single writer, ADR 0050)
  - given: a state file whose schema version doesn't match the app
    when: it loads
    then: the app refuses-or-migrates, never silently misreads (ADR 0050)
  - given: any stand-up step runs
    when: the operator drills in
    then: its events and logs are visible (ADR 0027) and secret-bearing frames are never logged on either side of the app↔helper boundary (ADR 0051)
depends_on: [soft-phase-core, deploy-gateway]
out_of_scope:
  - "the soft-phase draft resume itself — soft-phase-core's (story 12)"
  - "the per-path checklist content — the stand-up path slices' (stories 13–17)"
needs_human_decision: []
## Parent Feature spec: #11 (founding). ## What to build The cross-cutting durability and honesty of the stand-up stage: it survives closing the app, may take days, and logs everything without ever leaking secrets. All client-side founding state — the draft, the checklist, and the clan seam's opaque Enrollment snapshot — is one versioned JSON document with a single writer (ADR 0050); closing the app mid-stand-up and reopening it resumes the checklist at the same item, so real-world pace (routers, device owners, DNS propagation) never breaks founding. If the state file's schema version doesn't match the app, it refuses-or-migrates — never silently misreads (ADR 0050). Every stand-up step is logged with drill-in: its events and logs are visible (ADR 0027), and secret-bearing frames are never logged on either side of the app↔helper boundary (ADR 0051). This behaviour spans S7/S7a/S7b/VAR and S9–S12 rather than any single screen. It runs on the `founding` orchestrator (ADR 0052): the same versioned founding-state file the soft-phase draft lives in, extended across the stand-up checklist. ## Acceptance criteria - [ ] (story 33) Given the operator closes the app mid-stand-up, when they reopen it, then the checklist resumes at the same item from the single versioned founding-state file (draft + checklist + the clan seam's opaque Enrollment snapshot; single writer — ADR 0050). - [ ] (story 33) Given the state file's schema version doesn't match the app, when it loads, then the app refuses-or-migrates — never silently misreads (ADR 0050). - [ ] (story 34) Given any stand-up step runs, when the operator drills in, then its events and logs are visible (ADR 0027), and secret-bearing frames are never logged on either side of the app↔helper boundary (ADR 0051). ## Blocked by - #31 — extends the same versioned founding-state file. - #57 — the checklist to resume/log spans through deploy. ## Task manifest ```yaml task: founding:resumability-and-logging implements_flow: p1-founding implements_edge: (cross-cutting — resume at any stand-up item; single versioned founding-state file, ADR 0050) wireframe: (no dedicated screen — behaviour across S7/S7a/S7b/VAR/S9–S12) interface: the `founding` orchestrator's state and event faces — persist draft + checklist + opaque Enrollment snapshot as one versioned single-writer JSON document, resume the checklist at the same item on restart, refuse-or-migrate on schema-version mismatch, and emit per-step events/logs with drill-in while never logging secret-bearing frames across the app↔helper boundary seam: "`founding` orchestrator seam tests (bundled helper, Go) \u2014 restart mid-stand-up and assert resume; load a version-mismatched state file and assert refuse-or-migrate; assert no secret-bearing frames are logged (ADRs 0050/0027/0051)" acceptance: - given: the app closes mid-stand-up when: it reopens then: the checklist resumes at the same item from the single versioned founding-state file (single writer, ADR 0050) - given: a state file whose schema version doesn't match the app when: it loads then: the app refuses-or-migrates, never silently misreads (ADR 0050) - given: any stand-up step runs when: the operator drills in then: its events and logs are visible (ADR 0027) and secret-bearing frames are never logged on either side of the app↔helper boundary (ADR 0051) depends_on: [soft-phase-core, deploy-gateway] out_of_scope: - "the soft-phase draft resume itself — soft-phase-core's (story 12)" - "the per-path checklist content — the stand-up path slices' (stories 13–17)" needs_human_decision: [] ```
Author
Owner

Done in bb73235 (on main).

What shipped (stories 33–34):

  • One versioned single-writer document (ADR 0050): the clan seam's opaque Enrollment snapshot is now the third peer of the founding-state file (State.Enrollment), alongside the soft-phase draft and the stand-up checklist. New durability face internal/founding/resume.go: SaveEnrollment persists the opaque blob after each clan.Enrollment.Advance; EnrollmentSnapshot returns it on restart so clan.Clan.Resume rebuilds the in-flight device install exactly where it left. Closing/reopening the app mid-stand-up resumes at the same item.
  • Refuse-or-migrate (ADR 0050): a schema-version mismatch is refused (the Store's decodeState), surfaced through every read op — StandupState/EnrollmentSnapshot/Resume — never silently misread.
  • Per-step drill-in logging (ADR 0027): new cross-cutting Standup.Events log (one StandupEvent per step via a single logEvent funnel); Pair, reachability and deploy each emit persisted events. UI: FoundingStandup.vue gains a LOGGED · Open / Download activity trail visible across every stand-up step.
  • No secret-bearing frames (ADR 0051): the discipline is structural — the persisted document holds only operator-facing event lines and the opaque snapshot, which carries no secret material (prompt answers are PTY-driven, clan.Response self-masks, never persisted). Seam asserts no secret value lands in the file.

Evidence: internal/founding/resume_test.go (resume-checklist, resume-enrollment-snapshot, refuse-schema-mismatch, every-step-events, no-secret-frame) — go test ./internal/founding/ green; app vitest 170/170 (incl. new drill-in-log render test).

Drive-by: unbreaks a latent build+test bug in #57's deploy face that never ran because the package did not compile — a missed enroll.NodeID→string conversion at deploy.go:209, and the VM-mode deploy test paired below the VM-host floor.

Done in bb73235 (on `main`). **What shipped (stories 33–34):** - **One versioned single-writer document (ADR 0050):** the clan seam's opaque `Enrollment` snapshot is now the third peer of the founding-state file (`State.Enrollment`), alongside the soft-phase draft and the stand-up checklist. New durability face `internal/founding/resume.go`: `SaveEnrollment` persists the opaque blob after each `clan.Enrollment.Advance`; `EnrollmentSnapshot` returns it on restart so `clan.Clan.Resume` rebuilds the in-flight device install exactly where it left. Closing/reopening the app mid-stand-up resumes at the same item. - **Refuse-or-migrate (ADR 0050):** a schema-version mismatch is refused (the Store's `decodeState`), surfaced through every read op — `StandupState`/`EnrollmentSnapshot`/`Resume` — never silently misread. - **Per-step drill-in logging (ADR 0027):** new cross-cutting `Standup.Events` log (one `StandupEvent` per step via a single `logEvent` funnel); Pair, reachability and deploy each emit persisted events. UI: `FoundingStandup.vue` gains a LOGGED · Open / Download activity trail visible across every stand-up step. - **No secret-bearing frames (ADR 0051):** the discipline is structural — the persisted document holds only operator-facing event lines and the opaque snapshot, which carries no secret material (prompt answers are PTY-driven, `clan.Response` self-masks, never persisted). Seam asserts no secret value lands in the file. **Evidence:** `internal/founding/resume_test.go` (resume-checklist, resume-enrollment-snapshot, refuse-schema-mismatch, every-step-events, no-secret-frame) — `go test ./internal/founding/` green; app vitest 170/170 (incl. new drill-in-log render test). **Drive-by:** unbreaks a latent build+test bug in #57's deploy face that never ran because the package did not compile — a missed `enroll.NodeID`→`string` conversion at `deploy.go:209`, and the VM-mode deploy test paired below the VM-host floor.
ben closed this issue 2026-07-26 04:28: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.

Reference
Matou/idss#67
No description provided.