LearnNewsExamplesServices
Frontmatter
id13744
titleClean legacy generic named-peer wake routes
stateClosed
labels
bugairegressionarchitecturemodel-experience
assigneesneo-gpt
createdAtJun 21, 2026, 11:54 AM
updatedAtJun 21, 2026, 8:58 PM
githubUrlhttps://github.com/neomjs/neo/issues/13744
authorneo-gpt
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtJun 21, 2026, 8:58 PM

Clean legacy generic named-peer wake routes

Closed v13.1.0/archive-v13-1-0-chunk-5 bugairegressionarchitecturemodel-experience
neo-gpt
neo-gpt commented on Jun 21, 2026, 11:54 AM

Context

Release classification: post-release Agent Harness reliability follow-up (non-release-blocking unless the operator promotes it).

#13481 was filed for same-app wake routing correctness after live data showed named Claude peers with unsafe same-app wake routes. Grace V-B-A'd the code side on 2026-06-21: route collapse and incomplete-address validation are now fixed and tested on dev, but she asked for live-data confirmation before closing the original ticket.

Read-only audit against the live Codex Memory Core graph on 2026-06-21:

node ai/scripts/migrations/migrateWakeSubscriptions.mjs --audit --db /Users/Shared/codex/neomjs/neo/.neo-ai-data/sqlite/memory-core-graph.sqlite

[migrateWakeSubscriptions] AUDIT — scanned 9 bridge-daemon wake route(s)

  empty-address (addressType set, no resolvable instance address → fails closed at delivery, peer misses wakes): 0

  generic-named-peer (named identity on an appName-only route → ambiguous with multiple same-app instances; verify default instance or assign an address): 5
    [GENERIC] WAKE_SUB:fc6eace1-b0a3-49fd-9fa1-9f3418db8289  owner=@neo-opus-ada  app=Claude
    [GENERIC] WAKE_SUB:890919e3-7088-47de-a81c-2c5c6bf4dfc2  owner=@neo-gpt  app=Codex
    [GENERIC] WAKE_SUB:6d1d22ae-8a3f-43c9-884c-4d555b1bef9b  owner=@neo-gemini-pro  app=Antigravity
    [GENERIC] WAKE_SUB:7648b86c-2f1e-43a8-95a6-cc399f66a938  owner=@neo-gpt  app=Codex
    [GENERIC] WAKE_SUB:1b7cdb3a-2ae0-4262-9778-c4b86d4bc92a  owner=@neo-opus-ada  app=Claude

Dry-run of the current migration against the same DB does not clean the generic named-peer findings; it only patches one Codex adapter value:

node ai/scripts/migrations/migrateWakeSubscriptions.mjs --db /Users/Shared/codex/neomjs/neo/.neo-ai-data/sqlite/memory-core-graph.sqlite

[PATCH] Subscription WAKE_SUB:890919e3-7088-47de-a81c-2c5c6bf4dfc2 (Owner: @neo-gpt) | adapter: codex-app-server → osascript

Live latest-open sweep: checked latest 20 open issues on 2026-06-21; no equivalent data-migration issue found. Exact live search for generic named peer wake route migrateWakeSubscriptions returned no open issues. A2A recency sweep: latest 30 messages showed Grace's #13481 confirmation ask and Vega's unrelated #9980 claim; no competing claim for this residual.

The Problem

The code path now rejects new empty-address routes and distinguishes same-app instance-addressed route keys, but live graph data still contains generic app-only routes for named peers. For Claude, the two Ada app=Claude rows are exactly the class of same-app ambiguity #13481 was filed to prevent.

A diagnostic that merely reports the rows is not enough if the route remains active and can still wake the wrong same-app peer. We need a bounded cleanup path that turns the audit into either:

  1. safe explicit instance-addressed routes;
  2. a consciously marked default-instance route where app-only routing is intended; or
  3. retired stale duplicates.

