Skip to content

TEST: Bound path traversal scaling by scan CPU time - #4855

Open
Richard Lundeen (richlundeen) wants to merge 1 commit into
microsoft:mainfrom
richlundeen:test-path-traversal-cpu-budget
Open

Richard Lundeen (richlundeen) wants to merge 1 commit into
microsoft:mainfrom
richlundeen:test-path-traversal-cpu-budget

Conversation

@richlundeen

Copy link
Copy Markdown
Contributor

Description

The path-traversal scaling test's 10-second wall-clock timeout expired during SQLite fixture setup in macOS job 143918368921 of run 47008045719, rather than during regex scanning. Measure the long-input scan's CPU time instead, keeping the 10-second performance budget and all four existing inputs and result assertions.

  • Warm up the same scorer before measuring, excluding unrelated one-time initialization.
  • Use the shared TEST_WATCHDOG_SECONDS hang backstop separately from the unchanged CPU budget.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings December 5, 2026 01:01

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

There are no active review issues for the changes aimed at reducing runner-related test failures.

No open issues 🎉

What changed in this PR

Reduces runner-related failures in the path-traversal scaling test while preserving its 10-second performance budget.

Changes:

  • Measures CPU time after warming up the scorer.
  • Uses the shared watchdog separately to catch hangs.
  • Preserves all four inputs and result assertions.
File Description
tests/​unit/​score/​regex/​test_path_traversal_output_scorer.py Adds scorer warm-up, CPU timing, and a separate hang watchdog.

Review effort: Balanced

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants