teardown/park residuals: poison-marker health test, settle-proof lender release - #107
Merged
Conversation
mayEnter === false was an unsound proxy for deadness: a caller instance is non-enterable for the whole duration of a cross-component call, so a healthy caller task parked on an end the trapping callee also held was silently retired — stranded, the outcome #66 exists to prevent. The walk now consults isInstancePoisoned (the #82 marker, recorded at the single seam every bracket-break site routes through; the synthetic root is never marked); everyone else gets the spec-shaped outcome (stream: DROPPED; unwritten future: the #84 abandonment trap). The B2 phantom-event concern applies exactly to the poisoned population the new predicate keeps silent — argued at the site. Both directions pinned; the stranding legs fail on the old predicate.
SuspensionPoint gains an onSettled finally-style hook: exactly once on every terminal transition (produce-success, produce-throw, abandon), never throwing past the settle. The FACT sync-start park's lender release keeps its produce-first ordering and adds the hook as an idempotent backstop; the async-start determinacy park unwinds its subtask's lenders only when report() never completed (a blanket unwind would cancel a live subtask — pinned). Settle-path enumeration lives at the sync fix site; the cleanup-only-in-produce siblings it surfaced are #106. Mutation-verified: disabling the hook turns 4 of 6 new tests red.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Wave 3 of the adversarial-review remediation (waves 1-2: #103, #104) —
the two findings the implementation waves themselves surfaced.
Fixes #100, #102.
dropSharedForTeardownclassifies parked peers by theper-instance poison marker (recorded at the
notifyInstancePoisonedseam all five bracket-break sites route through; lift atomicity: gate host entry on jspi hop quiescence; retire poisoned late-settles #82's machinery)
instead of the unsound
mayEnter === falseproxy. A healthy callertask parked on an end a trapping callee also held now gets the
spec-shaped outcome (stream DROPPED / task/streams: trap-poisoning walk delivers DROPPED to a parked guest future reader (internal assert; walk aborts) #84 abandonment trap) instead
of being silently stranded; a poisoned instance's own parked tasks
stay silently retired (the B2 phantom-event discipline). Both
directions pinned; regression legs fail on the old predicate.
SuspensionPointgains anonSettledfinally-style hook(exactly once per terminal transition: produce-success,
produce-throw, abandon). FACT start-call parks discharge their
lender scopes through it as an idempotent backstop; success-path
ordering unchanged; the async-start park unwinds only provably
orphaned subtasks. Settle-path enumeration documented at the site.
Cleanup-only-in-produce siblings surfaced by the audit: parks: cleanup-only-in-produce siblings of #102 (hasSyncWaiter, numWaiting, sync host-import lenders) #106.
Gates
test-runtime 475/0, conformance (1395 cmds, 0 failed, no stale
xfails), sched-seeds both seeds — on the combined tree.