Repository navigation
CI plans fixed + blobless checkouts; Smoke collection and slowest tests faster (Part of #5882) - #5932
Merged
Merged
Conversation
… blobless (Part of #5882) Smoke's checkout depth `event == 'pull_request' && 0 || 1` was always 1 (0 is falsy): every part then fetched main into a shallow clone (~60 s), found no merge base, and planned "full", so the ReDoS sweeps ran on every PR. The plan now reads the PR's own file list (gh api pulls/N/files, whole by changed_files, renames under both names); the part checks out one commit. On 20 recent PRs the API plan equals the git-diff plan (16 of them deselect the sweeps; each ran them). Det Sweep's and MGT's plan jobs keep full history but blobless (filter: blob:none): a clone of the repo took 1.2 s blobless vs 40 s full here; their checkouts took 74 s / 45 s on CI. merge-base, diff and git show behave the same (a blob is fetched when read; det_port's base worktree fetches its tree in one batch). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01E977ZMkfHVAsLSWrDLDaW5
Contributor
Collection runs in every xdist worker of every part (~34 s a part on CI). Two costs: - tests/conftest.py _is_redos_sweep took Path.relative_to per item (18k items): 1.5 s of 8.3 s profiled. The directory test is now cached per file; the name test runs first. - test_workflow_draft_gate parsed every workflow twice at import with the pure-Python loader: once now, with libyaml's CSafeLoader where present (47 workflows load identically; 0.02 s vs 0.22 s). collect-only, warm: 4.45 s -> 3.65 s. The same 787 tests carry redos_sweep. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01E977ZMkfHVAsLSWrDLDaW5
… parses 1 file in 11 (Part of #5882) - unicode_gauntlet / cultural_gauntlet: scan_to_db from tests/tools/scan_server.py (the engine imported once a process, not once a scan: ~20 / ~30 scans of a few files each). scan_server is fork-safe now: a server belongs to the pid that started it, so a forked ProcessPoolExecutor worker starts its own (unicode_gauntlet scans the seed before its pool forks). With GITGALAXY_SCAN_SERVER=0 vs on, both gauntlets' results are byte for byte the same (17 cells, 203 results); 4 cores: unicode 13.6 -> 7.8 s, cultural 16.5 -> 6.4 s. - test_posix_only_imports_4934: an import names its module as a word, so only files mentioning one are parsed (119 of 1346): 5.8 -> 2.1 s, still []. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01E977ZMkfHVAsLSWrDLDaW5
… test is slow by design (Part of #5882) - test_unicode_gauntlet_scan_env / test_a_legacy_cjk_estate_...: they faked galaxy_ir.scan_to_db, which unicode_gauntlet.scan no longer calls (it takes scan_server's), so a real scan ran on a missing estate. They fake scan_server's now. - test_jobs_measure_the_cases_as_one_at_a_time_does (#5926): 18.2 s on a loaded runner tripped the 15 s time ratchet; --jobs 2 spawns two processes that each import the runner. Marked slow with that reason. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01E977ZMkfHVAsLSWrDLDaW5
… test (Part of #5882) Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01E977ZMkfHVAsLSWrDLDaW5
squid-protocol
added a commit
that referenced
this pull request
Oct 22, 2026
…5941) ~100 scans a Mainframe Ground Truth run each started a fresh `python -m gitgalaxy.galaxyscope` (~3.5 s of engine import on a runner for a few files' scan). They take tests/tools/scan_server.py's scan_to_db now (same argv, environment default, result and errors; it falls back to galaxy_ir.scan_to_db): 50 test modules' imports, tests/tools/refraction_differential.py (the 8 excerpt scans), and the refractor's own --scan in the two tests that run it in-process. A new tests/cobol_mainframe/conftest.py appends tests/tools to sys.path for them. test_template_file_lineage_4771 reads the pinned zecs clone's cached scan (mainframe_corpus.scan) instead of scanning it again. scan_server: a server belongs to the pid that started it (a forked child starts its own); the same change as PR #5932. The 52 changed test files, sequential, local: 182 s -> 75 s, 724 passed / 4 skipped both ways. Claude-Session: https://claude.ai/code/session_01E977ZMkfHVAsLSWrDLDaW5 Co-authored-by: Claude Opus 5.5 <[email protected]>
Owner
Author
|
No description provided. |
Owner
Author
|
No description provided. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #5882 (CI speed).
Bug found in Smoke: the parts' checkout depth was
${{ github.event_name == 'pull_request' && 0 || 1 }}, which is always 1 because0is falsy in Actions expressions. On every PR, each of the 3 parts then:Plan the ReDoS sweepstook 55-65 s a part)"reason": "cannot diff (fatal: origin/main...HEAD: no merge base)", run 39691353465)full, so the ReDoS sweeps that Full-suite test time: ReDoS/contract sweeps are 32% of the suite; gate them on PRs, add a slow-test budget, trim the top 10 #5166 deselects ran on every PR.test_sweep_planonly checked that the expression mentionedpull_request.What it does:
gh api --paginate repos/R/pulls/N/filesplus the PR'schanged_filescount. The list must be whole, so a failed call, a count mismatch or the API's 3000-file cap plansfull, as an unreadable diff did. A renamed file counts under both names. The part checks out one commit and fetches no history, so the test environment is the same as today (it was effectively depth 1 already). Newsweep_plan.py --pr-files/--pr-file-count;--files/--basestill work locally.fetch-depth: 0and addfilter: blob:none. That gives full history without file contents; git fetches a file's content when it reads it, anddet_port.py's base worktree fetches its whole tree in one batch. merge-base, diff andgit showbehave the same.Checked:
git diff merge-base..headfor all 20. 16 of them deselect the sweeps, and every one of them ran them.git showof an old file take 0.6 s.Expected saving (10-21 volumes):
That's about 20 runner-h/day. Det Sweep and MGT runs also start their downstream jobs ~1 min sooner, since everything waits for the plan.
Measured on this PR's first CI run (39694500153 / 39694500183 / 39694500225, all green):
Plan the ReDoS sweeps: 2 s a part (was 55-65 s). It plannedfullfor the right reason ("3 changed file(s) are sweep inputs").Two more Smoke commits:
tests/conftest.py_is_redos_sweepranPath.relative_tofor each of 18k items: 1.5 of 8.3 profiled seconds. It now caches per file.test_workflow_draft_gateparsed every workflow twice at import with the pure-Python loader. It now parses once withCSafeLoaderwhere present; the 47 workflows load identically.redos_sweep.tests/tools/scan_server.py: the engine is imported once a process, not once for each of ~20-30 small scans.scan_serveris fork-safe now: a server belongs to the pid that started it, so a forked pool worker starts its own.GITGALAXY_SCAN_SERVER=0vs on (17 unicode cells, 203 cultural results).test_posix_only_imports_4934parses only files that name a POSIX-only module as a word (119 of 1346): 5.8 -> 2.1 s, still[].Not done (owner call): the same kind of prefilter for
test_source_reads(~29 s on CI). It would stop that test failing on a syntax error in an unrelated file, which it currently does by accident.🤖 Generated with Claude Code