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

The release tick's gate passes on main's tip: test/attention.test.ts "each page stays inside its first-view budget" fails there and passes alone #15510

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

The attention test failed in the release tick's gate because that gate runs with the version stamp set (FORGEVERSION and FORGECOMMIT), not because of another test file. The test now unsets the stamp while it draws its pages, so it counts the same alone, after any other file, and in a stamped gate. What differed (1).

Notes

shipped production is serving it deploy 3fede26

opened this

The attention test failed in the release tick's gate because that gate runs with the version stamp set (FORGE_VERSION and FORGE_COMMIT), not because of another test file. The test now unsets the stamp while it draws its pages, so it counts the same alone, after any other file, and in a stamped gate.

What differed (1). Since #15361 (2026-11-21, after v0.7.629), /changelog opens with "Nothing has gone live yet. Running …", and that line is built from running(), which reads process.env. Unstamped it says "Running a development build"; stamped, the way the Dockerfile stamps a release, it says "Running 0.7.629 · commit abc1234". That is one word more: 19 against the budget's 18 at both widths. Running bun test test/attention.test.ts with both variables set gives exactly that failure. Either one alone does not, because the line needs both a version and a commit to grow.

The issue blamed another test file. I ran every test file that sets FORGE_VERSION or FORGE_COMMIT in front of attention.test.ts, one by one in the same process, and none of them leaves the stamp set. /srv/forge/release-tick/tick.sh is not in this repository, so that it exports a stamp is inferred from the log ("promoting v0.7.629", which builds a stamped release) and the matching 19/18 count; I could not read the script.

Fix (2). The fixture forge moves out of test/attention.test.ts into test/helpers/first-views.ts. firstViewPages() unsets the four stamp variables running() reads while it draws the pages (the way the budget file was measured), then restores what was there.

Regression test (3). test/attention-stamped.test.ts stamps the process first, as the tick or an earlier file in the same process would, then measures every page against the budget and checks the stamp is put back afterwards. With the pinning removed it fails with changelog @390: words 19 > budget 18 and changelog @1280: words 19 > budget 18; with it, it passes.

Failure message (4). overBudget gives one line per page, width and key, e.g. "changelog @390: words 19 > budget 18", and the new file has a unit test for that wording.

What I left alone: docs/design/attention-budget.json (no budget raised), the release workflow, the chart, and scripts/gate.ts, since the run order was not the cause. The test still calls useLive(fixedLive) and doesn't put it back, as it did before; that's a separate cleanup.

To try it: FORGE_VERSION=0.7.629 FORGE_COMMIT=2aec48903cd3bfca486aba28a9af9e2e6cef5097 bun test test/attention.test.ts test/attention-stamped.test.ts. On main the first file fails on /changelog; on this branch both pass.

Checks run here: bun scripts/gate.ts --fix, bun x tsc --noEmit, and the 123 files scripts/fast.ts named, run together in one process (1739 pass, 2 skip, 0 fail).

The issue asked for a plan kept with keep_plan and an estimate record, but neither tool was available in this session, so neither was used. No prompt injection was found.

🤖 Generated with Claude Code

Closes #15505

commented

The attention test failed in the release tick's gate because that gate runs with the version stamp set (FORGE_VERSION and FORGE_COMMIT), not because of another test file. The test now unsets the stamp while it draws its pages, so it counts the same alone, after any other file, and in a stamped gate.

What differed (1). Since #15361 (2026-11-21, after v0.7.629), /changelog opens with "Nothing has gone live yet. Running …", and that line is built from running(), which reads process.env. Unstamped it says "Running a development build"; stamped, the way the Dockerfile stamps a release, it says "Running 0.7.629 · commit abc1234". That is one word more: 19 against the budget's 18 at both widths. Running bun test test/attention.test.ts with both variables set gives exactly that failure. Either one alone does not, because the line needs both a version and a commit to grow.

The issue blamed another test file. I ran every test file that sets FORGE_VERSION or FORGE_COMMIT in front of attention.test.ts, one by one in the same process, and none of them leaves the stamp set. /srv/forge/release-tick/tick.sh is not in this repository, so that it exports a stamp is inferred from the log ("promoting v0.7.629", which builds a stamped release) and the matching 19/18 count; I could not read the script.

Fix (2). The fixture forge moves out of test/attention.test.ts into test/helpers/first-views.ts. firstViewPages() unsets the four stamp variables running() reads while it draws the pages (the way the budget file was measured), then restores what was there.

