Skip to content

fix(sweep): a test that rotted behind a wrong excuse, and a box spec off by 2x - #480

Merged
github-actions[bot] merged 1 commit into
mainfrom
fix/sweep-followups
Sep 4, 2026
Merged

fix(sweep): a test that rotted behind a wrong excuse, and a box spec off by 2x#480
github-actions[bot] merged 1 commit into
mainfrom
fix/sweep-followups

Conversation

@catomean

@catomean catomean commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

Follow-ups from sweeping the earlier findings. Two of the four I 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 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.ts read scripts/agent-hook-bridge.shdeleted 2026-06-11 in 956ccf64 ("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. The red looked accounted for, so nobody looked again for three months.

Retargeted, not deleted. The behaviour moved rather than went away: a closing run reaches the operator via notify-close.tspushToUserpush-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 → exit 1, notify-close must call pushToUser. Restored → exit 0.

2. The box is half the machine the docs describe

Measured 2026-09-04: nproc 4, free -m 7746 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.ts has 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/hetzner instead 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 sm but kept sm: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 no title here 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-lockfile first).

🤖 Generated with Claude Code

https://claude.ai/code/session_01UvjGNAS9CMfEGNW26tUR4P

…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
@github-actions
github-actions Bot merged commit 1647fe7 into main Sep 4, 2026
3 checks passed
@github-actions
github-actions Bot deleted the fix/sweep-followups branch September 4, 2026 11:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant