feat(ship): observe-a-run V-2 — OutcomeHeader replaces meta-grid run header - #453
Conversation
|
Status (2026-05-26): merge-conflict with main; deferred pending re-run. The V-2 implementation (commit 540b696 on this branch) was authored against a main that didn't yet have:
Two files conflict on rebase: The impl agent halted on over-scoped claim gates (Claims 6 + 10 cover project-wide typecheck + lint, which fail on pre-existing unrelated red — tracked at #451 / lambda-brahman/ship#3). All 8 in-scope claim gates (1–5, 7–9) pass. Two paths to land V-2A. Resolve conflicts + merge as-is. Manual rebase of this branch on current main, resolve the two conflicting files (RunDetail's header section + its test fixture), force-push, merge. Faster but commits to V-2's specific impl. B. Re-run V-2 from scratch via the orchestrator. Close this PR; re-fire Path B is more honest given how much main moved since 540b696. Path A is cheaper if the conflict is small (it is — just RunDetail's render branch). Operator's call. |
…header
Productionises the OutcomeHeader prototype (per design.md sub-flow 2) and
swaps it in for the legacy state-strip + MetaGrid block in RunDetail at
lines 131-194. Three render branches (complete / failed / running):
- complete → state pill, output-links row (PR anchors), aggregate
`{duration} · ${cost} · {tokens}` in mono muted-text
- failed → pill `failed · <phase>` (failing phase prominent per V-2
acceptance), alert block with errorSummary line
- running → pill `running · <phase>`, no output line, Rerun disabled
Source: `docs/capabilities/observe-a-run/design/prototype/OutcomeHeader.tsx`
(prototype shape preserved verbatim; imports rewired to in-package paths).
Phase / errorSummary / aggregates derived from the existing RunDetail
payload + telemetry:
- headerPhase: r.current_phase ∥ r.failed_at_stage ∥ r.halted_at_stage
- errorSummary: r.failed_reason ∥ r.halted_reason
- aggregates: sum of per-stage telemetry (existing data path)
Conflict + rerunError banners remain outside the header.
Test coverage:
- new OutcomeHeader.test.tsx — claims 1 (three branches mount), 2 (complete
shape), 3 (failed shape), 4 (running shape), 5 (onRerun fires), 9 (static
no-hex source scan)
- extended RunDetail.test.tsx — claims 7+8 (failed-run integration);
GlobalRegistrator.register() now guarded behind a document-presence check
so it composes with NowBar.test.tsx in a single bun test run
Closes #429.
This PR was produced by the SWE-pipeline implementer agent (run
`2026-05-25-232338-issue-429`) but the pipeline halted at impl on Claim 10
(`bun scripts/am-i-done.ts`) because of pre-existing baseline lint/throw
violations in unrelated files. All 9 in-scope claims (1-9) passed:
- bun test src/web/lib/OutcomeHeader.test.tsx → green (claims 1-5, 9)
- bun tsc --noEmit → no new errors
- bun test src/web/pages/RunDetail.test.tsx → green (claims 7-8)
- biome check on the four touched files → clean (claim 6 spirit)
Committing manually so the work ships while baseline cleanup proceeds
separately. Related cleanup tickets:
- #451 (chore: biome useLiteralKeys conflict cleared) — first layer
- #452 (refactor: relocate prototypes into src/gallery/) — second layer (tsc)
- #450 (feat: impl emits session-id so --resume continues in-context) —
prevents the next round of cheap-halt-recovery from costing $8 in tokens
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
540b696 to
24290e0
Compare
Summary
OutcomeHeaderprototype fromdocs/capabilities/observe-a-run/design/prototype/OutcomeHeader.tsxintoship/src/web/lib/OutcomeHeader.tsx. Three render branches (complete / failed / running) with explicit failing-phase prominence and aggregate cost/tokens/duration row.MetaGridblock inRunDetail.tsx(lines 131-194).RunDetail.test.tsxwith failed-run integration coverage (claims 7+8); guardsGlobalRegistrator.register()so happy-dom tests compose in onebun testrun.Closes lambda-brahman/ship#21.
Why manual
Produced by the SWE-pipeline implementer agent (run
2026-05-25-232338-issue-429), which halted at impl onbun scripts/am-i-done.tsClaim 10 due to pre-existing baseline lint/throw violations in unrelated files — not caused by this change. All 9 in-scope claims passed. Committing manually so V-2 ships while the baseline-cleanup tickets proceed in parallel.Companion tickets that came out of the halt diagnosis:
Test plan
🤖 Generated with Claude Code