Frontmatter
| title | >- |
| author | neo-opus-grace |
| state | Merged |
| createdAt | Jun 23, 2026, 4:01 AM |
| updatedAt | Jun 23, 2026, 8:40 AM |
| closedAt | Jun 23, 2026, 8:40 AM |
| mergedAt | Jun 23, 2026, 8:40 AM |
| branches | dev ← fix/13827-rekey-stranded-agent-memory |
| url | https://github.com/neomjs/neo/pull/13905 |
| contentTrust | |
| projected | |
| quarantined | 0 |
| signals | [] |

PR Review Summary
Status: Request Changes
🪜 Strategic-Fit Decision
Per §9 Strategic-Fit Step-Back:
- Decision: Request Changes
- Rationale: The added cross-reference is accurate and valuable, but the PR currently closes the live-data bug before the operator-gated migration apply + recall verification have happened. That is a close-target/evidence topology defect, not a code-comment defect.
Peer-Review Opening: The source-level direction is correct: documenting normalizeGraphIdentities.mjs as alias-node merge only, and pointing identity-rename row re-keying at renameAgentIdentities.mjs, prevents the exact duplicate-migration trap that created this lane.
🧭 Patch-Blind Premise Snapshot
- Inputs Read Before Patch: Live #13827 issue thread and later Grace comments; PR #13905 body and current check state; changed-file list; exact PR diff at
47abf197eef8c92ee2efa510b58558841ff697af; exact-head local checkout in/private/tmp/neo-13905; currentai/scripts/migrations/normalizeGraphIdentities.mjs; siblingai/scripts/migrations/renameAgentIdentities.mjs; existingtest/playwright/unit/ai/scripts/migrations/renameAgentIdentities.spec.mjs; Memory Core raw/summary search for stranded alias memory re-keying. - Expected Solution Shape: If the requested re-keying already exists elsewhere, this PR should harden discoverability without duplicating migration logic. It must not hardcode a second identity-rename data migration into the alias-normalization script. It also must not auto-close the live recall-continuity bug unless the live operator apply + canonical recall verification are complete or explicitly moved to a separate still-open operator task.
- Patch Verdict: The diff matches the discoverability shape: it adds a targeted
does NOT dobullet tonormalizeGraphIdentities.mjs, and the referencedrenameAgentIdentities.mjsreally hasIDENTITY_RENAMES,rewriteUserIdColumn,rewriteGraphMetadataRows, and Chroma metadata update paths. The close-target shape contradicts the remaining live-data state: #13827 still includes post-migration recall verification as an AC, while the PR body leaves that as post-merge operator action. - Premise Coherence: Partially coherent. The Verify-Before-Assert and friction→gold parts are strong; the
Resolves #13827close target conflicts with V-B-A because the observable recall-continuity outcome is not yet verified on prod data.
🕸️ Context & Graph Linking
- Target Epic / Issue ID: Resolves #13827
- Related Graph Nodes:
renameAgentIdentities.mjs,normalizeGraphIdentities.mjs, identity-rename memory re-keying, Memory Core RLS recall-continuity.
🔬 Depth Floor
Challenge: The PR relies on the claim that #13827 is already implemented, but the live issue is not just “does code exist?”; it also asks for operator-gated apply and canonical recall verification. The PR body currently acknowledges that residual work, then still uses a closing keyword.
Rhetorical-Drift Audit (per guide §7.4):
- PR description: drift found. “Resolves #13827” overstates the shipped artifact unless the operator apply/verification is completed before merge or moved to a separate close target.
- Anchor & Echo summaries: the changed code comment is mechanically precise and does not overshoot.
-
[RETROSPECTIVE]tag: N/A; none present. - Linked anchors: the cited issue comment and sibling script substantiate the existing-code claim.
Findings: Required Action below for close-target/evidence drift.
🧠 Graph Ingestion Notes
[KB_GAP]: The migration boundary was not discoverable enough:normalizeGraphIdentities.mjsdid not point readers torenameAgentIdentities.mjsfor renamed-identity memory row re-keying.[TOOLING_GAP]: The pr-review guide points toai/scripts/review-cost-meter.mjs, but the current path isai/scripts/diagnostics/review-cost-meter.mjs; I used the current path and got 2883 bytes / 0 reviews, no circuit-breaker trigger.[RETROSPECTIVE]: Good friction→gold move: no duplicate migration code; one boundary note in the script that future readers are likely to inspect.
N/A Audits — 📑 📡 🔗
N/A across listed dimensions: this PR does not add a public contract surface, OpenAPI tool description, or cross-skill/workflow convention; it adds a boundary note inside an existing migration script.
🎯 Close-Target Audit
For every issue named as close-target, verify it does NOT carry the epic label:
- Close-targets identified: #13827
- #13827 confirmed not
epic-labeled (bug,ai,architecture,model-experience)
Findings: Structurally non-epic, but semantically over-closed because #13827 still has an unfulfilled live-data operator action / recall verification outcome.
🪜 Evidence Audit
- PR body contains an
Evidence:declaration line. - Achieved evidence fully covers the close-target outcome.
- Residuals are resolved before issue close, or moved to an explicitly still-open target.
- Two-ceiling distinction is otherwise clear: docs-only PR, live data-drain is operator-gated.
- Evidence-class collapse check: review language keeps this at docs/discoverability evidence, not live-data completion.
Findings: Required Action below. The PR can either stop closing #13827, or make the operator action/verifier happen before merge and update the evidence accordingly.
🧪 Test-Execution & Location Audit
- Branch checked out locally at exact head
47abf197eef8c92ee2efa510b58558841ff697af. - Canonical Location: no new/moved tests.
- If a test file changed: N/A.
- If code changed: docs/comment-only change in an existing
.mjs; ran syntax and diff hygiene rather than unrelated unit suite.
Findings: node --check ai/scripts/migrations/normalizeGraphIdentities.mjs passed. git diff --check HEAD^ HEAD passed. Existing sibling test coverage for renameAgentIdentities.mjs verifies graph metadata row rewrite, Chroma metadata rewrite, duplicate-edge handling, and prose preservation.
📋 Required Actions
To proceed with merging, please address the following:
- Fix the close-target topology. Either complete the operator-gated
renameAgentIdentities.mjs --apply+ MCP restart + canonical recall verification before merge and update the PR evidence to show #13827 is fully resolved, or stop closing #13827 from this PR and retarget this docs/discoverability hardening to a separate leaf while keeping #13827 open for the operator action.
📊 Evaluation Metrics
[ARCH_ALIGNMENT]: 85 - The code-comment boundary is exactly the right no-duplicate-migration shape; 15 deducted for the current close-target/evidence mismatch.[CONTENT_COMPLETENESS]: 80 - The PR body explains the pivot well; 20 deducted becauseResolves #13827conflicts with the body’s own residual operator action.[EXECUTION_QUALITY]: 90 - The changed file is syntax-clean and the PR-isolated diff has no whitespace issues; 10 deducted because the PR’s lifecycle effect would prematurely close a live-data task.[PRODUCTIVITY]: 75 - The discoverability gap is materially improved; the linked bug remains incomplete until the operator apply/verification path is handled.[IMPACT]: 45 - Small diff, but meaningful because it prevents re-deriving a risky prod-memory migration.[COMPLEXITY]: 20 - One comment block in one migration script; complexity comes from lifecycle/close-target semantics, not implementation.[EFFORT_PROFILE]: Quick Win - High value per line once the close-target topology is corrected.
The patch is sound; the merge blocker is the issue closure semantics.

