Public: anyone can read this; the crew can change it.

Sentinel: shared:01m23vygyffx5hg2f5vm8r74sr:10bdvndtlg is past its budget: trevato/forge: "each page stays inside its first-view budget" failed on 3 pulls in the last hour — the lane's red, not … #17106

opened this

Merged 2d 4h ago, live in production

The first-view budget test now counts /system the same way no matter which test file ran first in the process. The red was not caused by load, disk or the clock; it came from process-wide state. Cause.

Notes

opened this

The first-view budget test now counts /system the same way no matter which test file ran first in the process. The red was not caused by load, disk or the clock; it came from process-wide state.

Cause. src/keeper/at_boot.ts keeps what the release keeper said at boot, for the whole process. The footing section on /system lists it under "Needs a hand outside the forge" as one item: "releases: nothing cuts or promotes one unattended; <why>". bun test runs files in one process, so when an earlier file notes the keeper as off (booting main.ts does this), /system gains 11 or 12 words and one block. That is the sentinel's system @390: words 268 > budget 256, blocks 82 > budget 81. I reproduced it here by noting the keeper off in a file run before test/attention.test.ts: 267/82 against 256/81.

Fix. pinnedSystem in test/helpers/first-views.ts now also removes the #sys-outside list, the same way it already pins the host's cap lines and the background readings. The budget stays what a fresh process draws, so docs/design/attention-budget.json is unchanged. The page itself is unchanged too: an owner whose keeper is off still sees the line.

Test. I added a test to test/attention.test.ts that notes the keeper off, reads /system again, and checks that the pinned page counts the same as the measured one at both widths. It fails without the helper change. It sets the keeper state back to nothing afterwards, as test/meter-watch.test.ts does.

Not done. I didn't move the keeper's boot state out of module scope. That changes how main.ts reports it, which is more than this flake needs.

Checks run. The gate passed all 32 rules, and bun x tsc --noEmit passed. These test files passed, 73 tests: attention, attention-stamped, meter-watch, module-state, global-spies-restored, test-honesty, unused-exports, flake and helpers. scripts/fast.ts named 136 files (about 11 minutes, more than this run allows), so the rest are left to the forge's check. Running the probe file before test/attention.test.ts now passes.

To try it: write a test file whose top level calls noteKeeperAtBoot({ on: false, why: "FORGE_RELEASE_KEEPER is not on" }), then run bun test <that file> test/attention.test.ts. It was red on main and is green on this branch.

🤖 Generated with Claude Code

Closes #17087

commented

The first-view budget test now counts /system the same way no matter which test file ran first in the process. The red was not caused by load, disk or the clock; it came from process-wide state.

Cause. src/keeper/at_boot.ts keeps what the release keeper said at boot, for the whole process. The footing section on /system lists it under "Needs a hand outside the forge" as one item: "releases: nothing cuts or promotes one unattended; <why>". bun test runs files in one process, so when an earlier file notes the keeper as off (booting main.ts does this), /system gains 11 or 12 words and one block. That is the sentinel's system @390: words 268 > budget 256, blocks 82 > budget 81. I reproduced it here by noting the keeper off in a file run before test/attention.test.ts: 267/82 against 256/81.

Fix. pinnedSystem in test/helpers/first-views.ts now also removes the #sys-outside list, the same way it already pins the host's cap lines and the background readings. The budget stays what a fresh process draws, so docs/design/attention-budget.json is unchanged. The page itself is unchanged too: an owner whose keeper is off still sees the line.

Test. I added a test to test/attention.test.ts that notes the keeper off, reads /system again, and checks that the pinned page counts the same as the measured one at both widths. It fails without the helper change. It sets the keeper state back to nothing afterwards, as test/meter-watch.test.ts does.

Not done. I didn't move the keeper's boot state out of module scope. That changes how main.ts reports it, which is more than this flake needs.

Checks run. The gate passed all 32 rules, and bun x tsc --noEmit passed. These test files passed, 73 tests: attention, attention-stamped, meter-watch, module-state, global-spies-restored, test-honesty, unused-exports, flake and helpers. scripts/fast.ts named 136 files (about 11 minutes, more than this run allows), so the rest are left to the forge's check. Running the probe file before test/attention.test.ts now passes.

To try it: write a test file whose top level calls noteKeeperAtBoot({ on: false, why: "FORGE_RELEASE_KEEPER is not on" }), then run bun test <that file> test/attention.test.ts. It was red on main and is green on this branch.

🤖 Generated with Claude Code

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs