Skip to content

fix(test): improve capture reliability and runner cleanup - #609

Merged
morluto merged 3 commits into
mainfrom
fix/test-readiness-and-lifecycle
Oct 5, 2026
Merged

morluto merged 3 commits into
mainfrom
fix/test-readiness-and-lifecycle

Conversation

@morluto

@morluto morluto commented Oct 5, 2026

Copy link
Copy Markdown
Owner

PTY tests assumed children were ready at fixed offsets, some MCP assertions accepted any successful payload, and cancellation could wait indefinitely for a child that ignored termination. This change makes the fixtures tolerate startup timing, checks meaningful result identities and evidence, and adds termination escalation with explicit cleanup failures.

The process-tree fixture now signals when its descendants are ready, provides a two-second sampling window, and exits normally so capture verifies descendant cleanup. Signal dispatch is tested separately from application handler readiness. A source-map recovery regression now preserves valid imports while excluding a dynamically shadowable require inside with.

Tests use Vitest's existing worker budget rather than a broad command lock or serializing every project. The process-observation lane remains serial. Checkout-local locks protect shared build and documentation outputs; dist cleanup and compilation run under the same build lock. Runner escalation covers direct children, not arbitrary descendant trees.

Profiling on macOS showed the process-tree case falling from 10.7 seconds waiting for its deadline to 3.0 seconds in the final gate. Installer runs took 11–13 seconds, while fixture setup took only 1.5–3.2 ms per case; their coverage was retained. These measurements do not establish a general full-suite speedup.

Validation:

  • npm run check:pr: 369 files passed, 2,142 tests passed, two skipped; static and generated-document checks passed.
  • npm run build:cached and npm run docs:check: passed after the final build-lock wiring.
  • Focused capture, cancellation, MCP payload, and source-map recovery regressions passed.
  • Real Hopper/Ghidra verification and Windows execution were not performed; this changes test infrastructure and assertions, not provider analysis implementations.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@morluto
morluto merged commit d19686a into main Oct 5, 2026
15 checks passed
@morluto
morluto deleted the fix/test-readiness-and-lifecycle branch October 5, 2026 17:32
darsrc pushed a commit to darsrc/rea that referenced this pull request Oct 10, 2026
* test: make capture fixtures readiness-aware and strengthen assertions

* fix(test): escalate child termination and report cleanup failures

* perf(test): use runner concurrency and lock shared build outputs
@morluto morluto added bug Something isn't working area: runtime Process capture and runtime observation labels Oct 14, 2026
@morluto morluto added the area: tests Test suite and verification label Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: runtime Process capture and runtime observation area: tests Test suite and verification bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant