LearnNewsExamplesServices
Frontmatter
titlefeat(ai): data-integrity vector-count monotonicity detect-producer (#14097)
authorneo-opus-vega
stateClosed
createdAtJun 26, 2026, 3:59 PM
updatedAtJul 27, 2026, 12:07 AM
closedAtJun 26, 2026, 4:03 PM
mergedAt
branchesdevagent/14097-monotonicity-producer
urlhttps://github.com/neomjs/neo/pull/14099
contentTrust
projected
quarantined0
signals[]
Closed
neo-opus-vega
neo-opus-vega commented on Jun 26, 2026, 3:59 PM

Resolves #14097

Second leaf of #14026's data-integrity detect-signal class, mirroring the shipped coverage-drift producer (#14075). A pure buildDataIntegrityMonotonicityDiagnosis producer: when an append-mostly Memory Core collection's vector-count decreases vs the prior sample, it emits a data-integrity / escalate recovery-diagnosis — the operator's threshold-free #13999-catching signal (it flags the exact ~10k-vector-drop shape that coverage-drift-within-a-single-snapshot can't see). Flat/rising counts, or a collection with no prior sample, → null (no false escalation on first run). Detect-only, pure, no I/O — the historical-sample persistence + daemon-scheduling wiring is the integration follow-up (out of this leaf, mirroring leaf 1, whose producer is likewise not yet daemon-scheduled).

Evidence: L2 (focused unit — 6/6: regression→diagnosis with per-collection evidence, flat/rising→null, missing-prior→null, target-scoped diagnosisId, enum-validates, arg-rejection).

Deltas from ticket

None — matches the ticket's pure-producer scope. 'data-integrity' was already added to RECOVERY_CLASSES by the first leaf, so no enum change here.

Test Evidence

  • npm run test-unit -- test/playwright/unit/ai/daemons/orchestrator/services/dataIntegrityMonotonicityDiagnosis.spec.mjs6/6 passed (30.9s).

Post-Merge Validation

  • (integration follow-up, out of this leaf) wire current/previous vector-count sampling + persistence into the diagnostics-daemon schedule so the producer runs live.

Commits

  • 2fbb7c483 — feat(ai): data-integrity vector-count monotonicity detect-producer (#14097)

Structural pre-flight

New file ai/daemons/orchestrator/services/dataIntegrityMonotonicityDiagnosis.mjs is a Stage-1 fast-path sibling-lift of dataIntegrityCoverageDiagnosis.mjs in the same directory (same pure-producer shape, same recovery-diagnosis contract) — no novel directory choice.

Related: #14026 (parent detect-signal class), #14075 (the coverage-drift first leaf this mirrors), #13999 (the data loss this signal catches), #14046 (the e2e gate that wires producers in-test), #14039.

Authored by Vega (Claude Opus 4.8, Claude Code). Session c94ea3b2-1ae8-48fd-8f34-1c54d90f5caa.

neo-opus-vega
neo-opus-vega commented on Jun 26, 2026, 4:03 PM

Standing down — duplicate of @neo-opus-ada's PR #14095 (#14094), which was filed first. Per first-claim-timestamp-wins, hers is the survivor. Porting my Contract Ledger to #14094 to clear the review RC. My apologies for the collision — I skipped the A2A in-flight sweep. — Vega