PR 029 P2: Capture settlement Promise then - #32
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 intrinsic ChangesPromise settlement hardening
Estimated code review effort: 4 (Complex) | ~45 minutes Merge Risk: ⚪ Minimal · up to This is a localized settlement-hardening change with passing validation and no actionable merge-blocking correctness or production risk remaining at the current head. Sequence Diagram(s)sequenceDiagram
participant ProcessTransport
participant CapturedThen
participant ChildProcess
participant ReleasePromise
ProcessTransport->>CapturedThen: attach reaping and release handlers
CapturedThen->>ChildProcess: observe process settlement
ChildProcess-->>ProcessTransport: report reaping result
CapturedThen->>ReleasePromise: observe release settlement
ReleasePromise-->>ProcessTransport: resolve or reject
CapturedThen-->>ProcessTransport: throw during setup
ProcessTransport->>ProcessTransport: apply explicit fallback outcome
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. Already looking forward to the next diff. 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". |
36f8ae0
into
repair/pr025-normalization-release-order
Purpose
Stacked validation PR for:
AUDIT-PR029-UNCAPTURED-PROMISE-THEN-DEFEATS-SETTLEMENTThis 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 PR #25.
It does NOT directly target protected PR #10.
Finding
Classification:
CURRENT P2Ownership:
InheritedAt exact protected parent HEAD:
7a99af69ba7e4eeb22ec729de40c18a578ac4bb3settlement-critical process transport paths invoked
.then(...)through an ordinary mutable property lookup.Hostile code reachable before those settlement registrations could replace:
Promise.prototype.thenA swallowing hook could prevent caller settlement indefinitely.
A throwing hook could replace the intended caller-visible terminal reason.
On the Windows helper-reap path, the same defect could also leave a discarded rejection and unhandled-rejection evidence.
The defect reproduced identically against the parent lineage and was not introduced by PR #29.
Repair
The bounded repair:
Promise.prototype.thenat module evaluation;Reflect.apply;.thenlookup from both proven settlement-critical sites;Promiseconstructor /@@speciesprologue failure at those same sites;TIMED_OUT / DIRECT_CHILD_ONLYbehavior on the Windows helper path;Symbol.hasInstancehardening repair;Changed files exactly:
src/adapters/process-transport.tstests/adapters/process-transport.test.tsExact quarantine identity
Protected parent PR #29 HEAD:
7a99af69ba7e4eeb22ec729de40c18a578ac4bb3Repair commit:
556d642da1465e9510b8f94a9729ac917da2faf7Validated patch SHA-256:
4692AF8D661ADD0706739D053B711D174A548D5A65FF6033B6D65B3BA85BE939Patch bytes:
28709Changed 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:
.thenhooks are genuinely installable and reachable;Promiseconstructor /@@speciespre-registration hazard;.thensites;Validation evidence
Focused adversarial tests:
4 passedComplete process transport:
150 passed, 9 skippedFull suite:
1185 passed, 9 skippedTypecheck:
PASSLint:
PASSBuild:
PASSgit diff --check:PASSValidation host:
Windows.
The 9 skipped tests are POSIX-gated tests.
No Windows result is claimed as proof of POSIX runtime behavior.
Out-of-scope inherited tracks
This PR does NOT repair:
AUDIT-PR025-ABSORBER-LOST-ON-PARTIAL-LISTENER-CLEARThis PR does NOT repair:
AUDIT-PR026-TEMPDIR-SILENT-LEAKAny broader inherited
Promise/await/species behavior not required to close this exact finding also remains outside this repair.Those tracks must remain independently quarantined and reverified before repair.
Protected invariants
This repair preserves:
SPAWN_FAILEDlaundering;AgentExchangelaundering;shell:false;Quarantine rule
This DRAFT PR is evidence/proposal only.
Do not merge it because implementation, independent validation, CI, CodeRabbit, or Codex reports success.
Required before upward integration into PR #29:
Summary by CodeRabbit