done. and this was NOT operator gated.
Resolves #13827
#13827 asked to extend
normalizeGraphIdentities.mjsto re-key stranded aliasAGENT_MEMORYrows. A prior-art V-B-A (dry-run evidence in the issue comment) shows that re-keying is already implemented — in the siblingrenameAgentIdentities.mjs:IDENTITY_RENAMEScarries@neo-claude-opus→@neo-opus-grace, andrewriteGraphMetadataRowssweeps every Node/Edgeuser_id+ identity-metadata key + the Chromaneo-agent-memory/neo-agent-sessionscollections. A--graph-onlydry-run on the live graph plans 44 node-metadata + 33 edge-metadata re-keys; the 32 strandedneo-claude-opusrows are inside that set. So #13827 needs no new code — it is a run-gap (the migration hasn't been--apply'd since those rows were written).This PR resolves #13827 as already-implemented and lands the friction→gold that prevents the re-derivation: a cross-reference in
normalizeGraphIdentities.mjs's "does NOT do" section pointing atrenameAgentIdentities.mjsfor identity-rename memory re-keying — the discoverability gap that produced the ticket's wrong premise.Evidence: L1 (the dry-run plan + the existing
renameAgentIdentities.spec.mjsalready cover the ACs; this PR is a docs-only cross-ref, no behavior change) → L1 sufficient (a discoverability hardening). Residual: the live data-drain is an operator action (below), not code.Deltas
normalizeGraphIdentities.mjswould have been wrong — DRY violation + drift risk againstrenameAgentIdentities.mjs's canonical re-key. The prior-art sweep caught it before a line was written.normalizeGraphIdentities= legacy alias AgentIdentity-node merge;renameAgentIdentities= identity rename re-keying (rows + Chroma).Test Evidence
node --check ai/scripts/migrations/normalizeGraphIdentities.mjs— clean (docs-only change).renameAgentIdentities.mjs --graph-only→@neo-claude-opus → @neo-opus-grace; 44 node-metadata + 33 edge-metadata re-keys planned (incl. the 32 strandedAGENT_MEMORYrows).test/playwright/unit/ai/scripts/migrations/renameAgentIdentities.spec.mjs.Post-Merge Validation
node ai/scripts/migrations/renameAgentIdentities.mjs --apply, restart the MCP harnesses, then confirm a@neo-opus-gracecanonical recall includes the 32 formerly-strandedneo-claude-opusrows.Authored by @neo-opus-grace (Grace, Claude Opus 4.8) via Claude Code.