task core: delete the inert may_enter model and deferral machinery (#173) - #257
Merged
Conversation
) Completes the CM#705 adoption's mechanical arc (after #251/#252/#255): the model that #255 left defined-but-inert is deleted. ComponentInstanceState loses mayEnter, parent, mayEnterFrom/enterFrom/leaveTo, enteringSet, selfAndAncestors, the M0 enter()/leave() helpers, and the synthetic per-instantiation root (rootOf/isSyntheticRoot/releaseSyntheticRootOnPoison, plan v3 amendment 4). The #155/#156/#161 deferral machinery goes with it: dispatchableTail deleted, serviceSettled dispatches every non-stale tail, hasServiceableSettled is queue-non-empty, and driveAsync's winner guard keeps only its live #161 content (membership + promise-identity). cabi's real-instance discriminator (dtor path) re-keys from the reentrance method triple onto an explicit COMPONENT_INSTANCE brand symbol in cabi/context.ts - structural matching on ComponentInstanceLike would have started gating the bare {handles, mayLeave} test doubles that deliberately ride the impl === null path. Poisoning is untouched. Contracts (orchestrator): plan-format.md gains the CM#705 adoption amendment retiring the instance-tree question wire-form- free (v1 am. 4 void, v3 am. 4 deleted runtime-side, reopen clause carried over); the stale reentrance prose in harness/src/xfail.ts's reentrance banner is aligned with the landed adoption.
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.
Final mechanical step of the CM#705 adoption arc (#251 re-key → #252 pin advance → #255 gate removal → this). Everything #255 left defined-but-inert is deleted; net −227 lines.
Deleted
ComponentInstanceState:mayEnter,parent,mayEnterFrom/enterFrom/leaveTo/enteringSet/selfAndAncestors,enter()/leave(), and the synthetic per-instantiation root (rootOf/isSyntheticRoot/releaseSyntheticRootOnPoison, plan v3 amendment 4).dispatchableTailgone;serviceSettleddispatches every non-stale tail (poisoned tails still retire viaresumeWith's early return);hasServiceableSettled= queue-non-empty (its tick-gating purpose is unchanged);driveAsync's winner guard keeps only its live scheduler: settled tails defer while their instance is not host-enterable #161 content — membership + promise-identity, the stale-tag/consumed-settlement protections.One behavioral-equivalence subtlety
cabi's dtor-path discriminator (
asGate) matched the reentrance method triple to tell a real component instance from a host/imported resource. The obvious structural replacement (ComponentInstanceLikeshape) would have changed behavior: bare{handles, mayLeave}test doubles deliberately ride theimpl === null(ungated) path and match that shape. Replaced with an explicitCOMPONENT_INSTANCEbrand symbol (cabi/context.ts, so cabi keeps not importing task/) — reproduces the old population exactly.Contracts/docs (orchestrator-authored)
formatVersionbump: the wire never carried any of this.(reentrance forbidden)qualifier in task core: remove the may_enter reentrance gates (CM#705 adoption, #173) #255; the adoption is no longer "still-open work").Poisoning (
poisonedInstances/entryRefusal/withPoisonCause/notifyInstancePoisoned) is untouched. Out of scope, unchanged: #249 (sync-call scheduling — scope re-derived on the issue, includes a #43 adjudication revisit), #250 (blocked on CM#716).Gates
Full local
just gatespass: core suites (678 runtime tests), conformance (1475 cmds, 0 failed, xfail set unchanged,builtin-trap-poisons-instancegreen), sched-seeds, shells, browser lanes, smoke-tls, smoke-c0. Not breaking: deleted members were runtime-internal; the exported package surface is unchanged.