Repository navigation
test: keep three slow repo-scan and fuzz tests clear of the 5 s timeout - #4885
Conversation
…e scan The daemon fixture guard parsed all 4,391 source files to build the whole import graph, then walked it from the five seed files. That took about 2.5 s, over the 2.5 s unit budget, and under full-suite load the test crossed its 5 s timeout. The scan now walks the graph from the seeds and parses a file only when it could import a family member: its text names the member, or names the directory for an index, or it sits under a path the request could reach with `.` and `..` steps, or it contains a backslash escape that could spell any request. The scan takes about 1.0 s, and it returns the same violations on the repository with every file seeded with a raw launcher. New cases pin `.` and `..` requests that the resolver maps to a sibling fixture module, and a module named `.ts`. The guard no longer fails on a syntax error in a file outside that candidate set. Such a file cannot import a family member, so the error never affected detection. Lint and typecheck still parse every file. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…itter scan Four tests in the snapshot producer guard each parsed and walked all 2,013 production modules, about 3.4 s per test. Under full-suite load one of them crossed the 5 s timeout. A module records a producer only through a `producer` key or a `*_PRODUCER` binding, and an escape can spell either. The scan now skips a module whose text has neither name and no backslash. Each repository scan takes about 1.05 s, and every module's scan result is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`run.ts` imported `generate.ts` eagerly, so every harness run loaded fast-check and the arbitraries, about a second, even for a saved case, corpus promotion, self-check, or an options error. The harness tests spawn `run.ts` per case, and the promotion cases ran near the 2.5 s unit budget. A generate run now imports `generate.ts` once, before the first target's timer, so no target's reported duration includes the load. A promotion run drops from about 2.4 s to 1.65 s. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks for the fix. The change at c181a84 is ready: the code looks correct, CI is green (2 checks, none failing), and there are no conflicts. Not blocking: |
|
Note 🤖 Drafted by Claude Opus 5.5. Reviewed by @samanyudas and posted on their behalf. All three optional points are in #4898, since this merged before they landed.
|
Summary
Three unit tests ran close to the 5 s vitest timeout and failed full-unit runs on a loaded host, at base too. No timeout is raised.
producer, noPRODUCER, and no backslash.run.tsloaded fast-check. Only generated runs load it now.Contract change: the fixture guard no longer fails on a syntax error in a file outside its candidate set. Lint and typecheck still parse every file.
Validation
Timings measured at base
c37bb9563and head on this host:daemon-fixture-launchessnapshot-producer-emitters, each repo scanfuzz/harnesspromotion casepnpm check:affected --run --head c181a8469passed every runnable check, including full unit (21,401 passed).Reviewed with sol-loop: 3 rounds with gpt-6.2-sol. Sol verdict: approved
Created with Claude Opus 5.5 in Claude Code.