Repository navigation
test: remove parent IPC delay from abandoned-entry gate - #856
Conversation
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (2 files)
Notes: Incremental diff ( Previous Review Summaries (3 snapshots, latest commit a44cd27)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit a44cd27)Status: No Issues Found | Recommendation: Merge Files Reviewed (6 files changed in incremental diff)
Notes: Incremental diff ( Previous review (commit 64e84e3)Status: No Issues Found | Recommendation: Merge Files Reviewed (1 file changed in incremental diff)
Previously Reviewed Files (unchanged since last review)
Previous review (commit 8d59f68)Status: No Issues Found | Recommendation: Merge Reviewed commit Files Reviewed (5 files)
Validation notes: This was a static, read-only review of the PR diff and touched test/fixture files. I did not run tests, lint, or typecheck (package Reviewed by free · Input: 27.5K · Output: 11.2K · Cached: 160.8K |
|
This PR doesn't fully meet our contributing guidelines and PR template. What needs to be fixed:
Please edit this PR description to address the above within 2 hours, or it will be automatically closed. If you believe this was flagged incorrectly, please let a maintainer know. |
Issue for this PR
Closes #857
Refs #609. This addresses the abandoned-entry fixture latency cascade only and does not claim to close the broader issue.
Type of change
What does this PR do?
Refs #609. Removes the parent stderr/stdin round trip from the abandoned-entry regression fixture. That round trip can leave the next test's entry hook waiting on the deliberate cleanup gate until its own timeout, skipping the body that checks restored state.
A test-only preload now registers an early beforeEach before importing the unchanged real entry barrier. On the second test it schedules gate release with setImmediate. This happens after Bun cuts off the first cleanup hook, but does not itself wait for finalization. The real barrier must still join the abandoned scope before the plain test body enters.
The child runs from a fresh temporary directory with explicit preloads, so the package bunfig cannot register the real barrier ahead of the early release hook. The temporary directory is removed after the child exits.
Coverage retained
Adds a negative control that omits the real entry barrier. It must observe the plain body entering with the old active environment and one in-flight run before finalizer release. This checks that the new release hook does not make the real barrier unnecessary.
Verification and acceptance
Bun 1.3.14. Current reviewed head:
6747e106ee374669a9400b558f05c9762b01cbd1, qualified intodev-vibecodedbase3dd313a43ca5344394ebe1103ef071a901473203.--only-failures, so passing test names and child traces are not printed. The raw suite result does not provide a separate passing C2/C3/C4 timeline.git diff --checkpassed. No production, CI, workflow, Turbo, assertion or timeout-budget changes.Windows repair and limits
Failure-only phase evidence localized the earlier Windows hang after first-test body and finalizer entry, with preload imports complete. The fixture body live handle had already cleared before the outer finalizer waited on the promise gate. The repair owns an empty interval across that wait via
Effect.acquireUseRelease, reusing the tracked handle helper and afterAll fallback. The interval does not release the gate, add a sleep, delay cleanup or extend a budget. Current Windows qualification passes; this is not proof of a general Bun defect.The unchanged real barrier must still join the abandoned scope after the cutoff before the next plain body enters. The negative control omits that barrier and requires early entry with active old environment and one in-flight run. Original restoration, child join, event-order and no-late-overwrite assertions remain.
This closes narrow fixture issue #857 only. Broader #609 and separate #858/#859 remain open.
Windows run: https://github.com/mdev34-lab/silvercode/actions/runs/44290557060/job/134754391972
Linux run: https://github.com/mdev34-lab/silvercode/actions/runs/44290557060/job/134754392329
Review: #856 (comment)
Checklist