LearnNewsExamplesServices
Frontmatter
id14113
titleDimension-audit fact-gatherer for the data-integrity diagnostics runner (#14109 input)
stateClosed
labels
enhancementaitestingarchitecture
assigneesneo-opus-ada
createdAtJun 26, 2026, 4:59 PM
updatedAtJun 26, 2026, 5:31 PM
githubUrlhttps://github.com/neomjs/neo/issues/14113
authorneo-opus-ada
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtJun 26, 2026, 5:31 PM

Dimension-audit fact-gatherer for the data-integrity diagnostics runner (#14109 input)

Closed v13.1.0/archive-v13-1-0-chunk-7 enhancementaitestingarchitecture
neo-opus-ada
neo-opus-ada commented on Jun 26, 2026, 4:59 PM

Context

The #14109 data-integrity diagnostics runner gathers per-collection facts and feeds them to the pure detect-producers. The embedding-dimension producer (buildDimensionConsistencyDiagnosis, #14102/#14104) consumes per-collection {collection, expectedDimension, mismatchedVectorCount} samples — but no helper computes mismatchedVectorCount (auditChromaVectorCoverage checks index coverage, not per-vector dimension). This is the dimension fact-gatherer Vega (#14109 steward) confirmed as a separate slice owned by me (the producer author); the runner imports it.

The Fix

An exported auditCollectionVectorDimensions({collection, collectionName, expectedDimension, sampleSize}) in ai/scripts/maintenance/checkChromaIntegrity.mjs (sibling of auditChromaVectorCoverage / probeStoredEmbeddingExportability): sample up to sampleSize ids, read their stored embeddings (mirroring probeStoredEmbeddingExportability's collection.get({limit})collection.get({ids, include:['embeddings']})), and count present-but-wrong-dimension vectors → returns the producer's samples element shape, 1:1, no reshape.

  • A missing/absent embedding is NOT a dimension mismatch (that's coverage's domain, #14075) — only a present vector whose .length !== expectedDimension counts.

Contract Ledger

Target Surface Source of Authority Proposed Behavior Fallback Docs Evidence
auditCollectionVectorDimensions({collection, collectionName, expectedDimension, sampleSize}) #14109 gather-step contract (Vega-confirmed 1:1) + the buildDimensionConsistencyDiagnosis input Sample embeddings → {collection: collectionName, expectedDimension, mismatchedVectorCount, sampledCount}; counts present vectors whose .length !== expectedDimension empty/unsampled collection → mismatchedVectorCount: 0; a .get failure surfaces as a probe error (never throws into the runner) fn JSDoc + ticket unit spec (mock collection)

Acceptance Criteria

  • Samples per-collection embeddings + returns {collection, expectedDimension, mismatchedVectorCount} (the producer's samples element, 1:1).
  • Counts only present-but-wrong-dimension vectors; missing embeddings are not counted (coverage's domain).
  • Empty/unsampled collection → mismatchedVectorCount: 0 (no false signal).
  • Exported for the #14109 runner to import. Unit-covered with a mock collection (mismatch, all-match, empty).

Out of Scope

  • The #14109 runner wiring (schedule/history/route — consumes this).
  • The pure buildDimensionConsistencyDiagnosis producer (#14102/#14104).
  • Other gatherers (coverage exists; monotonicity is runner-history-sourced, not a gatherer — per the #14109 de-dup).

Related

Authored by Ada (Claude Opus 4.8, Claude Code).