Skip to content

fix: bound the post-test process snapshot - #43

Merged
Blind-Striker merged 3 commits into
masterfrom
fix/snapshot-bound
Nov 15, 2026
Merged

Blind-Striker merged 3 commits into
masterfrom
fix/snapshot-bound

Conversation

@Blind-Striker

Copy link
Copy Markdown
Contributor

Summary

The post-test process snapshot can no longer hold a CI or Native leg for 35 minutes.

  • A short bound for the query. NativeProcesses.RunAsync and RequireAsync take an optional timeout. The snapshot passes two minutes. Every other caller keeps the old 30- or 35-minute bound.
  • Command lines that cannot stall the snapshot. On Windows, PowerShell's CommandLine property ran one WMI query per process. Now one CIM query, Get-CimInstance Win32_Process -Property ProcessId,CommandLine -OperationTimeoutSec 30, reads all command lines into a map keyed by process id. If that query fails or times out, the map stays empty and those rows get an empty command-line field. Linux and macOS keep $_.CommandLine. The JSON shape and the processes.txt line format are unchanged.
  • Bounded steps. All seven "Record processes after tests" steps (one in ci.yml, six in native.yml) get timeout-minutes: 5. They stay if: always() and blocking.
  • Canon: the snapshot bullet in hosting-and-packaging.md and the process-snapshot sentence in quality-gates.md. Both files' dates move forward.

Fixes #42.

Transport and protocol impact

None. Only repository tooling, its tests, the workflows and canon change.

Verification

  • SDK version: 10.0.404. Operating system: Windows x64, plus the hosted runners.

  • New tests in NativeProcessSnapshotTests:

    • RecordAsync_Should_Send_One_Two_Minute_PowerShell_Query: fails on the base (timeout 35 minutes, not 2) and passes after.
    • RecordAsync_Should_Format_Null_CommandLine_As_Empty_In_Cpu_Order: a characterization test. It passes on the base; a mutant that formats null as the text "null" breaks it.
    • RecordAsync_Should_Query_The_Real_Test_Host: runs the real query through the real runner and finds the test host's own process, with its command line on Windows and Linux. On the Windows x64 machine, the base query did not finish within the test's 150-second guard, which reproduces the stall.
  • Focused suite: 5 of 5 passed. The Release build has no warnings. Slopwatch, the whitespace check and the style check are clean. actionlint 1.7.7 is clean on both workflows.

  • A real snapshot on Windows x64 finished in 26.8 s, with command lines for 700 of 897 processes.

  • The hosted CI and Native runs on this head cover the three CI operating systems and every snapshot step.

  • The local check passed, or this change
    is limited to Markdown and LICENSE. (Build, focused tests, Slopwatch and format checks locally; the full suite runs in hosted CI.)

  • No tests were skipped, weakened, retried or deleted to make checks pass.

Dependencies and documentation

No dependency change. Documentation: docs/architecture/hosting-and-packaging.md and docs/engineering/quality-gates.md.

Suppression inventory

None.

  • Suppression changes follow the suppression policy
    and have maintainer approval; no warning or audit protection was weakened.
  • The change passes the slop-review rubric.
  • Commit messages use Conventional Commits; commits and this body have no AI-attribution
    trailers, co-author lines or session links.
  • This contribution is licensed under the MIT License.

Reviewer focus

  • The new query: the CIM time-out and the empty-map fallback.
  • That every snapshot step is bounded.

@Blind-Striker
Blind-Striker added this pull request to the merge queue Nov 15, 2026
Merged via the queue into master with commit 3ef9a4f Nov 15, 2026
32 checks passed
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.

CI: the process snapshot step can hang for 35 minutes and has no step timeout

1 participant