Public: anyone can read this; the crew can change it.
Full suite red: test/shards-keep-going.test.ts #12810
This fixes the red test/shards-keep-going.test.ts by changing what the test expects; I did not touch the product code. The file now passes, including --rerun-each 3, and tsc is clean. I did not run scripts/gate.ts, and I ran no tests beyond that file.
stopped closed without shipping deploy a78bd4e
3 earlier comments
This fixes the red test/shards-keep-going.test.ts by changing what the test expects; I did not touch the product code. The file now passes, including --rerun-each 3, and tsc is clean. I did not run scripts/gate.ts, and I ran no tests beyond that file.
What was wrong: the "a file every process runs while loading…" test expected test/again.test.ts to have an empty impact entry. That test calls twice(4), a function the suite's loading had already called. The test comment claimed coverage is by block, not by count. But Bun 1.4.4's lcov counts lines, and usedFiles in src/checks/impact.ts treats a line run more often than during loading as the test's own. So the entry is ["src/loaded.ts"], and the test failed every time here, not intermittently.
What changed: only that expectation in test/shards-keep-going.test.ts, with its comment corrected. test/check-tiers.test.ts ("a line run once more") already pins the same rule in usedFiles.
What I left alone: I did not change usedFiles to compare by block. That would let the impact map drop tests that really call a file, and a test missing from the map is skipped when that file changes. The code and the comment disagreed, and I sided with the code because it errs toward running more tests. If you want block semantics, it is a deliberate change to usedFiles and the check-tiers test.
Try it: bun test ./test/shards-keep-going.test.ts --rerun-each 10
The deploy didn't fail. Its summary reads "running at https://lab--12810--forge-trevato-apps.open-platform.sh · no tests declared, none run", and src/apps/runtime.ts:1486 writes that text for a successful deploy of an app whose forge.json has no app.test. The log you pasted shows the preview serving normally.
I've made no change and pushed nothing, because the cause isn't in the pull:
- This pull only edits one expectation in
test/shards-keep-going.test.ts. That file is test-only and doesn't touchforge.jsonor anything the deploy runs. forge.jsonhas never declaredapp.teston this branch. The forge's own check runs the suite throughcheck.verify, so the deploy says "none run" for the same reason on every pull.- I'm not adding
app.test. It would make every preview deploy run a test command, and the full suite already runs once in the forge's check. That is a repository-wide change and not mine to make for a single red-test issue.
If the preview verdict is blocking the pull, that is a forge deploy-status question for a person. The code change itself is unchanged and passes: bun test ./test/shards-keep-going.test.ts --rerun-each 3 gave 18 passing, and tsc was clean.
I merged main into this branch and pushed it. The one conflict was in test/shards-keep-going.test.ts, in the comment above the again.test.ts assertion.
- Resolution: I kept the wording from
mainand dropped this branch's version of the comment. The assertion line itself was the same on both sides, so no test logic changed. - Checks:
bun x tsc --noEmitis clean andtest/shards-keep-going.test.tspasses (6 tests). I did not runscripts/gate.tsor the rest of the suite; the forge's check runs the full suite on this push.
This fixes the red
test/shards-keep-going.test.tsby changing what the test expects; I did not touch the product code. The file now passes, including--rerun-each 3, andtscis clean. I did not runscripts/gate.ts, and I ran no tests beyond that file.What was wrong: the "a file every process runs while loading…" test expected
test/again.test.tsto have an empty impact entry. That test callstwice(4), a function the suite's loading had already called. The test comment claimed coverage is by block, not by count. But Bun 1.4.4's lcov counts lines, andusedFilesinsrc/checks/impact.tstreats a line run more often than during loading as the test's own. So the entry is["src/loaded.ts"], and the test failed every time here, not intermittently.What changed: only that expectation in
test/shards-keep-going.test.ts, with its comment corrected.test/check-tiers.test.ts("a line run once more") already pins the same rule inusedFiles.What I left alone: I did not change
usedFilesto compare by block. That would let the impact map drop tests that really call a file, and a test missing from the map is skipped when that file changes. The code and the comment disagreed, and I sided with the code because it errs toward running more tests. If you want block semantics, it is a deliberate change tousedFilesand the check-tiers test.Try it:
bun test ./test/shards-keep-going.test.ts --rerun-each 10Closes #12796