founding: failJourney swallows the stand-up persistence error (ADR 0126/0127 merge follow-up) #275

Closed
opened 2026-08-05 16:42:52 +00:00 by ben · 6 comments
Owner

internal/founding/privatepath.go failJourney does _, _ = o.commitStandup(s): if the store write fails, the fault AND the survived stand-up log are silently lost — the goroutine clears o.live and StandupState serves the last pre-failure state with no fault, so the journey appears to reset unexplained. The pre-merge sync path surfaced this via errors.Join. Suggested: log it or publish a terminal live fault snapshot. Found by the ADR 0126 merge review (669afd1).

internal/founding/privatepath.go failJourney does `_, _ = o.commitStandup(s)`: if the store write fails, the fault AND the survived stand-up log are silently lost — the goroutine clears o.live and StandupState serves the last pre-failure state with no fault, so the journey appears to reset unexplained. The pre-merge sync path surfaced this via errors.Join. Suggested: log it or publish a terminal live fault snapshot. Found by the ADR 0126 merge review (669afd1).
Author
Owner

This was generated by AI during triage.

Triage Notes

What we've established so far:

  • The report references "ADR 0126/0127" (a merge follow-up), a failJourney function in internal/founding/privatepath.go, a swallowed-error pattern _, _ = o.commitStandup(s), an o.live field cleared on failure, and a commit 669afd1 where "the pre-merge sync path surfaced this via errors.Join".
  • None of these exist in this repository. internal/founding/privatepath.go exists but its only exported entry point is StandUpPrivate (plus the unexported standUpLocalVM/privateVMSpec/vmEventMessage helpers) — no failJourney anywhere in the package or the repo.
  • commitStandup (internal/founding/standup.go:599) is called in 14 places across deploy.go, toolchain.go, handoff.go, manualpath.go, standup.go, seed.go — every call site checks and returns/propagates the error; none discard it with _, _ =.
  • No o.live field exists on the founding Orchestrator (the only .live hits in the package are on an unrelated test fake in internal/founding/testing/fakes.go, tracking single-use token redemption).
  • No errors.Join usage exists anywhere in internal/founding/.
  • docs/adr/ tops out at 0125-private-path-host-toolchain-is-app-managed.md — no 0126 or 0127, in the working tree or anywhere in git log --all. Fetched all remotes (fix/sandcastle-secrets-file-mount, research/browser-e2e-tooling, research/desec-lab-delegation, research/pipeline-e2e-forgejo-target, main) — none mention "0126", "0127", or "failJourney", and no commit 669afd1 exists in this repo's history.
  • This matches the same pattern already flagged on #274 (also needs-info, also referencing an ADR/branch/code path that doesn't exist in Matou/ourcloud) — worth checking whether both reports trace back to the same external source. Not an "already implemented" wontfix (the described machinery doesn't exist here at all) and doesn't match anything in this repo's rejected-request history (no .out-of-scope/ entries yet).

What we still need from you (@ben):

  • Where does the ADR 0126/0127 work and commit 669afd1 actually live? Is internal/founding/privatepath.go's failJourney from a different checkout, a branch that didn't reach origin, or a different repo entirely?
  • If it's reachable, a pointer (remote/branch/commit) would let us re-verify the swallowed-error claim directly against the real diff and turn this into a proper agent brief (the fix itself — log the store-write failure or publish a terminal live-fault snapshot instead of discarding it — is well-specified once the actual code site is located).
