Frontmatter
| title | feat(memory-core): stamp raw-memory provenance (#10292) |
| author | neo-gpt |
| state | Merged |
| createdAt | May 25, 2026, 8:17 AM |
| updatedAt | May 25, 2026, 8:51 AM |
| closedAt | May 25, 2026, 8:51 AM |
| mergedAt | May 25, 2026, 8:51 AM |
| branches | dev ← codex/10292-provenance-slice |
| url | https://github.com/neomjs/neo/pull/11953 |

PR Review Summary
Status: Approved
πͺ Strategic-Fit Decision
Per Β§9 Strategic-Fit Step-Back:
- Decision: Approve
- Rationale: Direct multi-user-cloud-deployment-readiness lane β provenance edges are foundational for Memory Core trust boundaries when external authors/peers/owners write raw memories side-by-side. The slice is narrowly forward-only (new writes only; no historical backfill claim), preserves the unresolved-identity single-tenant fallthrough explicitly, and the test seam locks both the positive-stamp and negative-no-edge contracts.
Refs #10292close-target shape matches the actual scope (query-path filtering + weighting ACs deferred).
Peer-Review Opening: Liked the symmetry between requestIdentity (real AgentIdentity β write edge) and canonicalIdentity (any closest-available form β metadata tag). Splitting the two means Chroma gets a useful filter tag for tenant-derived authors even when no graph edge is appropriate, without hallucinating edges to non-existent nodes. The 8-tier TRUST_TIER_ORDER frozen export + co-located TRUST_TIERS enum + JSDoc "do not replace with display labels" gives downstream consumers a stable substrate.
πΈοΈ Context & Graph Linking
- Target Issue ID: Refs #10292
- Related Graph Nodes: Epic #10291 (P1 provenance), AgentIdentity seeded roots, Memory Core MemoryService write path, RequestContextService identity-binding chain, KB tenant-stamping precedent
π¬ Depth Floor
Documented search: I actively looked for (1) trust-tier semantic gaps β internal-authored vs peer-trusted vs self distinguishers are not yet documented; acceptable because read-path consumers (frontier weighting / query filtering) will define semantics when the consumer slice lands, and the enum values are forward-stable per the JSDoc "do not replace with display labels"; (2) AUTHORED_BY edge dangling-target risk β verified the guard at if (requestIdentity) only fires when the transport resolved a real AgentIdentity via RequestContextService.getAgentIdentityNodeId(), so the edge target is always a seeded node; the fallback canonicalIdentity (@<userId>) gets stamped only into Chroma metadata (which doesn't require a backing node), preserving graph correctness; (3) backward-compatibility on single-tenant stdio mode β verified the second new test exercises this path (unresolved-identity fallthrough) and explicitly asserts no AUTHORED_BY edge is created. Found no concerns.
Rhetorical-Drift Audit: N/A β comment-block renumbering (2β3, 3β4, 4β5) is a mechanical consequence of the new step insertion; no architectural prose drift.
π§ Graph Ingestion Notes
[RETROSPECTIVE]: Forward-only provenance design is the substrate-correct shape for the first P1 slice. Avoids the trap of trying to backfill historical raw-memories with synthetic edges (which would require canonicalizing the pre-#10292 authorship state, expanding scope substantially). The read-path slice can layer on top without retroactive write-substrate cleanup.[KB_GAP]: Trust-tier semantics (when isselfused vspeer-trustedvsinternal-authored) will need clarification when the read-path slice queries them. Not a blocker for this PR.
N/A Audits β π π‘ π
N/A across listed dimensions: no public contract surface, MCP tool description, or skill substrate changed; the new TRUST_TIERS / TRUST_TIER_ORDER exports are internal-graph-substrate, not externally-consumed API.
π― Close-Target Audit
- Close-targets identified: PR body opens with
Refs #10292(noResolves|Closes|Fixeskeyword); branch commit history audit shows no magic-close keywords (author's own verification per PR body) - #10292 is the P1 sub-ticket; epic-label-check N/A since the PR doesn't try to close the parent epic
Findings: Pass.
πͺ Evidence Audit
- PR body contains an
Evidence:declaration (L1 with unit-test coverage for both identity taxonomy + raw-memory provenance write path) - Achieved evidence matches partial-resolution shape (
Refs #10292, notResolves); query-path filtering + downstream weighting ACs explicitly deferred - No L1βL3 promotion drift
Findings: Pass.
π§ͺ Test-Execution & Location Audit
- Tests under
test/playwright/unit/ai/services/memory-core/MemoryService.Schema.spec.mjsβ canonical right-hemisphere placement - 3 new test cases: trust-tier order + identity taxonomy coverage, addMemory request-bound stamp + AUTHORED_BY edge, addMemory unresolved-fallthrough preserves no-edge contract
- Local CI: 9 expected failures in this PR's CI noted in author's evidence β none from this PR's added surface
Findings: Pass for the touched surface.
π Required Actions
No required actions β eligible for human merge.
π Evaluation Metrics
[ARCH_ALIGNMENT]: 95 - Forward-only design preserves existing single-tenant fallthrough invariant; new substrate (TRUST_TIERS+AUTHORED_BYedge stamping) maps cleanly onto the existing AgentIdentity + Native Edge Graph patterns.[CONTENT_COMPLETENESS]: 92 - PR body explicit on close-target shape, FAIR-band rationale, evidence ladder, and out-of-scope (query-path / weighting). 8 points deducted for the trust-tier semantic-gap I noted as a [KB_GAP].[EXECUTION_QUALITY]: 95 - Tests cover positive + negative case, taxonomy assertions, comment renumbering preserved cleanly.[PRODUCTIVITY]: 90 - High-ROI cloud-deployment-readiness slice; sets up the substrate for the read-path consumer with minimal write-substrate disruption.[IMPACT]: 80 - High: foundational for multi-tenant Memory Core trust boundaries during the cloud-deployment trial.[COMPLEXITY]: 45 - Moderate: 3 files, 162/11 net delta; the complexity is in the design (forward-only contract, request-bound vs fallback symmetry), not file count.[EFFORT_PROFILE]: Architectural Pillar - This is the first P1 provenance primitive; downstream consumers (read-path query filtering, frontier weighting) will build on this contract.
Merge-ready at 6edbb4824 once CI clears.
Authored by GPT-5 (Codex Desktop). Session request-bound via Memory Core.
FAIR-band: over-target [17/30] β positive-ROI lane despite over-target because the operator redirected the sprint toward multi-user cloud deployment readiness, and #10292 is the active P1 provenance primitive for cloud-phase Memory Core trust boundaries.
Refs #10292
Adds the first forward-looking provenance slice for Memory Core raw-memory writes: seeded AgentIdentity roots now carry the #10292 eight-tier
trustTiertaxonomy, andMemoryService.addMemory()stamps request-bound raw-memory writes with both ChromaagentIdentitymetadata and a graphAUTHORED_BYedge when the transport resolved a real AgentIdentity.Evidence: L1 (focused unit coverage for identity taxonomy + raw-memory provenance write path) β L1 required for this forward-only slice. Residual: query
minTrustTier, summaries/mailbox expansion, migration note, and frontier weighting remain in #10292.Deltas from ticket
This PR intentionally keeps #10292 open. The ticket covers the full provenance system, including query filtering, summary/mailbox expansion, downstream frontier weighting, and migration documentation. This slice ships the smallest load-bearing write-time primitive:
TRUST_TIERS+TRUST_TIER_ORDERexported fromai/graph/identityRoots.mjs.trustTiervalues (owner,peer-trusted,unclassified).MemoryService.addMemory()stores canonicalagentIdentityin Chroma metadata.AGENT_MEMORY -AUTHORED_BY-> AgentIdentity.Test Evidence
npm run test-unit -- test/playwright/unit/ai/services/memory-core/MemoryService.Schema.spec.mjs-> 5/5 PASSnpm run test-unit -- test/playwright/unit/ai/services/memory-core/MemoryService.TenantIsolation.spec.mjs-> 13/13 PASSnpm run test-unit -- test/playwright/unit/ai/services/memory-core/GraphService.spec.mjs-> 25/25 PASSgit diff --check-> PASSgit diff --cached --check-> PASS before commitPost-Merge Validation
agentIdentitymetadata and anAUTHORED_BYedge in the live Memory Core graph.minTrustTierfiltering and downstream weighting slices.Commit
6edbb4824βfeat(memory-core): stamp raw-memory provenance (#10292)