LearnNewsExamplesServices
Frontmatter
id14126
titleGuard MC_REPAIR_STRATEGY_VERSION against silent embeddability-logic drift (accepted-loss hardening)
stateClosed
labels
enhancementaitestingarchitecture
assigneesneo-gpt
createdAtJun 26, 2026, 7:03 PM
updatedAtJun 27, 2026, 11:32 PM
githubUrlhttps://github.com/neomjs/neo/issues/14126
authorneo-opus-grace
commentsCount2
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtJun 27, 2026, 11:32 PM

Guard MC_REPAIR_STRATEGY_VERSION against silent embeddability-logic drift (accepted-loss hardening)

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

Context

Follow-up from Vega's domain review of PR #14120 (#14118, the #14084 accepted-loss closing leaf). Novel — the MC_REPAIR_STRATEGY_VERSION concept was introduced in that PR; this is its hardening follow-up.

The Risk

The accepted-loss fingerprint binds the recovery context (strategyVersion + provider + contextBudget + terminalReasons). provider/contextBudget auto-invalidate a stale ack on a config change. But strategyVersion is a manual constantMC_REPAIR_STRATEGY_VERSION = 'mc-repair-v1' in ai/scripts/maintenance/defragChromaDB.mjs.

A code-path embeddability change that isn't config-captured — exactly the oversized-document chunking (#14085) — would need this constant bumped by hand. If that bump is forgotten:

  • A pre-chunking ack for an embedding-context-exceeded row keeps matching the same strategyVersion.
  • So a residue that chunking has since made recoverable would still settle as accepted-loss (exit 0, no page).
  • That is the precise silent-loss class the accepted-loss feature exists to prevent — reintroduced through a forgotten version bump.

The Fix (options, decide in-PR)

  1. Derive/assert the version against the embeddability-determining logic — e.g. a unit test that pins MC_REPAIR_STRATEGY_VERSION against a signature/hash of the embeddability path (truncateToEmbedTokenBudget + the budget leaf), failing if the embeddability logic changes without a version bump.
  2. Reciprocal forcing-comment — at truncateToEmbedTokenBudget (and any future chunking site), a comment pointing to MC_REPAIR_STRATEGY_VERSION so an editor shipping an embeddability change sees the bump requirement (the constant already documents its end; the embeddability end does not point back). Cheapest immediate mitigation.
  3. Checklist tie-in — wire the bump into the #14085 chunking ticket's ACs.

Prefer (1) — an automated forcing-test is the durable guard; (2) as the cheap immediate mitigation alongside it.

Acceptance Criteria

  • A forgotten MC_REPAIR_STRATEGY_VERSION bump after an embeddability-logic change is caught (a failing test) OR loudly signposted at the embeddability site.
  • The guard's rationale (a stale pre-capability-change ack must not settle a now-recoverable loss) is documented.

Related

Refs #14120 / #14118 (where it surfaced), #14084 (the accepted-loss epic), #14085 (the oversized-doc chunking that would trigger it), #14039 (v13.1 epic). Surfaced by @neo-opus-vega's domain review.

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

tobiu referenced in commit b1b16fe - "feat(ai): guard repair strategy embeddability drift (#14126) (#14269) on Jun 27, 2026, 11:32 PM
tobiu closed this issue on Jun 27, 2026, 11:32 PM