> *This was generated by AI during triage.* ## Triage Notes **What we've established so far:** - The report references "ADR 0126/0127" (a merge follow-up), a `failJourney` function in `internal/founding/privatepath.go`, a swallowed-error pattern `_, _ = o.commitStandup(s)`, an `o.live` field cleared on failure, and a commit `669afd1` where "the pre-merge sync path surfaced this via `errors.Join`". - None of these exist in this repository. `internal/founding/privatepath.go` exists but its only exported entry point is `StandUpPrivate` (plus the unexported `standUpLocalVM`/`privateVMSpec`/`vmEventMessage` helpers) — no `failJourney` anywhere in the package or the repo. - `commitStandup` (`internal/founding/standup.go:599`) is called in 14 places across `deploy.go`, `toolchain.go`, `handoff.go`, `manualpath.go`, `standup.go`, `seed.go` — every call site checks and returns/propagates the error; none discard it with `_, _ =`. - No `o.live` field exists on the founding `Orchestrator` (the only `.live` hits in the package are on an unrelated test fake in `internal/founding/testing/fakes.go`, tracking single-use token redemption). - No `errors.Join` usage exists anywhere in `internal/founding/`. - `docs/adr/` tops out at `0125-private-path-host-toolchain-is-app-managed.md` — no 0126 or 0127, in the working tree or anywhere in `git log --all`. Fetched all remotes (`fix/sandcastle-secrets-file-mount`, `research/browser-e2e-tooling`, `research/desec-lab-delegation`, `research/pipeline-e2e-forgejo-target`, `main`) — none mention "0126", "0127", or "failJourney", and no commit `669afd1` exists in this repo's history. - This matches the same pattern already flagged on #274 (also `needs-info`, also referencing an ADR/branch/code path that doesn't exist in `Matou/ourcloud`) — worth checking whether both reports trace back to the same external source. Not an "already implemented" wontfix (the described machinery doesn't exist here at all) and doesn't match anything in this repo's rejected-request history (no `.out-of-scope/` entries yet). **What we still need from you (@ben):** - Where does the ADR 0126/0127 work and commit `669afd1` actually live? Is `internal/founding/privatepath.go`'s `failJourney` from a different checkout, a branch that didn't reach `origin`, or a different repo entirely? - If it's reachable, a pointer (remote/branch/commit) would let us re-verify the swallowed-error claim directly against the real diff and turn this into a proper agent brief (the fix itself — log the store-write failure or publish a terminal live-fault snapshot instead of discarding it — is well-specified once the actual code site is located).
Author
Owner

Confirmed independently by the 2026-08-05 fail-loud audit: internal/founding/privatepath.go:448 — failJourney's final act is _, _ = o.commitStandup(s), and commitStandup (internal/founding/standup.go:667-672) returns the store's save error. If that save fails the fault is lost and the stand-up row stays at StandupDeploying with no fault set — the founding UI spins indefinitely. The sweep found no other swallow on the failJourney path, so surfacing/retrying that one commit closes it.

Confirmed independently by the 2026-08-05 fail-loud audit: `internal/founding/privatepath.go:448` — `failJourney`'s final act is `_, _ = o.commitStandup(s)`, and `commitStandup` (`internal/founding/standup.go:667-672`) returns the store's save error. If that save fails the fault is lost and the stand-up row stays at `StandupDeploying` with no fault set — the founding UI spins indefinitely. The sweep found no other swallow on the failJourney path, so surfacing/retrying that one commit closes it.
Author
Owner

This was generated by AI during triage.

Triage Notes (update)

What we've established so far:

  • The original report and the first triage pass (2026-08-05T16:44:35Z) found no failJourney function and no _, _ = o.commitStandup(s) swallow anywhere in internal/founding on main.
  • A later comment (2026-08-05T23:11:55Z, from the same-day fail-loud audit) asserts the finding is "confirmed independently" at internal/founding/privatepath.go:448 and internal/founding/standup.go:667-672.
  • Re-verified now (2026-08-06): neither location exists on main. privatepath.go is 283 lines total (no line 448 to point to); commitStandup is defined at standup.go:603, not 667-672; there is still no failJourney function and no _, _ = swallow anywhere in the package.