The Architectural Reality

  • ai/scripts/migrations/migrateWakeSubscriptions.mjs can audit emptyAddress and genericNamedPeer findings, but runMigration() only patches metadata keys present in committed identity templates.
  • ai/graph/identityRoots.mjs deliberately keeps per-operator instance paths out of committed identity templates; instance addresses must come from boot/runtime data, not hard-coded local paths.
  • WakeSubscriptionService.validateHarnessTargetMetadata() now rejects new incomplete instance-addressed routes, but it does not rewrite old graph rows.
  • #13481 should not be closed as live-clean while generic named-peer rows persist for @neo-opus-ada / Claude.

The Fix

Add a narrow cleanup path for genericNamedPeer audit findings.

Candidate shape:

  1. Extend migrateWakeSubscriptions or add a sibling maintenance command that can handle genericNamedPeer rows explicitly.
  2. For each finding, choose one documented outcome: update from current boot/runtime instance metadata, mark as intentional default-instance if policy allows that, or retire duplicate/stale rows.
  3. Preserve the invariant that operator-local userDataDir paths are not committed into identityRoots.mjs.
  4. Re-run read-only audit after cleanup and post the before/after result on #13481.

Contract Ledger Matrix

Target Surface Source of Authority Proposed Behavior Fallback / Edge Case Docs Evidence
Live WAKE_SUBSCRIPTION graph rows #13481 + migrateWakeSubscriptions --audit Active named-peer bridge routes are either instance-addressed, explicitly default-marked, or retired. If a deployment intentionally keeps app-only routing, it must be marked so audit output no longer masquerades as an unresolved ambiguity. ai/scripts/migrations/migrateWakeSubscriptions.mjs Before/after audit output.
Migration/maintenance command migrateWakeSubscriptions.mjs Dry-run shows the generic named-peer cleanup plan; apply mode commits it atomically. If local instance metadata is unavailable, command fails closed and reports the owner/route requiring operator input. Script help/JSDoc Focused unit coverage or dry-run fixture coverage.
Identity templates ai/graph/identityRoots.mjs Templates stay machine-agnostic; no committed per-operator userDataDir path. Default-instance policy, if accepted, is represented as portable metadata, not a local path. Existing identity template comments Diff review + tests.

Decision Record impact

Aligned with #13481, #12399, and #11822. No ADR change required.

Acceptance Criteria

  • A dry-run maintenance command reports an explicit cleanup plan for genericNamedPeer rows rather than silently skipping them.
  • Apply mode can clean/retire/mark the current generic named-peer rows without hard-coding operator-local paths into committed identity templates.
  • Post-cleanup audit against the live graph reports empty-address: 0 and no unresolved generic named-peer ambiguity for @neo-opus-ada / Claude.
  • The #13481 issue thread receives the before/after audit evidence and a clear close/disposition recommendation.
  • Existing instance-address validation and duplicate-route collapse tests remain green.

Out of Scope

  • Changing A2A message semantics.
  • Reworking wake delivery beyond bridge-daemon named-peer route cleanup.
  • Proving every GUI app instance live; this ticket owns data cleanup and audit evidence.

Avoided Traps

  • Do not hard-code /Users/... userDataDir paths in committed identity templates.
  • Do not treat the current audit warning as a passing state for #13481.
  • Do not blindly delete all generic routes without preserving the valid default-instance case if that policy is intentionally kept.

Related

Related: #13481 Related: #12402 Related: #12399 Related: #11822

Origin Session ID: 747ae298-5a6e-4416-b90d-7786e184aa54

Retrieval Hint: #13481 migrateWakeSubscriptions genericNamedPeer audit generic app-only route Ada Claude data cleanup

tobiu referenced in commit afe0b56 - "feat(ai): clean generic named-peer wake routes (#13744) (#13789)" on Jun 21, 2026, 8:58 PM
tobiu closed this issue on Jun 21, 2026, 8:58 PM