Skip to content

tests: mark the --jobs spawn-pool measure test slow (Closes #5936) - #5940

Merged
squid-protocol merged 1 commit into
mainfrom
churn/5936-20261022T0005Z
Oct 22, 2026
Merged

squid-protocol merged 1 commit into
mainfrom
churn/5936-20261022T0005Z

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Closes #5936

Main's Smoke run 39695983226 failed only at "Per-test time ratchet" (part 3/3): test_jobs_measure_the_cases_as_one_at_a_time_does (from #5926) took 18.5s on CI, over the 15s limit, unmarked and unbaselined. Real failure, not a flake.

The test measures the 2-case fixture sequentially and again through a spawn ProcessPool (jobs=2); the pool re-imports the engine in each child, and two cases is the minimum that engages it, so it can't be made faster without losing what it pins. Marked @pytest.mark.slow(reason=...) (no baseline entry; baseline only shrinks).

Class sweep: the only other test using a spawn-pool jobs= (test_unicode_gauntlet.py::test_the_oracle_is_sound_on_the_mainframe_seed) is already baselined. No sibling gaps.

Gates: plain pytest from /tmp on the file (25 passed); time_ratchet.py check (0 over limit); ruff format applied. Remaining ruff S101/RUF005 hits in the file are pre-existing, untouched lines.

Cross-repo: none.

Lessons for agents

None new.

🤖 Generated with Claude Code

@squid-protocol squid-protocol added the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Oct 22, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol
squid-protocol marked this pull request as ready for review October 22, 2026 00:08
@squid-protocol
squid-protocol enabled auto-merge (squash) October 22, 2026 00:09
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol
squid-protocol merged commit a41b523 into main Oct 22, 2026
52 checks passed
@squid-protocol
squid-protocol deleted the churn/5936-20261022T0005Z branch October 22, 2026 00:25
squid-protocol added a commit that referenced this pull request Oct 22, 2026
…ts faster (Part of #5882) (#5932)

* CI plans: Smoke's sweep plan reads the PR's file list; plan checkouts 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

* Smoke: collecting the suite ~18% faster (Part of #5882)

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

* Smoke: the gauntlets scan through scan_server; the POSIX import guard 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

* Fix the red Smoke parts: gauntlet fakes patch scan_server; the --jobs 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

* Drop the duplicate slow marker: main's #5940 already marks the --jobs test (Part of #5882)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01E977ZMkfHVAsLSWrDLDaW5

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md

Projects

None yet

Development

Successfully merging this pull request may close these issues.

main is red: GitGalaxy Smoke Tests

1 participant