PR 029 P2: Capture stable Error intrinsic - #30
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe process transport now captures the native ChangesProcess transport hardening
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to The change is narrowly scoped to stabilizing Error handling and adds focused regression coverage; no actionable merge-blocking risk remains after normal checks and review. Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
@codex review |
|
Codex Review: Didn't find any major issues. Swish! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
879d2c4
into
repair/pr025-normalization-release-order
Purpose
Stacked validation repair for the exact-current PR #29-owned finding:
PR029-CODEX-HOSTILE-GLOBAL-ERROR-CONSTRUCTOR-SKIPS-RELEASEThis PR is intentionally narrow and quarantined.
It targets protected parent PR #29 branch:
repair/pr025-normalization-release-orderIt does NOT target
main.It does NOT directly target PR #25.
It does NOT directly target protected PR #10.
It does NOT modify sibling PR #22.
Finding
Classification:
CURRENT P2Exact affected parent HEAD:
f5fe331108b4b215ac02fb50626d60b3a773f583A hostile thrown value can execute code during
instanceofclassification and replace the mutable globalErrorbinding.The hardening-failure path then performs fallback construction through a fresh
Errorlookup.A hostile replacement constructor can throw in the first fallback and again in the guarding
catch.The second throw escapes before
releaseUnprotectedChild(...)begins.Because the child has already been created, this can skip the required bounded release attempt and leave the child alive.
The defect was independently reproduced on the exact affected parent HEAD with a real abandoned child.
Repair
The bounded repair captures the trusted
Errorintrinsic at module evaluation alongside the module's existing captured intrinsics.The hardening-failure classification block uses that stable captured binding for:
This prevents hostile mid-exchange mutation of
globalThis.Errorfrom changing classification or routing fallback construction through attacker-controlled code.The repair preserves classification before release so release-time hostile child accessors cannot mutate the Error chosen for caller-facing rejection.
Changed files exactly:
src/adapters/process-transport.tstests/adapters/process-transport.test.tsProtected invariants
The repair preserves:
SPAWN_FAILEDlaundering;AgentExchangelaundering;Exact quarantine identity
Protected parent PR #29 HEAD:
f5fe331108b4b215ac02fb50626d60b3a773f583Repair commit:
19a8d56df0a42886d73affb595ee893cbe2dd541Validated patch SHA-256:
8CB59F61A33521677E607A84749283AD9E1B07BBE71F70665FC48DD8B1AA2A72Patch bytes:
10701Changed files exactly:
src/adapters/process-transport.tstests/adapters/process-transport.test.tsThe committed patch was mechanically verified byte-for-byte identical to the candidate that passed fresh independent validation.
Independent validation
Fresh independent validation result:
PASSThe validator independently:
Errormutation is reachable;instanceof NativeErroris load-bearing because pre-catch poisoning can otherwise destroy ordinary Error identity;SPAWN_FAILEDlaundering;AgentExchangelaundering;git diff --check;Validation evidence
Complete
tests/adapters/process-transport.test.ts:145 passed, 9 skippedFull suite:
1180 passed, 9 skippedTypecheck:
PASS
Lint:
PASS
Build:
PASS
git diff --check:PASS
Validation host:
Windows
The 9 skipped tests are platform-conditional/POSIX-gated tests.
No Windows result is claimed as proof of POSIX runtime execution.
Previously tracked PR #29 findings
The independently validated candidate preserves:
PR029-CODEX-ERROR-IDENTITY-MUTATED-BEFORE-CLASSIFICATION→
FIXEDPR029-CODERABBIT-CAUSE-RETENTION-ASSERTION→
FIXEDAUDIT-PR025-HOSTILE-THROW-NORMALIZATION-SKIPS-RELEASE→
FIXEDOut-of-scope inherited findings
The following remain separate and are NOT repaired here:
AUDIT-PR025-ABSORBER-LOST-ON-PARTIAL-LISTENER-CLEARAUDIT-PR026-TEMPDIR-SILENT-LEAKThey must be reverified separately against their eventual exact parent HEAD.
Quarantine rule
This DRAFT stacked child PR is evidence/proposal only.
Do not merge it because the repair agent, validator, CI, Codex, or CodeRabbit reports success.
Required before upward integration into protected PR #29:
Summary by CodeRabbit