LearnNewsExamplesServices
Frontmatter
id13612
titleExpose full Chroma vector drift ID enumeration
stateClosed
labels
bugaiarchitecturemodel-experience
assigneesneo-gpt
createdAtJun 20, 2026, 10:21 AM
updatedAtJun 20, 2026, 12:31 PM
githubUrlhttps://github.com/neomjs/neo/issues/13612
authorneo-gpt
commentsCount0
parentIssue13496
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtJun 20, 2026, 12:31 PM

Expose full Chroma vector drift ID enumeration

Closed v13.1.0/archive-v13-1-0-chunk-4 bugaiarchitecturemodel-experience
neo-gpt
neo-gpt commented on Jun 20, 2026, 10:21 AM

Context

PR #13610 delivered the full-ID enumeration prerequisite for parent #13496, but its initial PR body incorrectly used Resolves #13496. Ada's review correctly caught that close-target overclaim: the parent remains broader than this slice because repair wiring, operator sequencing, and AC4 follow-up work remain open.

This ticket is the narrow delivery leaf for the AC2-style prerequisite: expose every metadata/vector drift ID from the existing Chroma integrity checker, while keeping ordinary diagnostic output sample-bounded by default.

Live latest-open sweep: checked latest 20 open GitHub issues at 2026-06-20T08:20:21Z via gh api repos/neomjs/neo/issues?state=open&per_page=20; no equivalent leaf found. Closest open items were parent #13496, AC4 extraction primitive #13601, PR #13603, and PR #13610 itself.

A2A in-flight claim sweep: checked latest 30 all-status messages at 2026-06-20T08:19Z; no overlapping [lane-claim] / [lane-intent] for this AC2 enumeration leaf found. The only overlapping fresh A2A was Ada's #13610 review requesting this close-target split.

KB semantic sweep: ask_knowledge_base("open ticket full Chroma vector drift id enumeration checkChromaIntegrity metadata vector coverage AC2 #13496", type="ticket") returned no equivalent ticket and did not yet know parent #13496.

Exact local sweep: rg "full.*Chroma.*vector.*drift|vector.*drift.*id|include-vector-coverage-ids|enumerateMetadataVectorDrift|metadata.*vector.*coverage|Chroma vector coverage" resources/content/issues resources/content/discussions returned no equivalent local issue or Discussion.

Release classification: post-release / operational hardening. This is a diagnostic prerequisite for safe Memory Core repair, not a v13 release blocker.

The Problem

Parent #13496 needs repair planning to distinguish the complete set of metadata IDs that have no backing vector entry from the complete set of vector IDs that no longer have metadata rows. The existing audit surface intentionally reported bounded samples, which is right for normal operator output but insufficient for a repair primitive: a repair lane cannot safely plan from a sample.

Without a full-ID enumeration leaf, later repair code is tempted to re-query or re-sample independently, duplicating drift logic and risking a mismatch between diagnosis and repair inputs.

The Architectural Reality

Relevant surfaces:

  • ai/scripts/maintenance/checkChromaIntegrity.mjs owns the Chroma integrity audit and vector coverage comparison.
  • npm run ai:check-chroma-integrity -- --json --keep-snapshot is the existing operator diagnostic path named by parent #13496.
  • PR #13610 adds an opt-in full-ID payload while preserving sample-bounded defaults so routine integrity runs do not emit huge arrays.
  • Sibling #13601 covers the AC4 extraction-with-re-embed primitive; this ticket does not wire repair or promotion.

The Fix

Expose the full vector drift ledger from checkChromaIntegrity behind an explicit opt-in:

  • Add a helper that computes allIds, vectorIds, missingVectorIds, extraVectorIds, and overlapCount from metadata IDs and vector IDs.
  • Keep existing sample-bounded fields as the default external audit shape.
  • Thread an includeFullIds option through the audit path.
  • Add a CLI flag for repair-planning runs that need the full payload.
  • Cover the helper and opt-in audit shape with focused unit tests.

Contract Ledger Matrix

Target Surface Source of Authority Proposed Behavior Fallback Docs Evidence
enumerateMetadataVectorDrift() ai/scripts/maintenance/checkChromaIntegrity.mjs Return complete metadata/vector drift ID arrays and overlap counts from caller-provided ID sets Caller can continue using sample-bounded compare output JSDoc / unit tests Focused unit coverage for missing, extra, overlap, and empty inputs
compareMetadataToVectorIds() / vector coverage audit Existing integrity checker API Preserve sample-bounded default fields; include full arrays only when requested Default output remains unchanged for routine diagnostics Existing CLI help plus tests Unit coverage verifies includeFullIds behavior
CLI flag --include-vector-coverage-ids Existing ai:check-chroma-integrity maintenance CLI Emit full vector coverage ID arrays only on explicit operator request Omit the flag for bounded output CLI option text Syntax/alignment/unit validation in PR #13610

Decision Record impact

none. This is a bounded Memory Core/Chroma maintenance diagnostic leaf aligned with parent #13496 and ADR 0017's unified Chroma topology.

Acceptance Criteria

  • checkChromaIntegrity exposes full metadata/vector drift ID enumeration for repair planning.
  • Existing vector coverage audit output remains sample-bounded by default.
  • Full ID arrays are opt-in through an includeFullIds option and CLI flag.
  • Unit coverage proves the helper and opt-in audit payload do not depend on sampling.
  • PR #13610 closes this leaf only; parent #13496 remains open for repair wiring, operator sequence, and remaining ACs.

Out of Scope

  • Live Memory Core repair, defrag promotion, or collection mutation.
  • Extraction-with-re-embed repair logic; that remains under #13601 / PR #13603.
  • Closing parent #13496.
  • Changing the normal bounded healthcheck/query canary surfaces.

Avoided Traps

  • Do not use a sample-limited audit payload as repair input.
  • Do not make huge ID arrays the default CLI output.
  • Do not conflate this enumeration prerequisite with AC4 repair execution.

Related

Related: #13496 Related: #13601 Related: #13603 Related: #13610

Origin Session ID

Origin Session ID: 019ee050-c834-7503-b895-527ad55dd8c5

Handoff Retrieval Hints

  • query_raw_memories: #13610 full Chroma vector drift ids close-target overclaim #13496 AC2
  • query_raw_memories: enumerateMetadataVectorDrift includeFullIds include-vector-coverage-ids
  • Commit anchor: 7b465c30f241b5801fe1e9502e2bf42673df6dc6