Repository navigation
tests: speed up the slow-test top 10 without weakening a check (Part of #5166) - #5171
Conversation
#5166) - test_galaxyscope: three pipeline tests scanned the whole repo ("." root) in the ecosystem audits; use an empty temp root - ReDoS sweeps (cleanup, immutability): one spawned child per sweep via assert_redos_immune_all, not one per pair - tool_regex_redos.sweep: optional `workers` shards; the offender test uses 4 - scan path independence / spawned-pool tests: independent scans run side by side - unicode gauntlet seed test: jobs 2 -> cpu count (max 6) Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
No description provided. |
| sys.path.insert(0, _LANGUAGES_DIR) | ||
|
|
||
| from _strict_harness import assert_redos_immune # noqa: E402 # type: ignore | ||
| import _strict_harness # noqa: E402 # type: ignore |
|
PR #5171 @ 0fe6a17: 1 failed check(s) == full-suite part 3/3 (failure) -- real |
…rs="replace" (Part of #5166) The #3813 gate (test_source_reads) forbids lossy errors= handlers in tests; full-suite part 3/3 failed on the one this PR added. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
CI shepherd: the head of this PR (ac1df9b) is not the one a maintainer labelled |
|
No description provided. |
|
No description provided. |
Part of #5166 (part C only). Parts A and B are other workers' PRs.
What changed (tests only; same assertions, no engine code, no golden/ratchet moves)
test_galaxyscopex3 (19.5 / 14.8 / 14.1 s)execute_pipelineends with the ecosystem audits (X-ray, API mapper, firewall) over the scan root; the tests used root".", so each X-rayed the whole repo (cProfile: 13.5 of 13.9 s inbinary_anomaly_detector) for a result they never read_empty_root)test_cleanup_contract_redos_sweep(33.2) andtest_immutability_locks_redos_sweep(21.0)assert_redos_immune_allin_strict_harness.py: one child for the whole sweep, every pair still timed on the child's CPU clock and bounded bytimeout_sec; a hang kills the child and names that pairtest_no_new_offenders(21.9)tool_regex_redos.sweep(..., workers=N)deals sites round-robin to N workers (rows in the same order; default stays serial for the CLI); test uses 4test_the_oracle_is_sound_on_the_mainframe_seed(46.4)jobs=2jobs=min(6, cpu_count); same EBCDIC pages, same assertionstest_the_same_tree_scans_the_same_under_any_parent[tmp](42.2)test_a_spawned_pool_is_the_forked_pools_output(18.1)Test count: unchanged for the ten targets. +3 new tests:
test_a_sharded_sweep_returns_the_serial_rows_in_orderand two harness self-tests forassert_redos_immune_all(clean pairs pass and a disabled rule is skipped; a hang mid-batch names that pair). Collected in the touched files: 194.The local times are on a 12-core box under load; CI is 3-5x slower per the issue, so the CI delta is what the issue's
.test_durationsrefresh will show.Not changed
cultural_gauntlet::test_the_sampled_plan_passes_its_ratchet(60.8): 34 distinct cells, each one ~1.2 s scan subprocess (94% of a cell isscan_to_db; profiled), alreadyjobs=cpu_count. No dedupe is possible without sharing scans across different inputs, so I left it rather than weaken it. See Sibling gaps.redos_sweepmarker) is not merged, so the two sweeps were fixed on their own; A may still deselect them on PRs.Gates
pr_gates.py --fast6/6,--ratchets7/7 (0 skipped), via heavy-run.sh. Touched tests pass with-o addopts=""serial.Sibling gaps
assert_redos_immuneper payload (for payload in payloads); each can switch toassert_redos_immune_all.test_galaxyscopepipeline tests with root"."(~1.9 s each).Lessons for agents
Queue.putfrom a child stuck in a regex never flushes (the feeder thread needs the GIL), so batch ReDoS results go through aPipe.Orchestrator(".")and callsexecute_pipelinescans the real repo in the ecosystem audits: give it a temp root.Co-Authored-By: Claude Opus 5.5 [email protected]
🤖 Generated with Claude Code