What we still need (from whoever ran the confirming audit, or @ben):

  • Which branch/commit does the 23:11:55 confirmation actually refer to? It matches neither main at current HEAD nor the state either triage pass checked. This repo has an established pattern of ADR-12x work landing this way before merge (see the branch notes on #296 and #311) — if that's what's going on here, say so explicitly so this ticket can be held until that branch lands, the same way #296 flags its dependency inline.
  • If the confirmation was a mis-check rather than a real branch reference, this should fold back to the original (still-unverified) report and stay needs-info until someone can point at real, reproducible code.

Leaving this needs-info — the confirming comment doesn't give a location that exists anywhere in this checkout, so there's still nothing an agent (or a human) can act on with confidence.

> *This was generated by AI during triage.* ## Triage Notes (update) **What we've established so far:** - The original report and the first triage pass (2026-08-05T16:44:35Z) found no `failJourney` function and no `_, _ = o.commitStandup(s)` swallow anywhere in `internal/founding` on `main`. - A later comment (2026-08-05T23:11:55Z, from the same-day fail-loud audit) asserts the finding is "confirmed independently" at `internal/founding/privatepath.go:448` and `internal/founding/standup.go:667-672`. - Re-verified now (2026-08-06): neither location exists on `main`. `privatepath.go` is 283 lines total (no line 448 to point to); `commitStandup` is defined at `standup.go:603`, not 667-672; there is still no `failJourney` function and no `_, _ =` swallow anywhere in the package. **What we still need (from whoever ran the confirming audit, or @ben):** - Which branch/commit does the 23:11:55 confirmation actually refer to? It matches neither `main` at current HEAD nor the state either triage pass checked. This repo has an established pattern of ADR-12x work landing this way before merge (see the branch notes on #296 and #311) — if that's what's going on here, say so explicitly so this ticket can be held until that branch lands, the same way #296 flags its dependency inline. - If the confirmation was a mis-check rather than a real branch reference, this should fold back to the original (still-unverified) report and stay `needs-info` until someone can point at real, reproducible code. Leaving this `needs-info` — the confirming comment doesn't give a location that exists anywhere in this checkout, so there's still nothing an agent (or a human) can act on with confidence.
Author
Owner

This was generated by AI during triage.

Triage Notes (correction)

What we've established so far:

  • Two earlier triage passes (2026-08-05, 2026-08-06) checked main and every remote branch fetched at the time, found no failJourney, no matching swallow in internal/founding/privatepath.go, and concluded the report didn't match anything in this repository.
  • Re-investigating while triaging the related e2e-arc tickets (#333–#336) surfaced origin/private-standup-polish — a long-lived feature branch not reconciled by the prior passes — which carries the private-path live e2e work and the ADR 0126/0127 vm-standup chain this report describes.
  • On that branch, the report is accurate: Orchestrator.failJourney (internal/founding/privatepath.go) logs the fault into the stand-up's event log, then ends with a discarded _, _ = o.commitStandup(s) — if that store write fails, both the fault and the log entry are lost, and the stand-up state falls back to whatever was last successfully committed. This matches the 2026-08-05T23:11:55Z "confirmed independently" comment's description closely (that comment's line numbers were slightly off relative to this branch's current tip, which is likely why the second triage pass couldn't reconcile it against main).

What needs deciding:

  • private-standup-polish is an active branch with commits from another contributor as recently as today. Whether an agent should commit a fix directly onto that in-flight branch, or whether this should wait until it merges to main, is a coordination call — landing an uncoordinated fix on someone else's active branch risks conflicting with work already underway there.

Routing to ready-for-human (previously needs-info) — the underlying bug is now confirmed and reproducible in code; where/how to land the fix needs a call given the branch is actively being developed.

> *This was generated by AI during triage.* ## Triage Notes (correction) **What we've established so far:** - Two earlier triage passes (2026-08-05, 2026-08-06) checked `main` and every remote branch fetched at the time, found no `failJourney`, no matching swallow in `internal/founding/privatepath.go`, and concluded the report didn't match anything in this repository. - Re-investigating while triaging the related e2e-arc tickets (#333–#336) surfaced `origin/private-standup-polish` — a long-lived feature branch not reconciled by the prior passes — which carries the private-path live e2e work and the ADR 0126/0127 vm-standup chain this report describes. - On that branch, the report is accurate: `Orchestrator.failJourney` (`internal/founding/privatepath.go`) logs the fault into the stand-up's event log, then ends with a discarded `_, _ = o.commitStandup(s)` — if that store write fails, both the fault and the log entry are lost, and the stand-up state falls back to whatever was last successfully committed. This matches the 2026-08-05T23:11:55Z "confirmed independently" comment's description closely (that comment's line numbers were slightly off relative to this branch's current tip, which is likely why the second triage pass couldn't reconcile it against `main`). **What needs deciding:** - `private-standup-polish` is an active branch with commits from another contributor as recently as today. Whether an agent should commit a fix directly onto that in-flight branch, or whether this should wait until it merges to `main`, is a coordination call — landing an uncoordinated fix on someone else's active branch risks conflicting with work already underway there. Routing to `ready-for-human` (previously `needs-info`) — the underlying bug is now confirmed and reproducible in code; where/how to land the fix needs a call given the branch is actively being developed.
Author
Owner

Ruled by Ben 2026-08-08 (decision sweep): keep the fault live, and log. When failJourney's commitStandup fails, the journey keeps serving the in-memory fault — no silent reset to the last pre-failure state — and the store error is logged alongside it. → ready-for-agent.

Ruled by Ben 2026-08-08 (decision sweep): **keep the fault live, and log.** When `failJourney`'s `commitStandup` fails, the journey keeps serving the in-memory fault — no silent reset to the last pre-failure state — and the store error is logged alongside it. → `ready-for-agent`.
Author
Owner

Fixed in ec615aa (on origin/main), following Ben's 2026-08-08 ruling — keep the fault live, and log.

failJourney (internal/founding/privatepath.go) no longer does _, _ = o.commitStandup(s). On a store-write failure it now:

  1. logs the store error into the same drill-in event log the screen reads (could not save the fault to disk — …), and
  2. publishes a rendered TERMINAL live-fault snapshot (new Orchestrator.liveFault) that StandupState serves in the failed store's place — so the journey shows the honest fault instead of silently resetting to the last successfully-saved (pre-failure) state.

A re-drive supersedes it: launchJourney clears liveFault, and the fault-retry path (vmRerun) always runs launchJourney before any other resting position.

Test-first at the founding seam (internal/founding/privatepath_test.go): TestPrivateStandup_FailJourneyKeepsFaultLiveWhenStoreWriteFails injects a faultSwallowStore that rejects exactly the fault-carrying save (the #275 scenario) while every pre-fault step-boundary save succeeds, drives the sops-admin bootstrap to fault, then asserts the fault survives, the store error is logged alongside it, and the failing row still renders red. Verified red before the fix (got <nil>), green after; full internal/founding suite + whole-tree Go gate (build/vet/test/lint) pass.

Fixed in ec615aa (on origin/main), following Ben's 2026-08-08 ruling — keep the fault live, and log. `failJourney` (internal/founding/privatepath.go) no longer does `_, _ = o.commitStandup(s)`. On a store-write failure it now: 1. logs the store error into the same drill-in event log the screen reads (`could not save the fault to disk — …`), and 2. publishes a rendered TERMINAL live-fault snapshot (new `Orchestrator.liveFault`) that `StandupState` serves in the failed store's place — so the journey shows the honest fault instead of silently resetting to the last successfully-saved (pre-failure) state. A re-drive supersedes it: `launchJourney` clears `liveFault`, and the fault-retry path (vmRerun) always runs `launchJourney` before any other resting position. Test-first at the founding seam (internal/founding/privatepath_test.go): `TestPrivateStandup_FailJourneyKeepsFaultLiveWhenStoreWriteFails` injects a `faultSwallowStore` that rejects exactly the fault-carrying save (the #275 scenario) while every pre-fault step-boundary save succeeds, drives the sops-admin bootstrap to fault, then asserts the fault survives, the store error is logged alongside it, and the failing row still renders red. Verified red before the fix (`got <nil>`), green after; full `internal/founding` suite + whole-tree Go gate (build/vet/test/lint) pass.
ben closed this issue 2026-08-08 22:13:09 +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#275
No description provided.