Skip to content

fix(verifiers): release fixture roots only after their owners finish - #10491

Merged
N0zoM1z0 merged 3 commits into
mainfrom
fix/verifier-cleanup-ordering
Nov 14, 2026
Merged

N0zoM1z0 merged 3 commits into
mainfrom
fix/verifier-cleanup-ordering

Conversation

@N0zoM1z0

@N0zoM1z0 N0zoM1z0 commented Nov 14, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Several real-tool verifiers released their fixture root even when a cleanup that still used it had failed. A surviving MCP server, core session, sentinel or GUI fixture then kept running against a deleted directory, and the run reported an ordinary cleanup failure. This fixes the ordering once in the shared helper and applies it to each affected verifier.

Fixes #8561
Fixes #8562
Fixes #8564
Refs #8559

Change and scope

The contributor PRs #8705, #8706 (abhisheksharma001) and #8698 (wunianze666-netizen) each patched one script, and they identified these orderings. This PR fixes the shared rule instead, as the review recommended, and supersedes them.

Contribution scope: verifier scripts only; no product behavior change.

Evidence and regression coverage

  • tests/boundary/filesystem/verifierCleanup.test.ts (new): the root is released after the dependents succeed; when a dependent fails, the later dependents are still attempted, the root is not released, and both the dependent failure and the retention are reported.
  • The verifiers are real-tool lanes (sigrok, pwntools/GDB, WABT, macOS UI) and were not run here. They were syntax-checked with node --check and linted. Real-tool verification is outstanding.

Validation performed

  • npm run test:focused -- tests/boundary/filesystem/verifierCleanup.test.ts: 2 passed.
  • node --check on the five changed scripts: passed.
  • npm run check:fast (pre-push): passed.

Compatibility, safety, and release

  • Breaking changes: none. A failing verifier cleanup can now leave its private root on disk, which it names in the failure. This is intended: the root may still be in use.

Author readiness

Human owner: N0zoM1z0 (PR author, exempt from the declaration per CONTRIBUTING.md).

Several real-tool verifiers released a fixture root even when a cleanup
that still used it had failed, so a surviving MCP server, session or
descendant kept running against a deleted directory and the failure
looked like ordinary cleanup.

- scripts/lib/verifier-cleanup.mjs: new releaseAfter(dependents,
  release, retained) task. It attempts every dependent cleanup and
  releases the resource only if all succeed; otherwise it keeps the
  resource and reports it with the dependent failures.
- verify-signal-recording: the root is released after the MCP client
  and transport close, and the host-limits read moves before the root
  is acquired so its failure cannot leak the root.
- verify-recorded-crash: sessions, the sentinel and the process-lineage
  check must all succeed before the root is released. A transport close
  failure after a failed connect keeps the connect failure.
- verify-wasm-artifact: both roots are released after the MCP client
  and transport close; the residue check and the two directories stay
  independent after that.
- verify-native-ui: `open -W` exits only after the app exits, so the
  root is removed only once that exit is observed; otherwise it is
  retained and reported.

Fixes #8561
Fixes #8562
Fixes #8564
Refs #8559

Co-Authored-By: gensokyo-dev <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-14T07:50:34.542833Z
We couldn’t complete this review. Comment @codex review to try again.
4eec02c PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@greptile-apps

greptile-apps Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable issue remains from this review.

Summary

Adds releaseAfter so verifiers keep fixture roots when dependent cleanup fails.

  • Verifier fixture roots stay in place until their dependent cleanups succeed.
  • Recorded-crash fixtures stay available until sessions and processes finish.
  • WABT fixture roots stay available until the MCP owners close.
  • The native UI verifier keeps its fixture root until the app's exit is confirmed.

Both unnumbered previous findings are fixed: signaled launcher exit no longer permits deletion, and the grace timer is cleared after the wait settles. No new actionable issue or rule violation was found.

N0zoM1z0 explicitly deferred fixture identity before the ready handshake because a real macOS LaunchServices run was unavailable. This remains outside the stated scope.

This review checked source only; it did not run tests or real-tool lanes. Whether another PR supersedes this one could not be checked because GitHub access was unavailable.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Attempt every dependent cleanup] --> B{All succeeded?}
  B -->|Yes| C[Release fixture root]
  B -->|No| D[Keep fixture root]
  D --> E[Report dependent failures and retained path]
Loading

Reviews (4) · Last reviewed commit: "test(verifiers): model open -W exiting a..." · Reviewed by Greptile

Comment thread scripts/verify-native-ui.mjs Resolved
Comment thread scripts/verify-native-ui.mjs Resolved
gensokyo-dev and others added 2 commits November 14, 2026 08:23
A terminated `open` launcher does not prove the LaunchServices app it
started has exited, so only an `open -W` that exits on its own counts.
Also clear the grace timer so a prompt exit does not hold the process
for the rest of the grace period.

Refs #8559

Co-Authored-By: gensokyo-dev <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The native UI verifier now removes its root only after `open -W` exits
on its own. The authored recording's `open` never exited when the
fixture was signaled and had no signalCode, so the complete case waited
out the grace period and kept the root. The double now behaves like
`open -W`: it exits once the fixture process is signaled.

Refs #8559

Co-Authored-By: gensokyo-dev <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>

@gensokyo-dev gensokyo-dev left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Reviewed the final diff, CI and automated review; approving.

@N0zoM1z0
N0zoM1z0 merged commit 67ce671 into main Nov 14, 2026
53 checks passed
@N0zoM1z0
N0zoM1z0 deleted the fix/verifier-cleanup-ordering branch November 14, 2026 08:56
gensokyo-dev added a commit that referenced this pull request Nov 14, 2026
… app

Since #10491 the native UI verifier removes its fixture root only after
`open -W` exits on its own, which real `open -W` does once the app
exits. The macOS lane's launcher stand-in instead stayed alive until
the test released it, so every lane case kept its root and failed. The
stand-in now exits when the fixture it started exits.

Refs #8559

Co-Authored-By: gensokyo-dev <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
@morluto morluto added area: tests Test suite and verification bug Something isn't working labels Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: tests Test suite and verification bug Something isn't working

Projects

None yet

3 participants