Repository navigation
fix(verifiers): retain the Go fixture root until MCP ownership completes - #8650
kaoru0822-kitauji wants to merge 6 commits into
Conversation
The Go verifier removed its private root even when the client or transport close failed, and its constructors ran before the guarded block. A successful SDK close was not proof either: StdioClientTransport can return right after its final SIGKILL, before the child is reaped. Add a shared transport that adopts the SDK's child into the process supervisor, proves its exit and output closure, and stays retryable. Release the root only after every owner and the process lineage check succeed, and report a retained root with the owner that can retry it. Fixes #8555 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
…owners Look scenarios up in a Map, so a name from argv cannot reach anything but a declared handler. Take the directory from os.tmpdir(), which is how the verifier picks its root's parent, and derive the pipe holder's file from it instead of passing a second path through the environment. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
CodeQL #684 ( Taint path: It appears because |
[Low impact] The PR appears safe to merge; no new actionable defect was established. SummaryThe Go verifier now keeps its private fixture root until its owners finish cleanup.
Diagram%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Verification finishes or fails] --> B[Close client and transport]
B --> C{Child exit and pipes closed?}
C -->|No| R[Retain root and report retry owner]
C -->|Yes| D{Platform}
D -->|POSIX| E{Lineage verified and empty?}
E -->|No| R
E -->|Yes| F[Remove fixture root]
D -->|Windows| G[Report missing descendant coverage]
G --> F
Reviews (4) · Last reviewed commit: "Merge origin/main into fix/8555-go-verif..." · Reviewed by Greptile |
The root was removed whenever the lineage observation returned unavailable, so a failed snapshot, an unreadable descendant environment or a foreign run token all counted as proof that no descendant remained. Require positive lineage through assertVerifierCleanupComplete on POSIX, and retry from a retained root. Windows has no lineage facility here, so the root is still released there and the report states the weaker proof. Stop everything a harness scenario starts on every exit, so a failed assertion no longer leaves a pipe holder or an unkillable child running. Co-Authored-By: Claude Opus 5.5 <[email protected]>
| }; | ||
| const setUpScenario = new Map(Object.entries(scenarios)).get(scenario); | ||
| assert.ok(setUpScenario, `Unknown scenario: ${scenario}`); | ||
| await setUpScenario(); |
Co-Authored-By: Claude Opus 5.5 <[email protected]>
yash27git
left a comment
There was a problem hiding this comment.
This is a false positive. The dynamic invocation is restricted to a statically declared scenario allowlist.
scenarios contains only locally defined handlers. The harness creates a Map from Object.entries(scenarios), looks up the requested scenario, and validates the result with assert.ok(setUpScenario) before invoking it.
Because Map does not expose inherited object properties, inputs such as __proto__ and constructor cannot resolve to prototype methods. Unknown scenario names fail before invocation.
This behavior was also tested explicitly: nope, __proto__, and constructor each exit with Unknown scenario.
There is no arbitrary method dispatch or attacker-controlled function execution here. I recommend keeping this finding classified as a false positive rather than changing correct test-harness logic solely to satisfy the static-analysis rule.
|
TL;DR: I ran the one changed test file on Node 22.23.4, 24.22.1 and 26.12.1. All 20 tests passed on each version. On head 61aea43, the
The file was CI on the head, read with
Not run
Test setupCommandsnpm ci --offline
npm run test:prepare
xvfb-run -a npm run test:focused -- tests/boundary/process/goVerifierCleanup.test.ts🤖 Written and tested with Claude Code (Sonnet 5.5, verified by Opus 5.5), posted with my OK 🦊 |
|
Maintenance claim for the current Codex session: inspect the current diff, all review threads and the actual CodeQL failure; merge current main normally in a new isolated detached worktree, repair any remaining verifier/fixture drift with focused lifecycle coverage, and push only to this PR's existing branch without force. No new issue or PR is planned. I will retain the existing human declarations and record the author-ID exemption separately. |
|
Coordination from session |
|
Runner coordination: this PR remains closed. At 2026-11-12 18:07:11 UTC, its fresh-head CI run https://github.com/morluto/rea/actions/runs/43274885146 and CodeQL production run https://github.com/morluto/rea/actions/runs/43274885443 still report queued. The real Go lane has completed successfully. Please cancel the remaining closed-PR runs if they are no longer needed, to free capacity for the open backlog. Our session will not cancel another owner's runs. |
|
Queue cleanup from |
Fixes #8555
The Go verifier could delete its private fixture root after an SDK close returned while its child or pipes remained live, after a close failure, or without proving POSIX descendant cleanup. Constructor failures could also leave an unreported root.
VerifierStdioClientTransportadopts the SDK child into the shared supervisor and requires exit plus output closure. The fixture owns release ordering: client/transport completion, lineage observation, then root removal. Failed owners retain the exact root and retry authority, with primary failures preserved. The SDK's nonrejectingclose()contract is retained because failed handshakes call it without awaiting.Scope and limits
Verifier-only change; CLI/MCP schemas, product Evidence and target authority are unchanged. The real-Go workflow follows both added helper dependencies.
On POSIX, unavailable lineage retains the root. Windows has no lineage facility in this verifier, so release depends on child completion and reports omitted descendant coverage. A reparented descendant holding no pipes can still evade the live-parent-chain observer (#8561/#8562/#8564). SDK child access uses its private
_processfield and fails closed when unavailable.Current validation
Head
177f2d16c3normally merges maina8527d43b8.npm run check:fastandgit diff --check— passed.nope,__proto__andconstructoreach exit 1 withUnknown scenario, before dynamic dispatch.CodeQL review
The old failed
CodeQLcheck was inspected directly: alert #685 isjs/unvalidated-dynamic-method-callat the test harness's Map-selected scenario invocation. Only locally declared handlers enter the Map; unknown/prototype names are rejected before invocation, as the current controls confirm. This is a test-fixture false positive, rather than evidence of arbitrary dispatch.Current main's established production-only analysis excludes test fixtures at extraction. This merge carries that existing policy without changing CodeQL configuration or dismissing an alert. Fresh analysis must pass before readiness; the unresolved historical thread will receive its current-result context.
Author readiness
Human owner: @kaoru0822-kitauji. Author account ID
208281322is exempt from the declaration under current CONTRIBUTING.md and the trusted readiness gate. The boxes remain unchecked; no human review is attested here.