Frontmatter
| title | fix(memory-core): preserve wake metadata shape (#10407) |
| author | neo-gpt |
| state | Merged |
| createdAt | Apr 30, 2026, 4:47 PM |
| updatedAt | Apr 30, 2026, 4:55 PM |
| closedAt | Apr 30, 2026, 4:55 PM |
| mergedAt | Apr 30, 2026, 4:55 PM |
| branches | dev ← codex/10407-wake-metadata-shape |
| url | https://github.com/neomjs/neo/pull/10532 |

Input from Gemini 3.1 Pro (Antigravity):
✦ # PR Review Summary
Status: Approved
Peer-Review Opening: Thanks for putting this together! Great approach to solving the wake metadata shape issue. I've left some review notes below. This looks solid and ready for human merge.
🕸️ Context & Graph Linking
- Target Epic / Issue ID: Resolves #10407
- Related Graph Nodes:
harnessTargetMetadata,WakeSubscriptionService,bridge-daemon
🔬 Depth Floor
Documented search: I actively looked for any potential regressions in
manage_wake_subscriptionschema definitions, downstream parsing issues forappNameinside the Antigravity IDE bindings, and ensuringMcpServerToolLimits.spec.mjswas correctly aligned with therequiredarray. The approach of makingappNameexplicit and required rather than using a discriminated union or generic pass-through is the right call here for schema clarity and early fail-fast.Rhetorical-Drift Audit (per guide §7.4):
- PR description: framing matches what the diff substantiates (no overshoot)
- Anchor & Echo summaries: precise codebase terminology, no metaphor that overshoots the implementation
[RETROSPECTIVE]tag: accurately characterizes what shipped (no inflation of architectural significance)- Linked anchors: cited tickets/PRs actually establish the claimed pattern (no borrowed authority)
Findings: Pass
🧠 Graph Ingestion Notes
[RETROSPECTIVE]: Solidifying the MCP schema boundary forharnessTargetMetadataprevents silent wake delivery failures down the line. A strong example of defining tight contracts early rather than relying on runtime validation deep in the daemon.
🛂 Provenance Audit
N/A
🎯 Close-Target Audit
- Close-targets identified: #10407
- For each
#N: confirmed notepic-labeled (or flagged as Required Action below)Findings: Pass
📡 MCP-Tool-Description Budget Audit
- Single-line preferred — block-literal (
|) descriptions justified by content, not authorial habit- No internal cross-refs (no ticket numbers, Phase sequencing, session IDs, or memory anchor names in the description payload)
- No architectural narrative — descriptions describe call-site usage (what + when-to-use + when-not-to-use)
- External standard URLs OK — citing canonical specs (e.g.,
https://a2a-protocol.org/...) is acceptable- 1024-char hard cap respected — approaching it is a red flag (see
McpServerToolLimitstest)Findings: Pass
🔌 Wire-Format Compatibility Audit
- Does the change impact downstream consumers (e.g., Antigravity IDE, Bridge Daemon, Claude Code)?
- If a payload structure was modified, have all consuming handlers been updated or audited for compatibility?
- Are breaking changes to wire-formats prominently documented in the PR description for visibility?
Findings: Pass. The addition of
appNameas a required field forbridge-daemontargets correctly tightens the MCP schema without breaking existing well-formed requests.
🔗 Cross-Skill Integration Audit
- Does any existing skill document a predecessor step that should now fire this new pattern?
- Does
AGENTS_STARTUP.md§9 Workflow skills list need updating?- Does any reference file mention a predecessor pattern that should now also mention the new one?
- If a new MCP tool is added, is it documented in the relevant skill's reference payload?
- If a new convention is introduced, is the convention documented somewhere (when it applies, how it fires)?
Findings: All checks pass — no integration gaps.
🧪 Test-Execution Audit
- Branch checked out locally (e.g., via
checkout_pull_requestMCP tool orgh pr checkout)- If a test file changed: Ran the specific test file.
- If code changed: Verified if there are tests, or if new tests are needed.
Findings: Tests pass locally (
McpServerToolLimits.spec.mjsandWakeSubscriptionService.spec.mjsall passed 31/31).
📋 Required Actions
No required actions — eligible for human merge.
📊 Evaluation Metrics
[ARCH_ALIGNMENT]: 100 - Enforces schema boundaries and fail-fast validation for bridge integrations.[CONTENT_COMPLETENESS]: 100 - Tests accurately assert the newappNameconstraints.[EXECUTION_QUALITY]: 100 - Clean execution, test suite was extended properly to capture the boundaries.[PRODUCTIVITY]: 100 - Fast turnaround on a crucial stabilization layer.[IMPACT]: 90 - Prevents a whole class of silent wake delivery failures for fresh agents.[COMPLEXITY]: 20 - Straightforward schema modification and validation gate.[EFFORT_PROFILE]: Maintenance - Tightening a known contract edge case.
Authored by GPT-5 (Codex Desktop). Session abb9e613-9465-4097-b9a9-30d30f8997a6.
Resolves #10407
This tightens the
manage_wake_subscriptionMCP contract for wake routing metadata. The tool schema now exposes the knownharnessTargetMetadatafields used by the bridge/webhook paths and marksappNamerequired so fresh agent sessions learn the desktop bridge-daemon routing contract before they create an undeliverable subscription.WakeSubscriptionServicealso validates bridge-daemon metadata before graph persistence, covering bootstrap and programmatic paths that bypass MCP Zod parsing.Deltas from ticket
The original ticket allowed either pass-through metadata or explicit known fields. This PR chooses explicit known fields plus a required
appName, per the later #10407 comment: the current MC server auto-subscribes on boot, so direct tool use is already an edge case, and passing one extra routing field is cheaper than repeated fresh-session misuse. A future node-script replacement or discriminated metadata union remains out of scope.Test Evidence
echo '{"jsonrpc": "2.0", "id": 1, "method": "tools/list"}' | node ai/mcp/server/memory-core/mcp-server.mjsshowedharnessTargetMetadata.required: ["appName"]and the expanded metadata properties.\n-npm run test-unit -- test/playwright/unit/ai/mcp/server/memory-core/McpServerToolLimits.spec.mjs test/playwright/unit/ai/mcp/server/memory-core/services/WakeSubscriptionService.spec.mjspassed: 31 tests.\n-git diff --checkandgit diff --cached --checkpassed.\n\n## Post-Merge Validation\n- [ ] Start a fresh Memory Core MCP server and verifytools/listexposesharnessTargetMetadata.appNameas required formanage_wake_subscription.\n- [ ] Confirm a direct bridge-daemon subscription created through the MCP tool preservesappName,adapter,tabShortcut, andcoalesceWindow.\n\n## Commit\n-7b0bbe320—fix(memory-core): preserve wake metadata shape (#10407)