Repository navigation
Audit follow-up: correctness, SDK consolidation, and product simplification #4230
Description
Purpose and scope
Track every actionable change from the repository-wide audit and the follow-up Node SDK / napi-rs review. This batch contains 32 new implementation/proposal issues and two existing issues extended or reopened, covering 34 distinct work items. The Work journal ceiling and full-history replay cost share one issue because they need a coherent current-state/history redesign.
Evidence is pinned to 30c23baa1967d4bb04aee3f20deb7a19f302ba61 and revalidated against master at 5daa37d1a3db617238e4503e920cb823a5c28a08. Each issue identifies its source, impact, evidence limits, proposed change, and behavioral acceptance criteria.
The audit used source tracing and isolated Python, Node, SQLite, and OS-pipe probes where stated. It did not run Rust builds or suites because Bazel and rustc were unavailable. Architecture and product proposals are explicitly identified; source counts alone are not evidence of measured non-use, binary size, or runtime cost.
Priorities: 9 P1 items address high-impact correctness or validation failures; 21 P2 items address remaining correctness, architecture, and measurement work; 4 P3 items address product/default-surface simplification. These are review priorities, not measured incident severity.
Recommended execution order
- Ship the P1 fixes as focused behavioral changes. Provider cancellation, physical-root ownership, diagnostic fidelity, and run attribution should not wait for a broad rewrite.
- Repair evaluation identity, lifecycle, artifact selection, and outcome checks before using the product-wide benchmark to justify scope decisions: Bind hermetic eval results to the exact run and propagate setup/agent failures #4204, Bootstrap an isolated daemon for real-model memory evals and always finalize cleanup #4205, Finish eval and platform build cutover with shipping artifact and dependency patch parity #4206, and Separate verified task outcomes from adoption and routing scores #4216 feed Extend prior outcome evals into product-wide task effectiveness and total-cost baselines #4219.
- Co-design the Work current-state/history boundary (Remove Work's 10,000-event write ceiling and full-history replay from current operations #4199) with scope independence (Redesign Work scope selection so unrelated scoped events do not freeze current work #4215). Preserve authorization, durable receipts, version semantics, and restart recovery.
- Fix SDK stream semantics (Cancel the TypeScript SDK response body when an operation stream iterator is closed #4209–Recognize unavailable as a terminal operation-stream event in both SDKs #4211), remove the server-adapter dependency (Remove the Rust SDK's server-adapter dependency by relocating shared protocol constants #4224), then migrate the Node implementation through napi-rs (Consolidate the Node SDK onto shared Rust client logic through a thin napi-rs binding #4226). Coordinate HTTP/MCP ownership (Simplify the extension's daemon client boundary across HTTP and MCP operations #4225) without broadening operation admission. The target remains a client of the existing daemon.
- Continue the existing native runtime cutover (Finish the native Asupersync runtime cutover #3736) with the added supervision and bounded-wait requirements. Keep its established baseline and behavioral gates.
- Implement independent UI/counter/distribution simplifications and evaluate larger Work/default-grammar choices using retained user journeys and measured costs.
Prior work reused
- Finish the native Asupersync runtime cutover #3736 remains open: appended the current audit's execution, cancellation, and storage-wait findings to the existing native runtime cutover.
- Remove the worldwide token counter entirely while preserving local metrics #3619 reopened: its owner-approved worldwide-counter removal remains incomplete or has been reintroduced in the audited production paths. The original local-metrics and update protections remain.
- Follow-ups acknowledge completed Consolidate overlapping tool and dashboard discovery without losing callability or semantics #3653, Share canonical Work envelope and problem decoding with the dashboard #3448, feat(ui-code): add Atlas, Topology, and Trace views #1282, Qualify powerful Work and Remote Brain journeys before optional packaging decisions #3656, Rust CI checks and contract generation still bypass Bazel #3176, Qualify learned-skill outcomes while preserving evaluation and automation safety #3654, and Evaluate optional repeated-query and Scout guidance on real task outcomes #3655 where relevant. They target remaining implementation/scope rather than recreating those completed tasks.
P1 — correctness and evaluation integrity
- Enforce managed worktree exclusivity across actors and authority revisions #4198 — P1 · bug — Enforce managed worktree exclusivity across actors and authority revisions
- Remove Work's 10,000-event write ceiling and full-history replay from current operations #4199 — P1 · bug — Remove Work's 10,000-event write ceiling and full-history replay from current operations
- Keep provider output draining within the attempt deadline and cancellation lifecycle #4200 — P1 · bug — Keep provider output draining within the attempt deadline and cancellation lifecycle
- Keep Codex's blocking session independent of its cancellation coordinator #4201 — P1 · bug — Keep Codex's blocking session independent of its cancellation coordinator
- Preserve TypeScript diagnostics from paths containing parentheses and reject false-clean parses #4202 — P1 · bug — Preserve TypeScript diagnostics from paths containing parentheses and reject false-clean parses
- Remove cross-port leakage of the dashboard's reusable authentication cookie #4203 — P1 · bug — Remove cross-port leakage of the dashboard's reusable authentication cookie
- Bind hermetic eval results to the exact run and propagate setup/agent failures #4204 — P1 · bug — Bind hermetic eval results to the exact run and propagate setup/agent failures — merged in fix(evals): score only exact-run transcripts and preserve agent failures #4247
- Bootstrap an isolated daemon for real-model memory evals and always finalize cleanup #4205 — P1 · bug — Bootstrap an isolated daemon for real-model memory evals and always finalize cleanup
- Finish eval and platform build cutover with shipping artifact and dependency patch parity #4206 — P1 · refactor — Finish eval and platform build cutover with shipping artifact and dependency patch parity
Runtime and Work design
- Preserve Work storage failure causes and classify version conflicts narrowly #4207 — P2 · bug — Preserve Work storage failure causes and classify version conflicts narrowly
- Persist scheduler pause state atomically across readers and crashes #4208 — P2 · bug — Persist scheduler pause state atomically across readers and crashes
- Redesign Work scope selection so unrelated scoped events do not freeze current work #4215 — P2 · proposal — Redesign Work scope selection so unrelated scoped events do not freeze current work
- Reduce Work/Workflow default footprint and ownership overlap while preserving qualified journeys #4223 — P2 · proposal — Reduce Work/Workflow default footprint and ownership overlap while preserving qualified journeys
- Finish the native Asupersync runtime cutover #3736 — P2 · refactor — Finish the native Asupersync runtime cutover (updated existing issue)
SDK and daemon-client boundaries
- Cancel the TypeScript SDK response body when an operation stream iterator is closed #4209 — P2 · bug — Cancel the TypeScript SDK response body when an operation stream iterator is closed — merged in fix(sdk): close abandoned SSE responses when a watcher stops #4246
- Apply the SDK reconnect budget to connection failures and align Rust and TypeScript iteration semantics #4210 — P2 · bug — Apply the SDK reconnect budget to connection failures and align Rust and TypeScript iteration semantics
- Recognize unavailable as a terminal operation-stream event in both SDKs #4211 — P2 · bug — Recognize unavailable as a terminal operation-stream event in both SDKs
- Remove the Rust SDK's server-adapter dependency by relocating shared protocol constants #4224 — P2 · refactor — Remove the Rust SDK's server-adapter dependency by relocating shared protocol constants
- Simplify the extension's daemon client boundary across HTTP and MCP operations #4225 — P2 · proposal — Simplify the extension's daemon client boundary across HTTP and MCP operations
- Consolidate the Node SDK onto shared Rust client logic through a thin napi-rs binding #4226 — P2 · proposal — Consolidate the Node SDK onto shared Rust client logic through a thin napi-rs binding
Code intelligence and memory correctness
- Make rename collision diagnostics scope-aware instead of blocking on any matching spelling #4214 — P2 · bug — Make rename collision diagnostics scope-aware instead of blocking on any matching spelling
- Include lexical caller scope in cached Ruby cross-file resolution #4227 — P2 · bug — Include lexical caller scope in cached Ruby cross-file resolution
- Enforce LCM context budgets in model tokens instead of whitespace words #4228 — P2 · bug — Enforce LCM context budgets in model tokens instead of whitespace words
Dashboard correctness and simplification
- Move Cortex layout off the UI thread and bound its all-pairs computation #4212 — P2 · bug — Move Cortex layout off the UI thread and bound its all-pairs computation
- Converge dashboard response handling and propagate cancellation through structure queries #4213 — P2 · refactor — Converge dashboard response handling and propagate cancellation through structure queries
- Run the full dashboard typecheck in required CI #4217 — P2 · bug — Run the full dashboard typecheck in required CI — implementation in ci: shorten feedback waits and typecheck frontend consumers #4260
- Reduce dashboard navigation and Work projection footprint around demonstrated user tasks #4220 — P3 · proposal — Reduce dashboard navigation and Work projection footprint around demonstrated user tasks
- Delete the unmounted Atlas view from production Code navigation and state #4221 — P3 · refactor — Delete the unmounted Atlas view from production Code navigation and state — implementation in refactor(code): remove the unmounted Atlas view #4273
- Simplify ordinary settings edits while preserving revision and authorization guarantees #4222 — P3 · refactor — Simplify ordinary settings edits while preserving revision and authorization guarantees
Evaluation, distribution, and product scope
- Separate verified task outcomes from adoption and routing scores #4216 — P2 · refactor — Separate verified task outcomes from adoption and routing scores
- Remove the unpublished-crate distribution battery and retain real release smoke coverage #4218 — P2 · refactor — Remove the unpublished-crate distribution battery and retain real release smoke coverage
- Extend prior outcome evals into product-wide task effectiveness and total-cost baselines #4219 — P2 · proposal — Extend prior outcome evals into product-wide task effectiveness and total-cost baselines
- Make additional niche grammar sets opt-in based on measured quality, demand, and build cost #4229 — P3 · proposal — Make additional niche grammar sets opt-in based on measured quality, demand, and build cost
- Remove the worldwide token counter entirely while preserving local metrics #3619 — P2 · bug — Remove the worldwide token counter entirely while preserving local metrics (reopened existing issue)
Implementation progress — 2026-10-18
- Cancel the TypeScript SDK response body when an operation stream iterator is closed #4209: PR #4246 merged at 07:17 UTC, merge
0fa6ce80654051fb21fdf0f50054d55f95d02127. The generated extension bundle is committed, and the issue is closed as completed. PR verification records the SDK lifecycle regressions, original-error preservation, 45 SDK tests, typecheck/build and embedded checks; this does not claim the separately excluded installed-package suite ran. - Bind hermetic eval results to the exact run and propagate setup/agent failures #4204: PR #4247 merged at 06:56 UTC, merge
82ec8fd92bb530d00acecabad3e1e408c83d5e3d. The issue is closed as completed. Exact session/project identity, actual process exits, duplicate scenario labels, invalid prompts and scorecard identity are covered by the retained read-only hermetic regression workflow. - Run the full dashboard typecheck in required CI #4217: PR #4260 adds the full dashboard typecheck plus SDK types/tests, releases frontend checks from the Rust-gate dependency, moves commit lint early, and configures Bazel before first use. In run 39108248835, the new typechecks and SDK tests, existing frontend checks, repository gates and feature gate executed and passed. The later
ad5f9577commit only restores an unrelated Hermes comment; its exact-revision CI must finish before a full-pass claim. No test coverage, timeout or compiler policy was weakened. - Delete the unmounted Atlas view from production Code navigation and state #4221: PR #4273 removes Atlas's currently unmounted state and pending-only branches. Old links open Cortex and preserve symbol/scope parameters. Five isolated behavior tests and a strict standalone typecheck of the actual new module passed; full dashboard/Vitest verification remains required.
The two new PRs remain unchecked until merged with the applicable evidence. Other checklist dispositions have not been changed by this update; absence of a checkmark is not a claim that no parallel implementation exists.
Completion
Resolve each linked work item through its stated behavioral acceptance criteria, or record an explicit, evidence-backed decision to defer or decline a proposal. Keep this checklist aligned with those dispositions. Correctness fixes must retain the protected behaviors called out in their issues; migrations should remove their superseded implementations when the production cutover is complete.
Activity