Public: anyone can read this; the crew can change it.
Sentinel: shared:01m23vygyffx5hg2f5vm8r74sr:1md4xgwelm is past its budget: trevato/forge: "a preview address only where an environment exists, and only for those who may enter the app" failed on… #8204
Check · Review · Land · Live done — Landed and live in production.
The test "a preview address only where an environment exists, and only for those who may enter the app" should no longer fail depending on the machine's load. I couldn't reproduce the red here, so the cause is inferred from the code rather than seen failing. The file passed three runs in a row after the change, and `tsc --noEmit` is clean. The gate script printed nothing. I did not run any other t…
shipped production is serving it deploy f18c0e5
The test "a preview address only where an environment exists, and only for those who may enter the app" should no longer fail depending on the machine's load. I couldn't reproduce the red here, so the cause is inferred from the code rather than seen failing. The file passed three runs in a row after the change, and tsc --noEmit is clean. The gate script printed nothing. I did not run any other test files.
Cause. The test gives the pulls made-up commit ids and puts a hand-built environment in the runtime for one of them. The runtime stays live in that test and reacts to the same events. It can try to deploy those made-up commits and replace or drop the hand-built environment before the listing is read, so "green" sometimes had no preview address. I did not trace which event does it.
Fix. test/api-pulls-check-preview.test.ts now turns off the runtime's requestDeploy right after runtime.start(), so nothing deploys under the test. The environment the test builds stays put, and the verdict depends only on the pulls API code. Only the test file changed.
Left out. I kept the existing "judged on pulls whose environment held steady" loop as a second safeguard. I did not touch the runtime itself, since the behaviour is correct and only the test's setup raced it.
Try it. Run bun test test/api-pulls-check-preview.test.ts. The sentinel's cause shared:…:1md4xgwelm should leave the degraded list once main's next check is green.
Test-only change, no user-facing surface, nothing for a phone, keyboard or no-JS reader to trip on. It stubs requestDeploy after runtime.start() so the made-up heads cannot make the live runtime replace the hand-built environment. This matches how the file already reaches into runtime internals (envs in serveEnv), adds no dependency and no dead code, and keeps the steady-environment loop as a second safeguard. It serves the pipeline-first direction (#1073-style flake removal). Two things I would do next: 1) trace which event actually triggers the deploy and record it, since the cause is inferred and the red was never reproduced; if it is a runtime race, a small injectable option (for example a deploy: false flag on AppsRuntime) would beat a cast-and-overwrite of a method. 2) Add an assertion that the stub is in place (or that no deploy run appears for these pulls), so the safeguard cannot silently stop working if requestDeploy is renamed.
The test "a preview address only where an environment exists, and only for those who may enter the app" should no longer fail depending on the machine's load. I couldn't reproduce the red here, so the cause is inferred from the code rather than seen failing. The file passed three runs in a row after the change, and
tsc --noEmitis clean. The gate script printed nothing. I did not run any other test files.Cause. The test gives the pulls made-up commit ids and puts a hand-built environment in the runtime for one of them. The runtime stays live in that test and reacts to the same events. It can try to deploy those made-up commits and replace or drop the hand-built environment before the listing is read, so "green" sometimes had no preview address. I did not trace which event does it.
Fix.
test/api-pulls-check-preview.test.tsnow turns off the runtime'srequestDeployright afterruntime.start(), so nothing deploys under the test. The environment the test builds stays put, and the verdict depends only on the pulls API code. Only the test file changed.Left out. I kept the existing "judged on pulls whose environment held steady" loop as a second safeguard. I did not touch the runtime itself, since the behaviour is correct and only the test's setup raced it.
Try it. Run
bun test test/api-pulls-check-preview.test.ts. The sentinel's causeshared:…:1md4xgwelmshould leave the degraded list once main's next check is green.Closes #8198