Server bugs noticed in passing, fixed
The code review turned up 23 small bugs in Obeya's server and its tests. 22 are fixed on this branch; one (a bare git call) is left to the code cleanup, which rewrites those lines anyway.
17 / 17new tests fail on
main's code and pass here670 → 0agent workers left running after the test files
106 → 0canvases left running after the test files
Fixed, each with a test that failed before
Each test was run twice: once against the code of main, once against this branch.
| Bug and what changed | main | this branch |
|---|---|---|
| Workers shut down left two timers running After a repository's workers restart, the old instance could still deliver held demo comments (starting a session the new workers don't know of) and push main past its undo window. Shutdown now clears both. | fails | passes |
| Per-card memory never shrank The workers' run counters, app-tried times and one-time permission grants stayed for every card ever worked on. They now go once the card is deleted or archived. | fails | passes |
| A git error read as "not an ancestor" At a review card's handover, any failure of git's ancestry check told the agent the contributor had pushed since. A PR head the workspace lacks still says that; any other failure now says git could not tell, with git's words. The replay recorder keeps treating it as a rewritten head, which replays onto any history. | fails | passes |
| Replay left temp folders behind A rewritten commit that failed to apply left its patch folder in the temp directory. It is now removed on every path. | fails | passes |
| Snooze by voice: more than a year ahead The assistant confirmed a snooze two years out, and the card logged an error only after the undo window. It is now refused before the owner hears a confirmation, like a new card's start time. | fails | passes |
| Push notifications ignored the clock Their timestamp came from the system clock instead of the push service's own clock. | fails | passes |
A body of null crashed a routeRoutes that read fields from the request body answered 500 to the JSON literal null; they now answer 400 like invalid JSON. | fails | passes |
| Rebuilt app shell could miss its answer With no worker busy, the update could end the server before the shell got its reply. It now waits 100 ms like its neighbouring routes. | fails | passes |
| Docs commit with an umlaut restarted Obeya A docs-only commit touching a file such as docs/Übersicht.md counted as code, because git quoted the name. Names are now read unquoted. | fails | passes |
| German error text in an English interface "der Agent hat keinen neuen Text geliefert" reached English users when a proposal revision failed. It is now in both string tables. | fails | passes |
| Change logs of an unused canvas grew forever Rows logged for a canvas that is never opened again were never dropped. Both logs now start empty with each Obeya, since every canvas reads afresh when it opens. | fails | passes |
Deploy line split a quoted value--message="a b" came apart at the space and kept its quotes. The deploy now uses the command-line splitter that handles quotes anywhere. | fails | passes |
| "Not shared: no tags" for a page the owner had tagged In a tagging run, a page the owner tagged meanwhile still got that error line. Reproduced, then fixed. | fails | passes |
| Freeing a clone: command line too long for Windows Checking whether a squashed branch landed put up to 1,000 file paths on one git command line (84,000 characters in the test); Windows takes about 32,000. It now asks in batches under 24,000. | fails | passes |
| Archive took a never-started card as stopped A task built on a prototype that no agent has worked on yet could be archived by a direct request (where its repository did not run on the canvas). The button never offered it; the server now refuses it too. | fails | passes |
Test hygiene: what the test files leave running
Counted at the end of each server test file, before (main) → after (this branch). No test failed before; this is the evidence instead.
| Test file | Workers | Canvases | Timers ≥ 50 ms |
|---|---|---|---|
canvas.test.ts | 10 → 0 | 5 → 0 | 0 → 0 |
commands.test.ts | 0 → 0 | 0 → 0 | 1 → 1 |
coordinator.test.ts | 77 → 0 | 0 → 0 | 0 → 0 |
pr-watcher.test.ts | 34 → 0 | 0 → 0 | 0 → 0 |
remote.test.ts | 23 → 0 | 23 → 0 | 1 → 1 |
server.test.ts | 78 → 0 | 78 → 0 | 0 → 0 |
wish.test.ts | 0 → 0 | 0 → 0 | 2 → 2 |
work-retro.test.ts | 9 → 0 | 0 → 0 | 0 → 0 |
workers-demo.test.ts | 98 → 0 | 0 → 0 | 3 → 0 |
workers-evict.test.ts | 4 → 0 | 0 → 0 | 0 → 0 |
workers-files.test.ts | 5 → 0 | 0 → 0 | 0 → 0 |
workers-landing.test.ts | 125 → 0 | 0 → 0 | 0 → 0 |
workers-worktrees.test.ts | 86 → 0 | 0 → 0 | 0 → 0 |
workers.test.ts | 121 → 0 | 0 → 0 | 2 → 0 |
| All 78 server test files | 670 → 0 | 106 → 0 | 9 → 4 |
The four timers left are bounded (a 60 s push window, two 90 s fallbacks of the wish writer) except one: the assistant's usage-limit queue is not stopped when its canvas closes. That gap is outside these bugs and is proposed as a card of its own.
Fixed without a failing test
- Doc comments moved back above the code they describe (
press,tagOf,redeem), and a constant out from between imports. - The test teardowns above: the canvas tests, the workers fixture and three harnesses now shut down what they start and wait for git before deleting their folders; five more test files got the same teardown.
Left on purpose
- The bare
gitinforge.tsandsite.ts: code cleanup W5 replaces those calls.