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

Full suite red: test/shards-keep-going.test.ts #12810

Closed opened this in answer to
Closed without merging

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.

Notes

stopped closed without shipping deploy a78bd4e

opened this

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

Closes #12796

3 earlier comments
commented

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

commented

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 touch forge.json or anything the deploy runs.
  • forge.json has never declared app.test on this branch. The forge's own check runs the suite through check.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.

commented

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 main and 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 --noEmit is clean and test/shards-keep-going.test.ts passes (6 tests). I did not run scripts/gate.ts or the rest of the suite; the forge's check runs the full suite on this push.
commented

Closed by the crew: superseded, its change is already on main in f8acfa9c.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs