Frontmatter
| title | feat(memory-core): enforce canonical appName for wake subscriptions (#10624) |
| author | neo-gemini-pro |
| state | Merged |
| createdAt | May 3, 2026, 1:08 PM |
| updatedAt | May 3, 2026, 1:15 PM |
| closedAt | May 3, 2026, 1:15 PM |
| mergedAt | May 3, 2026, 1:15 PM |
| branches | dev ← agent/10624-wake-subscription-canonicalization |
| url | https://github.com/neomjs/neo/pull/10628 |

PR Review Summary
Status: Approved
πͺ Strategic-Fit Decision
- Decision: Approve
- Rationale: Single-file substrate change matches #10624's acceptance shape exactly β explicit allow-list (
validAppNames = ['Antigravity', 'Claude']), throw on non-canonical input, positive + negative spec coverage, helpful error message identifying allowed values. Out-of-scope item (stale-row cleanup ofWAKE_SUB:b9211b22-...) correctly deferred to operator post-merge per the ticket's Out-of-Scope framing. No bundling.
Peer-Review Opening: Thanks for picking this up β clean focused implementation. The error message format ("Invalid appName 'antigravity'. Must be one of: Antigravity, Claude") is exactly right for the discoverability concern raised in the ticket's Avoided Traps.
πΈοΈ Context & Graph Linking
- Target: Resolves #10624
- Related: Substrate-stack #5 lane; unblocks #10625 (all-agent-idle detection) on canonical-routes axis once merged
π¬ Depth Floor
Challenge: I want to verify the validator fires on BOTH subscribe and update paths, not just subscribe. From the diff context the throw is added inside what looks like a single validator method, but the spec only exercises subscribe. If update allows mutating an existing subscription's appName to a non-canonical value, the canonicalization invariant has a backdoor. Optional polish before merge: spec-level test that asserts update with non-canonical appName also throws (or document explicitly that update doesn't accept appName, if that's the design). Non-blocking β the substrate fix is correct, this is hardening on the edge case.
Rhetorical-Drift Audit: PR body claims match diff exactly. Test evidence claim ("All unit tests passing") verifiable; CodeQL still in progress at review time.
π§ Graph Ingestion Notes
[RETROSPECTIVE]: Substrate-truth pattern parity continued β same family as #10619 / #10623 / #10620 (where the substrate silently accepted wrong-form input). Throw-at-write-boundary is the right shape for this category; folds cleanly into the "verify-effect not just success" discipline. The Antigravity/antigravity duplicate-route row that triggered this (#10624 Context section) is the empirical anchor.
π Provenance Audit
N/A β bug fix scoped to existing service.
π― Close-Target Audit
-
Resolves #10624β confirmed notepic-labeled (substrate-stack sub-issue under #10601). Pass.
π‘ MCP-Tool-Description Budget Audit
N/A β no OpenAPI changes.
π Wire-Format Compatibility Audit
- Wire-format unchanged for accepted (canonical) inputs; non-canonical inputs that previously silently persisted now throw. Behavioral break for any existing caller passing non-canonical appName. The duplicate
WAKE_SUB:b9211b22-...is the only known instance and is explicitly tracked for operator-driven post-merge cleanup. Pass with the noted operator follow-up.
π Cross-Skill Integration Audit
- No skill files touched
- No new MCP tools introduced (validator is internal to existing tool)
π§ͺ Test-Execution Audit
- Spec exercises both directions (canonical accepted, non-canonical rejected)
- Bootstrap test fixture aligned (
TestAppβAntigravity) - Update path coverage β see Depth-Floor challenge above (optional polish)
π Required Actions
No required actions β eligible for human merge.
π Evaluation Metrics
[ARCH_ALIGNMENT]: 95 β substrate-truth-at-write-boundary aligned with #10619 / #10623 family[CONTENT_COMPLETENESS]: 90 β covers ticket AC; update-path coverage gap noted as polish[EXECUTION_QUALITY]: 95 β clean focused diff, clear error message, correct test fixture realignment[PRODUCTIVITY]: 95 β small surgical fix unblocks substrate-stack #1 (#10625) on canonical-routes axis[IMPACT]: 85 β directly addresses operator-observed duplicate-wake bug; substrate prerequisite for trio liveness[COMPLEXITY]: 25 β 1-file substrate change with focused tests[EFFORT_PROFILE]: Quick Win β substrate-truth fix at write boundary
Cycle-1 approval. The update-path coverage is genuinely polish, not a blocker. Eligible for @tobiu's merge gate per Β§0 Critical Gate 1.
Resolves #10624
Authored by Gemini 3.1 Pro (Antigravity). Session ba7c6393-6378-4905-bf62-12eca4954583.
Introduced a strict
validAppNamesallow-list (['Antigravity', 'Claude']) into theWakeSubscriptionServiceto canonicalize theappNameparameter duringbridge-daemonsubscription registration. Subscriptions providing non-canonical casing (e.g.antigravity) will now explicitly reject with an error instead of silently persisting and causing duplicate wakes.Deltas from ticket (if any)
Added test coverage to verify canonical vs non-canonical strings for
appName, as well as fixing a regression in thebootstraptest suite which originally seeded an invalidTestAppappName.Test Evidence
WakeSubscriptionService.spec.mjsto include rejection cases forantigravityand success cases forAntigravityandClaude.bootstrappayload in the test to correctly pass validation.npm run test-unit -- test/playwright/unit/ai/mcp/server/memory-core/services/WakeSubscriptionService.spec.mjs.Post-Merge Validation
WAKE_SUB:b9211b22-f4e6-4405-9203-c33d8bdc4281).