Plan doc for fixing the 41 bugs the YAGNI, DRY and KISS review found on the side. They are listed under "Bugs noticed in passing" at the end of each findings file of the code cleanup (in code-cleanup/), which leaves them out because its rule 3 forbids any change of behaviour. Deleted when its last workstream ships. A fix that changes what a design chapter describes updates that chapter in the same change; nothing else moves into the design.
Each of the 41 bugs is fixed, or found not to be one, or left as it is on purpose, and the handovers of the three workstreams together say which for every one of them. A fix comes with a test that fails without it.
Nothing is fixed yet. The review that found the bugs was made on 2026-11-10 at commit acfa0484. Of the files the bugs point to, only server.ts, api.ts, scratch-obeya.ts and core/types.ts have changed since (at commit 3321cd6e), by a few lines each, so the line numbers in the findings files still hold or are off by a few. Every bug was read from the code alone: none was reproduced, and some may turn out to be none.
The 41 lie in 14 findings files. 31 change behaviour; 10 concern only a comment or style (a doc comment above the wrong declaration, a constant between the imports, a bare git).
For the agent that takes a workstream:
codex exec) before the handover.
The three workstreams share no files. They can run at the same time, and each lands on its own.
Several bugs sit in code that a workstream of the code cleanup reworks. Since that plan may not change behaviour, its workstream would either have to keep the bug or would fix it without a test. So the cleanup workstreams named here start only once the workstream of this plan that fixes the bug has landed; code-cleanup.md says so as well.
| Bug | Finding | Cleanup workstream | Fixed in |
|---|---|---|---|
shutdown leaves holding and pushingMain; generation, tried, granted never shrink | A9, A10 | W12 | W1 |
A failing merge-base --is-ancestor counts as "not an ancestor" | E6 | W5 | W1 |
unlanded's unbatched pathspecs | E8 | W5 | W1 |
snooze accepts a time more than a year ahead | D12 | W6 | W1 |
rebuilt without the 100 ms delay | F11 | W6 | W1 |
A null body gives 500 | F9 | W16 | W1 |
changesCode reads git's quoted file names | F16 | W16 | W1 |
Rows of shared_changes/archive_changes never dropped | C9 | W7 | W1 |
commandWords splits a quote inside a word | S9 | W17 | W1 |
| Archiving a planned task with a branch | J2 | W9 | W1 |
The test teardowns (canvases, workers, freed()) | T2, T3, T4, T7 | W2, W3 | W1 |
useCopy only through navigator.clipboard | G17 | W20 | W2 |
| The minimap's colour | G8 (moves the minimap) | W20 | W2 |
showAck hides before the undo window ends | I8 | W19 | W2 |
openAddress opens the archive beside the search | G21 | W21 | W2 |
The phone ignores movedTo | G3, H1 | W21 | W2 |
fileTo writes to the canvas shown after the upload | H9 | W23 | W2 |
build.ts, check-app.ts, --say/--artifact read their arguments wrong | R2 | W25 | W3 |
director.ts imports Playwright statically | P1 | W24 | W3 |
runInput has no timeout | P3 | W24 | W3 |
tts.py --sample does not catch QuotaExhausted | P7 | W24 | W3 |
Cleanup workstreams not in the table (W1, W4, W8, W10, W11, W13, W14, W15, W18, W22) need not wait. Those that move code in a file a workstream here changes (W11 in workers.ts, W14 in canvas.ts) only meet merge conflicts, no conflict of behaviour.
src/server, in workers, workspaces-git-hosts, runtimes, canvas-coordinator, http-config, board-db, share-site-demo, core and tests, 23 in all:
workers.ts shutdown clears neither holding nor pushingMain, so after stopRepo the old instance can still start a session or push main; generation, tried and granted are never deleted.
workers.ts and replay.ts read any failure of git merge-base --is-ancestor (an unknown commit, a broken repository) as "not an ancestor". Each caller decides what "cannot tell" means for it; the test makes git fail.
replay.ts leaves the temp directory for change.patch behind on its failure paths.
commands.ts snooze accepts a time more than a year ahead, which canvas.ts refuses only after the owner heard the confirmation.
push.ts stamps a message with Date.now() instead of the class's clock.
server.ts: a body that is the JSON literal null gives 500 where the neighbouring routes answer 400; /api/app-update with rebuilt: true goes without the 100 ms delay that lets its answer out first.
self-update.ts changesCode reads file names in git's quoting, so a docs-only commit that touches a non-ASCII file name restarts Obeya.
revisions.ts throws a German literal that reaches the owner whatever the interface language; it becomes a message of the two tables in src/core/messages.ts.
db.ts: rows of shared_changes and archive_changes of a canvas never opened again are never dropped.
share.ts: commandWords splits --message="a b" at the space and keeps the quotes. A page of a tagging batch that the owner tagged while the session ran gets "not shared: no tags"; fixed only if a test can reproduce it.
workspaces.ts unlanded puts up to 1,000 pathspecs on one command line, longer than Windows takes, and reads the failure as "not landed". The test checks that each command line stays under 24,000 characters; it cannot run on Windows itself.
board.ts: archiving takes a planned task with a branch but no session (unstarted) as a stopped one, which the UI's stopped excludes. First check whether a direct request can reach that case past the other checks; if so, the server refuses it as the UI does.
canvas.test.ts starts in beforeEach and then overwrites, the fixture's afterEach without workers.shutdown(), and the harnesses that remove the directory without awaiting freed(). No test fails before; the evidence is that the suite leaves no timers or canvases running afterwards.
press (canvas.ts), tagOf (coordinator.ts) and redeem (remote.ts) above their declarations, and the constant between the imports of pr-watcher.ts. The bare git in forge.ts and site.ts stays for code cleanup W5 (E2).
src/ui, in ui-card, ui-panels and ui-small-modules, 8 in all. No test renders Canvas, Detail or the phone view, so each fix is also checked in a browser against a scratch Obeya:
shots.tsx fileTo writes the path and the upload count to whatever canvas is shown once the upload is done; it pins the draft's canvas as attachTo does.
copy.ts useCopy writes only through navigator.clipboard, so "Copy path", the share link's "Copy" and the setup's copy buttons do nothing on an insecure origin; they copy as copyOrSelect does.
tell.tsx showAck hides the line after 7 s even when the undo window is 8 s.
App.tsx openAddress opens the archive list without closing an open search.
parts.tsx: the minimap colours a card by shownState, like the card's sheet and the marks of a collapsed project.
phone.tsx follows an open card that moves to another canvas (movedTo), as the desktop does; wish stays ignored there, since the phone has no wish dialog.
api.ts (above standalone, and the first of the two on readTalk); no finding of the code cleanup covers them. The one in phone.tsx stays for code cleanup W21 (H15).
scripts/, plugin/ and .github/, in scripts-app and plugin, 10 in all:
scripts/build.ts without --out drops its first argument, so bun scripts/build.ts linux-x64 builds this machine's target.
scripts/check-app.ts takes the first argument without -- as the program, so --screenshot out.png <program> starts out.png.
scripts/scratch-obeya.ts --say and --artifact drop every word that starts with --.
.github/workflows/pages.yml publishes the site's player again only when its own files change, not when src/server/demo-page.ts or plugin/skills/demo/lib/locale.ts, which site/player.js is built from, do.
director.ts imports Playwright statically, so without Playwright node demo.ts and node revoice.ts fail at import before checkSetup can list what is missing.
tts.py --sample does not catch QuotaExhausted: a spent daily quota ends a sample in the settings with a traceback instead of the message.
browser.ts runInput has no timeout: an input step against a page that does not answer waits forever, where every other command gives up after 30 s.
initRepo in scratch-obeya.ts. The header of browser.ts stays for code cleanup W24 (P10), that of build.yml for W25 (R14).
shownState, as the card's sheet and a collapsed project's marks do (2026-11-10).
wish, having no wish dialog (2026-11-10).
share.ts is fixed only if it can be reproduced (2026-11-10).