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

The impact map counts a module a test used, not one it only loaded; a new file the diff leads to does not blind the plan #16975

Merged opened this

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

Merged

After runner seeding (#16876) shipped, pull checks still ran 85% of the suite: pull-16887 planned 3,975 of 4,584 files and ran 28,355 tests in 19.4 min, pull-16935 3,987 files in 19.5 min. Not a fallback: both plans were "by coverage".

Notes

opened this

After runner seeding (#16876) shipped, pull checks still ran 85% of the suite: pull-16887 planned 3,975 of 4,584 files and ran 28,355 tests in 19.4 min, pull-16935 3,987 files in 19.5 min. Not a fallback: both plans were "by coverage". In production's map 840 src files each reach more than 2,000 of 4,579 tests, because every test that boots serve(app) loads every page module and usedFiles counted a page's top-level lines as use: src/web/pages/system.ts reached 2,835 tests, design-components.ts 2,828, studio/app.ts 2,841, view/doc_sections.ts 2,828. And one new file (no test reaches it) blinded each plan: every guess and every quick test.

usedFiles, given the test and an import reader (test-shards passes both): a file the suite's loading never touched, with functions, is the test's only when one of its functions ran, when the test imports it itself, or when a file the test did use imports it and is no hub (at most 30 imports, so a page's words table stays while the server's loading of every page goes). A file with no functions counts by its lines, as before. A change that breaks only a module's load is still red on its pull: release-boot.test.ts boots the whole tree in every fast tier (RULE_TESTS), 13.2 s on production's times table, 9.8 s here.

fastSet: a changed src file the map has never reached no longer blinds the plan when a file of the same diff that the map does reach imports it, at any depth through the diff's other new files; only a new file nothing here leads to blinds.

Before and after, on these pulls' own files:

  • pull-16887 (11 files): before 3,975 of 4,584 files, blind on src/snapshot/stream.ts. After: not blind (service.ts and system.ts import stream.ts). Coverage reach falls with the map: on 10 server-booting tests re-measured here, system.ts stays in 2 of 10 entries (was 9 of 10), the mean entry falls from 938 files to 389, so its 2,835 tests become about 630 once main's verification re-measures.
  • pull-16935 (34 files): before 3,987 files, 15 new files blinding. After: 10 are led to by mapped files (api.ts, server.ts, routes/index.ts) and stop blinding; 5 still do, rightly (the migration and its pin, the generated migrations and marks lists, a marks JSON). studio/app.ts stays in 1 of 10 re-measured entries (was 9), doc_sections.ts in 0 (was 9); server.ts and api.ts stay (requests are served through them). The narrower map takes effect when main's next verification measures it.

Direction: the common pull's check is narrow once the map says what a test uses (#16881)

Co-Authored-By: Claude Fable 5 <[email protected]>

🤖 Generated with Claude Code

commented

Ready for review: the check is green at a1aab1320. Please review this head.

Sign in to join this conversation.

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

Keyboard shortcuts

Docs