Skip to content

tests: four 4108 probe ReDoS checks use the CPU-clock helper (Part of #8423) - #8660

Merged
squid-shepherd[bot] merged 1 commit into
mainfrom
churn/8423-20261119T1052Z
Nov 19, 2026
Merged

squid-shepherd[bot] merged 1 commit into
mainfrom
churn/8423-20261119T1052Z

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #8423

Checklist: done [c:fe9d3cb3]

The gate (tests/tools/test_no_raw_wall_clock_timing_8423.py, #8523/#8548) already refuses a new raw wall-clock difference and a stale offender entry. This PR shrinks its list: the api_db_sink, embedded_credentials, global_env_mutation and stego_imports 4108 probes now use tests/_timing.assert_cpu_below (bounds unchanged, 5 s / 2 s).

Class

Tests asserting elapsed time with raw time.perf_counter() differences instead of the shared CPU-clock helper. Same mechanism, left for later: test_vectorized_math_probe_4108 (5-file cap), and 15 other listed offenders (pic_run_lengths_7169, translator_pic_runs_7169, cics_macro_level, dense_source_7501/7504, prefetch, c_kernel_vocab_8016, three calls_out_, go_semicolon_imports_6572, redos_poison, secrets_shunt_4987, two tls_bypass_).

Sibling gaps

  • The 16 listed offenders above; none needs a burned-estate program. test_prefetch and test_redos_poison use monotonic for stall logic, so they likely need a gate allowlist, not a conversion.
  • The gate skips tests/tools/ wholesale, so a timing assert there is not caught.

Remaining slices

  1. vectorized_math probe + 4 more of the listed offenders (one test file each + the gate list).
  2. Allowlist or rewrite for the monotonic-stall-logic tests.
  3. Cover tests/tools/test_*.py in the gate.

Facts checked: the 4 probe files, the gate test and detector test pass (92); also from an unrelated cwd; audit_check.py all clear; ruff format clean. No golden impact (tests only).

🤖 Generated with Claude Code

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

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot marked this pull request as ready for review November 19, 2026 10:57
@squid-shepherd
squid-shepherd Bot enabled auto-merge (squash) November 19, 2026 10:59
@squid-shepherd
squid-shepherd Bot merged commit 50044cb into main Nov 19, 2026
57 checks passed
@squid-shepherd
squid-shepherd Bot deleted the churn/8423-20261119T1052Z branch November 19, 2026 11:03
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.

1 participant