Skip to content

Speed up the remaining targeted harness tests - #235

Merged
wallstop merged 1 commit into
mainfrom
test-parallel-remaining-cases
Oct 14, 2026
Merged

wallstop merged 1 commit into
mainfrom
test-parallel-remaining-cases

Conversation

@wallstop

@wallstop wallstop commented Oct 14, 2026 •

Copy link
Copy Markdown
Owner

DISCLOSURE: LLM-GENERATED TEXT

Why: Eight harness test files serialize independent child-process waits during targeted runs.

What:

  • Run independent cases through the existing bounded worker pool.
  • Give lint children private environments before running cases concurrently.
  • Preserve assertions, case order, platform skips, and service readiness checks.

Fixes #234. Refs #171.


Note

Low Risk
Test-harness-only changes: faster parallel execution and safer env isolation; production scripts and assertions are unchanged.

Overview
Speeds up eight harness self-test modules by driving their cases through run_cases, which overlaps independent child-process waits on a bounded thread pool while still printing PASS/FAIL lines in submission order.

run_tool_output now accepts an optional env mapping so lint invocations no longer mutate os.environ; changelog-length, C# member-order, and line-endings helpers pass per-child override env vars instead. That makes concurrent case execution safe when those lints run in parallel.

Test main() blocks are refactored from many run_case calls into single run_cases([...]) lists (including table-driven cases). test_opencode_service_recycle keeps the same interleaved SKIP/run behavior on non-POSIX hosts while using the shared runner on POSIX.

Fixes #234.

Reviewed by Cursor Bugbot for commit 39091c5. Bugbot is set up for automated code reviews on this repo. Configure here.

The eight files named in #234 serialize independent child-process waits.
Run them through the existing bounded run_cases helper, retaining every
case body and assertion. Each case owns a temporary root or reads the
repository only. Child commands use explicit cwd, arguments, and env.

The member-order, changelog-length, and line-ending suites previously
changed os.environ around child processes. Give each child its own env
mapping before enabling concurrency. Keep the recycler readiness and
require_live checks and preserve non-POSIX skip/pass output order.

Validation: check:fast and check:gate pass (38/38 self-test files).
Strict pyright reports zero errors on all nine changed Python files.
AST comparisons prove case bodies unchanged. Three interleaved runs
per side match ordered PASS/FAIL/SKIP names for every converted file;
a simulated non-POSIX recycler run matches the old output exactly.
Unity checks do not apply: this change only touches harness tests.

Interleaved targeted-file medians on this container (seconds, main ->
branch; timing is indicative under shared-host load):
- devcontainer_lifecycle: 7.103 -> 3.606
- harness_scope: 2.657 -> 0.715
- gate: 2.119 -> 0.915
- opencode_service_recycle: 1.104 -> 0.264
- csharp_member_order: 1.114 -> 0.311
- assembly_warnings: 1.010 -> 0.214
- changelog_length: 0.749 -> 0.195
- line_endings: 1.339 -> 0.302

Fixes #234. Refs #171.
@wallstop
wallstop added this pull request to stack #238 October 14, 2026 18:56
@wallstop
wallstop merged commit a4a27d7 into main Oct 14, 2026
3 checks passed
@wallstop
wallstop deleted the test-parallel-remaining-cases branch October 14, 2026 19:13
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.

Convert the remaining serial self-test files to run_cases

1 participant