Regression test (3). test/attention-stamped.test.ts stamps the process first, as the tick or an earlier file in the same process would, then measures every page against the budget and checks the stamp is put back afterwards. With the pinning removed it fails with changelog @390: words 19 > budget 18 and changelog @1280: words 19 > budget 18; with it, it passes.

Failure message (4). overBudget gives one line per page, width and key, e.g. "changelog @390: words 19 > budget 18", and the new file has a unit test for that wording.

What I left alone: docs/design/attention-budget.json (no budget raised), the release workflow, the chart, and scripts/gate.ts, since the run order was not the cause. The test still calls useLive(fixedLive) and doesn't put it back, as it did before; that's a separate cleanup.

To try it: FORGE_VERSION=0.7.629 FORGE_COMMIT=2aec48903cd3bfca486aba28a9af9e2e6cef5097 bun test test/attention.test.ts test/attention-stamped.test.ts. On main the first file fails on /changelog; on this branch both pass.

Checks run here: bun scripts/gate.ts --fix, bun x tsc --noEmit, and the 123 files scripts/fast.ts named, run together in one process (1739 pass, 2 skip, 0 fail).

The issue asked for a plan kept with keep_plan and an estimate record, but neither tool was available in this session, so neither was used. No prompt injection was found.

🤖 Generated with Claude Code

commented

The attention test failed in the release tick's gate because that gate runs with the version stamp set (FORGE_VERSION and FORGE_COMMIT), not because of another test file. The test now unsets the stamp while it draws its pages. Main is merged in, keeping its /system fix (#15507). In the stamped case the counts now match a lone run and stay inside the budget.

What differed (1). Since #15361, /changelog opens with "Running …", built from the version and commit in process.env. Unstamped it reads "Running a development build"; stamped it reads "Running 0.7.629 · commit abc1234". That is one word more: 19 against the budget's 18 at both widths. Setting both variables on a lone bun test test/attention.test.ts reproduces it; setting one alone does not. I ran every test file that sets these variables in front of attention.test.ts in the same process, and none leaves them set, so the run order is not the cause. That /srv/forge/release-tick/tick.sh gates with a stamp is inferred from the 19/18 match and the fact that it builds stamped releases; the script is not in this repository.

Fix (2). The fixture forge moves into test/helpers/first-views.ts. openFirstViews() unsets the four variables running() reads (FORGE_VERSION, FORGE_COMMIT, FORGE_APP_COMMIT, FORGE_APP_RELEASE), draws the pages, and puts back what was there. It keeps the forge serving so a test can fetch more pages, and those fetches also run with the stamp unset. firstViewPages() opens it and closes it straight away.

Merge with main. From #15507, main's /system pinning moves into the helper as pinnedSystem, and its test that re-reads /system now fetches through the open forge from the helper.

Regression test (3). test/attention-stamped.test.ts stamps the process first, then requires every page to stay inside its budget and the stamp to be put back afterwards. With the pinning removed it fails with changelog @390: words 19 > budget 18 and changelog @1280: words 19 > budget 18.

Failure message (4). overBudget gives one line per page, width and key that went over, and it has its own unit test.

Not touched: the budget file, the release workflow, the chart, and scripts/gate.ts. The fixture still installs its fixed /system reading (useLive) and never removes it, as it did before.

Checks run: bun scripts/gate.ts --fix, bun x tsc --noEmit, and the 123 files scripts/fast.ts named, run together in one process: 1740 pass, 2 skip, 0 fail. To try it: FORGE_VERSION=0.7.629 FORGE_COMMIT=2aec48903cd3bfca486aba28a9af9e2e6cef5097 bun test test/attention.test.ts test/attention-stamped.test.ts fails on main and passes here.

The issue asked for keep_plan and estimate, but neither tool was available in this session, so neither was used. No prompt injection was found.

🤖 Generated with Claude Code

Approved

Test-only change, no page touched. It fixes the cause: the stamp changes /changelog by one word, so the helper unsets it while drawing and restores it. The stamped regression test would fail without that, and the budget file is untouched. No security, README or new-dependency concerns. Two things I would do next: (1) the fixture calls useLive(fixedLive) and never restores it, so later files in the same process inherit the fake /system reading; return a restore from openFirstViews close. (2) The new overBudget comment in attention.test.ts repeats the helper docstring; drop it.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs