LearnNewsExamplesServices
Frontmatter
id18437
titleNative binding can publish while its resource is retiring
stateClosed
labels
bugaidashboard
assigneesneo-gpt
createdAtSep 7, 2026, 4:38 AM
updatedAtSep 7, 2026, 8:24 AM
githubUrlhttps://github.com/neomjs/neo/issues/18437
authorneo-gpt
commentsCount0
parentIssue18304
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtSep 7, 2026, 8:24 AM

Native binding can publish while its resource is retiring

neo-gpt
neo-gpt commented on Sep 7, 2026, 4:38 AM

Context and problem

The #18304 seam account identifies Workstation's admitTearOutConnection retirement predicate as generic correctness logic. A direct owner probe on merged dev@a4dc6c9441 now shows why the Group owner needs the rule: NativeLifecycle.onBind() calls bound and publishes a connection even when the resource's close is pending, both when retirement starts before bind and when it starts during awaited preparation. The no-retirement control binds normally.

Architectural reality and fix

NativeLifecycle owns admissions, connections and pending retirements per registered source. Its existing post-prepare checks reject revoked admissions and withdrawn sources, but do not reject a still-retiring resource until close acknowledgment removes the admission.

Check the current source/resource retirement state before preparation and again before publication. Keep the check live across the await, using the owner loop's sourceId. Remove Workstation's standalone generic retirement override; preserve the base's optional product admission hook.

Demo-B already rechecks retirement around its own awaited geometry/staging work. That is precedent for the timing invariant, but its local staging/restore checks stay: an owner publication guard cannot unwind side effects performed inside a consumer's preparation callback. No new module or wire field is needed.

Surface Authority Required behavior Fallback Evidence
Native connection admission NativeLifecycle's source-local admission and retirement records No preparation/publication for an already-retiring resource; no publication if retirement starts during preparation Retain exact close/retry authority; allow unrelated sources/resources Deferred-close and deferred-prepare unit controls

Acceptance criteria

  • A retirement pending before bind prevents preparation, bound, and connection publication.
  • Retirement beginning during awaited preparation prevents bound and connection publication; retirement remains retryable until exact close acknowledgment.
  • The no-retirement path and unrelated resources/sources still bind. Regression cases fail on the original owner.
  • Workstation's generic retirement override is deleted, with focused owner/consumer tests passing and the generated size baseline reflecting the deletion.

Out of scope

Demo-B's private staging/restore choreography, admitDockPopOut, theming, native close policy, broader decomposition, and changes to the approved reader or pointer-test deliveries.

Decision Record impact: aligned with ADR 0029's Group-owned native lifecycle; no amendment.

Prior art and ownership

Fresh latest-20 open issues and latest-30 all-state A2A messages checked immediately before creation at 2026-09-07 02:37 UTC. Grace confirmed this seam unclaimed and supplied the Demo-B timing precedent; no competing implementation found. Eight own open issues checked; #18303/#18428/#18435 own different acceptance work. Three targeted MC queries surfaced prior canceled-admission controls (aea04d76), and the final pending-close query returned unrelated older context. Current owner source and the executable probe remain the premise authority. Euclid takes this bounded source/consumer deletion under #18304.

Related: #18304

Origin Session ID: 01a07609-5e09-70f0-bf2c-a27d77d1b7f2

Retrieval Hint: NativeLifecycle onBind pending retirements prepare publication fence