[GH-ISSUE #3295] test(rizin): close fixture stdin before advertising readiness #1174

Closed
opened 2026-10-15 18:31:45 +00:00 by bsakaguchi · 0 comments
Owner

Originally created by @N0zoM1z0 on GitHub (Oct 14, 2026).
Original GitHub issue: https://github.com/morluto/rea/issues/3295

Originally assigned to: @N0zoM1z0 on GitHub.

The real-process Rizin stdin-closure regression can send its readiness frame before it satisfies the condition asserted by the test. This causes an intermittent initial-test failure in the existing Stryker harness; the same initialization runs before full mutation testing and --dryRunOnly.

Baseline: main 307af044bc0bdc15bc836c549e774220af8f459e, tests/boundary/providers/RizinDebugSessionCoverage.part2.test.ts, case stops the session when the provider closes its stdin pipe.

Environment: Linux x86_64, Node 24.18.0, npm 11.16.0, Vitest 5.0.3 and Stryker 10.0.0. These are real shell-child fixtures exercising the Rizin manager, not execution of an installed Rizin engine.

The fixture currently runs:

printf '\000'; exec 0<&-; while :; do :; done

The parent can receive readiness and issue dr before the child executes exec 0<&-. The write can therefore succeed legitimately; a later response deadline is a different outcome from a write to an already closed pipe. The test assumes the latter without ordering it.

Evidence:

  • Focused coverage passed, but the production Stryker initial run failed this case with expected true to be false. The preflight correctly returned nonzero rather than masking it.
  • A controlled producer delay (printf ...; sleep 0.2; exec 0<&-; ...) reliably reproduces that assertion failure outside Stryker, using the real manager and existing test.
  • Reordering the same fixture to close stdin before printing readiness passes the unchanged case and preserves its state === closed assertion. No deadline, retry, skip or production code change is needed.
  • Installed Stryker 10.0.0 uses the same initial execution for both modes; its dryRunOnly conditional only logs the mode in the initial executor and skips the subsequent mutation executor.

Correct the fixture's readiness ordering at its producer. Keep the real owned child, original 500 ms command deadline, both assertions, injected-stream tests and cleanup checks. Validate the affected Rizin coverage family and full current-head CI before merge. The temporary delay/control changes have been restored; they are not proposed test sleeps or retries.

This was found while validating #3281, whose performance changes do not alter the manager or this fixture. Fix this prerequisite independently before completing that optimization.

Originally created by @N0zoM1z0 on GitHub (Oct 14, 2026). Original GitHub issue: https://github.com/morluto/rea/issues/3295 Originally assigned to: @N0zoM1z0 on GitHub. The real-process Rizin stdin-closure regression can send its readiness frame before it satisfies the condition asserted by the test. This causes an intermittent initial-test failure in the existing Stryker harness; the same initialization runs before full mutation testing and `--dryRunOnly`. Baseline: main `307af044bc0bdc15bc836c549e774220af8f459e`, `tests/boundary/providers/RizinDebugSessionCoverage.part2.test.ts`, case `stops the session when the provider closes its stdin pipe`. Environment: Linux x86_64, Node 24.18.0, npm 11.16.0, Vitest 5.0.3 and Stryker 10.0.0. These are real shell-child fixtures exercising the Rizin manager, not execution of an installed Rizin engine. The fixture currently runs: ```sh printf '\000'; exec 0<&-; while :; do :; done ``` The parent can receive readiness and issue `dr` before the child executes `exec 0<&-`. The write can therefore succeed legitimately; a later response deadline is a different outcome from a write to an already closed pipe. The test assumes the latter without ordering it. Evidence: - Focused coverage passed, but the production Stryker initial run failed this case with `expected true to be false`. The preflight correctly returned nonzero rather than masking it. - A controlled producer delay (`printf ...; sleep 0.2; exec 0<&-; ...`) reliably reproduces that assertion failure outside Stryker, using the real manager and existing test. - Reordering the same fixture to close stdin **before** printing readiness passes the unchanged case and preserves its `state === closed` assertion. No deadline, retry, skip or production code change is needed. - Installed Stryker 10.0.0 uses the same initial execution for both modes; its `dryRunOnly` conditional only logs the mode in the initial executor and skips the subsequent mutation executor. Correct the fixture's readiness ordering at its producer. Keep the real owned child, original 500 ms command deadline, both assertions, injected-stream tests and cleanup checks. Validate the affected Rizin coverage family and full current-head CI before merge. The temporary delay/control changes have been restored; they are not proposed test sleeps or retries. This was found while validating #3281, whose performance changes do not alter the manager or this fixture. Fix this prerequisite independently before completing that optimization.
bsakaguchi 2026-10-15 18:31:45 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#1174
No description provided.