fix(sweep): a test that rotted behind a wrong excuse, and a box spec off by 2x - #480
Merged
Conversation
…off by 2x Three follow-ups from sweeping the earlier findings. Two of the four I had carried forward did NOT survive checking and are dropped: /api/control/dispatch is a real route, so the docs referencing it are correct; and scripts/test/push-notifications.ts exists. Verifying first is why this commit is smaller than the list that prompted it. 1. THE TEST NOBODY RAN, FOR A REASON THAT WAS NEVER TRUE scripts/test/push-notifications.ts read scripts/agent-hook-bridge.sh, which was deleted on 2026-06-11 in 956ccf6 ("delete the bash daemon and bridge files"). It threw ENOENT and the suite exited 1. Its entry in test-unit.ts SKIP said "needs push/web-push env — run manually". That was never the reason: every check in the file is a static file read and it needs no environment at all. A wrong skip reason is worse than no skip. It answers the question that would have found the bug, so the red looked accounted for and nobody looked again for three months. Retargeted rather than deleted. The behaviour moved instead of going away — a closing run reaches the operator through notify-close.ts → pushToUser → push-fanout — and scripts/test/notify-close.ts covers that module without mentioning push at all. So "an agent finished, tell the operator" was asserted by nobody. Deleting the check would have quietly ratified that hole. Removed from SKIP, so it now runs in test:unit (132/132) and therefore in CI. Mutation-proven: renaming the pushToUser call fails with "notify-close must call pushToUser" (exit 1); restored, exit 0. 2. THE BOX IS HALF THE MACHINE THE DOCS DESCRIBE Measured 2026-09-04: nproc 4, 7746 MiB, 75 G disk, 4 GB swap. That is a CX33. Three docs said CX43, 8 vCPU / 16 GB, 40 GB disk — every figure but the swap wrong, in the direction that matters: planning against 16 GB on an 8 GB box is how you meet the OOM killer. src/app/api/system/hetzner/route.ts has said "the box is a cx33" all along, so this was code and docs disagreeing with the code being right. Note the shape of the drift: CPU and RAM went DOWN while disk went UP (40→75), which is what a disk-inclusive rescale to a smaller tier looks like — plausibly to escape the disk-full problem the old caveat describes. The June runbook entry is kept as history and marked superseded rather than rewritten. The docs now point at /api/system/hetzner instead of restating numbers. A hardcoded spec is a second source of truth that rots silently, which is exactly what happened here between June and September. 3. THE COMPOSER STATUS, FINISHED #479 gave this line its own row below `sm` but kept `sm:truncate`, which left it at 57% on a 1440 viewport — "Autopilot on: queue is empty, so FleetCr…". That is the same defect as the phone's 14%, just less obvious, and there is no `title` here so the remainder is unreachable at every width. It now wraps everywhere. Costs one toolbar line when the sentence is long; truncating cost the half of the sentence that says what will happen. pnpm run verify passes (repo moved to pnpm in #478). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UvjGNAS9CMfEGNW26tUR4P
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.
Follow-ups from sweeping the earlier findings. Two of the four I carried forward did not survive checking and are dropped:
/api/control/dispatchis a real route (so the docs referencing it are correct), andscripts/test/push-notifications.tsexists. Verifying first is why this PR is smaller than the list that prompted it.1. A test nobody ran, for a reason that was never true
scripts/test/push-notifications.tsreadscripts/agent-hook-bridge.sh— deleted 2026-06-11 in956ccf64("delete the bash daemon and bridge files"). It threw ENOENT and the suite exited 1.Its entry in
test-unit.tsSKIPsaid "needs push/web-push env — run manually". That was never the reason: every check in the file is a static file read and it needs no environment at all.Retargeted, not deleted. The behaviour moved rather than went away: a closing run reaches the operator via
notify-close.ts→pushToUser→push-fanout. Andscripts/test/notify-close.tscovers that module without mentioning push at all — so "an agent finished, tell the operator" was asserted by nobody. Deleting the check would have quietly ratified that hole.Removed from
SKIP, so it now runs intest:unit(132/132) and therefore in CI.Mutation-proven: renaming the
pushToUsercall → exit 1,notify-close must call pushToUser. Restored → exit 0.2. The box is half the machine the docs describe
Measured 2026-09-04:
nproc4,free -m7746 MiB,df -h /75 G, swap 4095 MiB. That is a CX33.Three docs said CX43, 8 vCPU / 16 GB, 40 GB disk — every figure but the swap wrong, in the direction that matters: planning against 16 GB on an 8 GB box is how you meet the OOM killer.
src/app/api/system/hetzner/route.tshas said "the box is a cx33" all along — code and docs disagreeing, with the code right.Note the shape of the drift: CPU and RAM went down while disk went up (40→75), which is what a disk-inclusive rescale to a smaller tier looks like — plausibly to escape the disk-full problem the old caveat describes. The June runbook entry is kept as history and marked superseded rather than rewritten.
The docs now point at
/api/system/hetznerinstead of restating numbers. A hardcoded spec is a second source of truth that rots silently — exactly what happened between June and September.3. The composer status, finished
#479 gave this line its own row below
smbut keptsm:truncate, leaving it at 57% on a 1440 viewport — "Autopilot on: queue is empty, so FleetCr…". Same defect as the phone's 14%, just less obvious, and there is notitlehere so the remainder is unreachable at every width. It now wraps everywhere: costs one toolbar line when the sentence is long, where truncating cost the half of the sentence that says what will happen.Verification
pnpm run verify— exit 0 (repo moved to pnpm in #478; installed with--frozen-lockfilefirst).🤖 Generated with Claude Code
https://claude.ai/code/session_01UvjGNAS9CMfEGNW26tUR4P