chore(ship): disable biome useLiteralKeys + clear lint errors - #451
Open
sarath-soman wants to merge 1 commit into
Open
chore(ship): disable biome useLiteralKeys + clear lint errors#451sarath-soman wants to merge 1 commit into
sarath-soman wants to merge 1 commit into
Conversation
Biome's `useLiteralKeys` rule (auto-enabled via "recommended": true) rewrites
`process.env["X"]` → `process.env.X`. This directly conflicts with the
project's tsconfig flag `noPropertyAccessFromIndexSignature: true`, which
requires bracket notation on index-signature types. The conflict was causing
`bun scripts/am-i-done.ts` to block on ~150 mechanical lint findings that
can't actually be auto-fixed without breaking tsc.
Resolution:
- Disable `complexity.useLiteralKeys` in biome.json (incompatible with our
tsc strict config — the project's choice on tsc side is the source of truth)
- Hand-fix the 6 error-level lint findings biome was reporting:
- `server-sse.test.ts:203` — replace `!` non-null assertions with `as string`
- `topology-evolve.ts:279` — replace `eslint-disable` with `biome-ignore` for
the intentional yield-less async generator
- `RealiseDagGraph.tsx:66,73` — wrap `forEach((id, i) => Map.set(...))` in
braces (Map.set returns the map; forEach callbacks shouldn't return)
- `NowBar.tsx:34` — replace `<div role="region">` with `<section>` (per
a11y/useSemanticElements); update NowBar.test.tsx to query the new shape
- `JsonView.tsx:82` — `// biome-ignore lint/suspicious/noArrayIndexKey` (JSON
array order is stable; index is the only stable key)
- 5 import-sort auto-fixes applied by `biome check --write` (mechanical)
- `runs-root.test.ts:41` — escape literal `${HOME}` in test description so
biome doesn't read it as an unintended template literal
Unblocks the `am-i-done.ts` biome layer. Two remaining baseline layers
(no-throw violations in `capability-cleanup.ts`; tsc prototype-reach via
`gallery/entries.ts`) are out of scope here — separate concerns to be tracked.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
4 tasks
sarath-soman
added a commit
that referenced
this pull request
May 26, 2026
…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>
sarath-soman
added a commit
that referenced
this pull request
May 26, 2026
…header (#453) ## Summary - Productionises the `OutcomeHeader` prototype from `docs/capabilities/observe-a-run/design/prototype/OutcomeHeader.tsx` into `ship/src/web/lib/OutcomeHeader.tsx`. Three render branches (complete / failed / running) with explicit failing-phase prominence and aggregate cost/tokens/duration row. - Swaps it in for the legacy state-strip + `MetaGrid` block in `RunDetail.tsx` (lines 131-194). - Extends `RunDetail.test.tsx` with failed-run integration coverage (claims 7+8); guards `GlobalRegistrator.register()` so happy-dom tests compose in one `bun test` run. Closes #429. ## Why manual Produced by the SWE-pipeline implementer agent (run `2026-05-25-232338-issue-429`), which halted at impl on `bun scripts/am-i-done.ts` Claim 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: - #451 — chore: biome useLiteralKeys conflict cleared (biome rule vs tsconfig strict) - #452 — refactor: relocate design prototypes into \`src/gallery/\` (kills the tsc-prototype-reach noise; pairs with a Designer-character update for future runs) - #450 — feat: impl emits Claude session-id so \`ship run --resume\` continues in-context (turns cheap baseline-induced halts into actual resumes instead of \$8 re-runs) ## Test plan - [x] \`bun test src/web/lib/OutcomeHeader.test.tsx\` — claims 1-5, 9 (three branches mount, complete shape, failed shape with errorSummary, running shape with disabled Rerun, onRerun fires, static no-hex source scan) - [x] \`bun test src/web/pages/RunDetail.test.tsx\` — claims 7-8 (failed-run integration; failing-phase prominent) - [x] \`bun tsc --noEmit\` — no new errors (pre-existing prototype-reach errors unchanged; #452 will address them) - [x] Local dashboard at http://127.0.0.1:8080 — render verification once #451 merges (so the dev server's biome layer is clean) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
complexity.useLiteralKeysin biome.json — the rule rewritesprocess.env[\"X\"]→process.env.Xbut tsconfig hasnoPropertyAccessFromIndexSignature: true, which requires bracket notation. The rules directly conflict; tsc strict config wins as project truth.biome check --write.Surfaced while triaging the V-2 (#429) SWE-run halt on
am-i-done.ts. The biome layer was the noisiest; clearing it makes future SWE runs less likely to halt on pre-existing baseline noise.What this does NOT do
Two further baseline layers exist and are out of scope:
no-throw-in-sourceviolations insrc/lib/capability-cleanup.ts(2 throws) — needs proper neverthrow refactor of the function + callersdocs/capabilities/observe-a-run/design/prototype/*.tsxreachable viasrc/gallery/entries.ts— the prototypes live outsidesrc/so their imports don't resolve. The fix (per discussion) is relocating prototypes intosrc/gallery/rather than reaching out todocs/.Both will land as separate tracked work.
Test plan
bun scripts/am-i-done.ts— biome layer now passes (no errors, no warnings)bun test src/web/ui/NowBar.test.tsx— updated to query<section>shape instead of[role=\"region\"]; 8/8 passbun tsc --noEmit— no new errors introduced🤖 Generated with Claude Code