Backlog item §B · B1 — mirrored from docs/roadmap/improvements-backlog.md.
What the audit found
— the headline refactor; full spec in
architecture-decisions §3. Duplicated pairs to
collapse (verified line ranges): dispatch switches (main.swift:949-1291 /
LinuxHost/main.swift:65-343), screenshot-series loops (main.swift:911-945
/ LinuxHost/main.swift:32-63), trace ring (main.swift:1293-1305 /
LinuxHost/main.swift:345-357), flow replay (main.swift:1204-1230 /
LinuxHost/main.swift:262-284), report bundle (main.swift:1189-1203 /
LinuxHost/main.swift:250-261 — shapes already diverged), error ladders
(main.swift:1243-1290 / LinuxHost/main.swift:293-342), sensitive-diag
gate, target validation (3 copies + JS), screenshot bounds, syscall shims
(Transport.swift:387-407 / CDP.swift:278-288).
Milestone: Phase 2 — One host, written once
Before changing behaviour here, read docs/roadmap/what-is-excellent.md — the contracts listed there must survive the fix — and AGENTS.md for build, test, and review conventions.
Definition of done: the change ships with the test named above (or an equivalent), CI is green, and the corresponding line in the backlog file is checked off in the same PR.
What the audit found
— the headline refactor; full spec in
architecture-decisions §3. Duplicated pairs to
collapse (verified line ranges): dispatch switches (
main.swift:949-1291/LinuxHost/main.swift:65-343), screenshot-series loops (main.swift:911-945/
LinuxHost/main.swift:32-63), trace ring (main.swift:1293-1305/LinuxHost/main.swift:345-357), flow replay (main.swift:1204-1230/LinuxHost/main.swift:262-284), report bundle (main.swift:1189-1203/LinuxHost/main.swift:250-261— shapes already diverged), error ladders(
main.swift:1243-1290/LinuxHost/main.swift:293-342), sensitive-diaggate, target validation (3 copies + JS), screenshot bounds, syscall shims
(
Transport.swift:387-407/CDP.swift:278-288).Milestone: Phase 2 — One host, written once
Before changing behaviour here, read
docs/roadmap/what-is-excellent.md— the contracts listed there must survive the fix — andAGENTS.mdfor build, test, and review conventions.Definition of done: the change ships with the test named above (or an equivalent), CI is green, and the corresponding line in the backlog file is checked off in the same PR.