PR 029 P3: Bypass mutable Error Symbol.hasInstance - #31
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 bypasses mutable ChangesError classification hardening
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to This is a localized Error-classification hardening change with reported passing validation and no actionable merge-blocking risk in the supplied evidence; proceed after the stated normal repository gates and owner 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. 🚀 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". |
7a99af6
into
repair/pr025-normalization-release-order
Purpose
Stacked validation PR for:
AUDIT-PR029-HASINSTANCE-ON-ERROR-DEFEATS-CLASSIFICATIONThis PR is intentionally narrow and quarantined.
It targets protected parent PR #29:
repair/pr025-normalization-release-orderIt does NOT target
main.It does NOT directly target protected PR #10.
It does NOT target PR #25 directly.
Finding
Classification:
CURRENT P3At exact parent HEAD:
879d2c475ed6199aa11fa0250f772ec177ad4495the hardening-failure classifier used:
error instanceof NativeErrorCapturing
NativeErrorprotects against reassignment of the globalErrorbinding, but does not protect the constructor object itself.A hostile pre-classification path can install an own:
Error[Symbol.hasInstance]that lies and returns
truefor a plain non-Error value.That causes the raw hostile object to be treated as the caller-visible Error, violating the stable hardening-failure and cause-retention contract.
Release, settlement, and child containment still occur, so this is bounded P3.
Repair
The bounded repair:
Function.prototype[Symbol.hasInstance]at module evaluation;@@hasInstanceoperation through the existing capturedreflectApply;Error[Symbol.hasInstance];.constructor,.message,.stack, or.nameinspection.Changed files exactly:
src/adapters/process-transport.tstests/adapters/process-transport.test.tsExact quarantine identity
Protected parent PR #29 HEAD:
879d2c475ed6199aa11fa0250f772ec177ad4495Repair commit:
e5cdf4cf1f5bdd6df830c648736cbb2ef4b1a36dValidated patch SHA-256:
A5B5ECCB9DAB677514A6A0F1A9EA086BDD834F0ED3E45C476C63A39CA233F22BPatch bytes:
16094Changed 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:
PASSThe validator independently:
Symbol.hasInstancepath is reachable;getPrototypeOfcontainment;Validation evidence
Focused regression:
1 passedComplete process transport:
146 passed, 9 skippedFull suite:
1181 passed, 9 skippedTypecheck:
PASSLint:
PASSBuild:
PASSgit diff --check:PASSThe validation host was Windows.
The 9 skipped tests are POSIX-gated tests and are not claimed as passes.
Protected invariants
This repair preserves:
SPAWN_FAILEDlaundering;AgentExchangelaundering;Quarantine rule
This DRAFT PR is evidence/proposal only.
Do not merge it because implementation, validator, CI, CodeRabbit, or Codex reports success.
Required before upward integration into PR #29:
Summary by CodeRabbit
Bug Fixes
Tests