LearnNewsExamplesServices
Frontmatter
id14088
titleResolve corruption-recovery drain-stall gate disposition (v13.1)
stateClosed
labels
enhancementaitestingarchitecture
assigneesneo-opus-ada, neo-gpt
createdAtJun 26, 2026, 3:16 PM
updatedAt3:22 PM
githubUrlhttps://github.com/neomjs/neo/issues/14088
authorneo-opus-ada
commentsCount4
parentIssue14039
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtJun 29, 2026, 6:05 PM

Resolve corruption-recovery drain-stall gate disposition (v13.1)

Closed v13.1.0/archive-v13-1-0-chunk-6 enhancementaitestingarchitecture
neo-opus-ada
neo-opus-ada commented on Jun 26, 2026, 3:16 PM

Context

#14046 (the v13.1 release gate) proves the corruption-recovery chain — inject → detect → diagnose → escalate — for the vector-loss (metadata-without-vector) class, the actual #13999 incident shape, via test/playwright/unit/ai/scripts/maintenance/CorruptionRecoveryGate.spec.mjs.

But #14046's definition-of-done names three corruption classes ("for each corruption class the #13999 incident produced"): vector-loss / drain-stall / over-cap. #14046 delivers 1 of 3 — the correct v13.1 scope (the real incident class) — and the residual 2 are carried here so closing #14046 does NOT silently narrow its 3-class DoD to one. (Surfaced in Grace's #14080 second-eye review as the AC-dilution this gate exists to prevent.)

The Problem

The composition harness asserts the immune system survives a vector-loss corruption, but two other classes the incident family produced are not yet exercised end-to-end:

  • drain-stall — the deferred-embed WAL drain stalls, leaving rows persisted-but-unembedded (the original #13999 producing pathway).
  • over-cap — an over-context input fails to embed / is silently dropped (the oversized-doc class).

Until each is injected-in-test, a future regression in the drain-stall or over-cap detect/diagnose path is not caught by a repeatable gate — only by another live incident.

The Architectural Reality

  • test/playwright/unit/ai/scripts/maintenance/CorruptionRecoveryGate.spec.mjs (#14046) — the harness to extend; its injectMemoryCoreSnapshot + the inject→detect→diagnose→escalate assertion chain is the pattern. Add per-class injectors, not a new harness.
  • The detect-signal class (#14026 / first leaf #14075) defines which drift signals fire per class; coverage-drift catches vector-loss. The drain-stall + over-cap classes map to #14026's deferred heuristics (per-collection WAL-backlog/oldest-unembedded-row-age for drain-stall; embedding-dimension/over-cap for over-cap).
  • #14085 (oversized-doc truncate-to-context) is the over-cap prevention; this ticket is the over-cap gate assertion (corruption injected → detected → escalated).

The Fix

Add two injector classes to the gate harness, each asserting the full detect → diagnose → escalate chain:

  1. drain-stall injector — simulate a stalled deferred-embed WAL drain (rows persisted, embeddings pending past the drain-completion threshold) → assert the detect signal fires + escalates.
  2. over-cap injector — simulate an over-context input that fails to embed → assert detect + escalate.

Acceptance Criteria

  • The gate harness injects a drain-stall corruption in an isolated store → detect → diagnose → escalate, asserted end-to-end.
  • The gate harness injects an over-cap corruption → detect → diagnose → escalate, asserted end-to-end.
  • Each reuses the #14046 harness pattern (no parallel harness).
  • Each is gated on its detect-signal heuristic existing (#14026 deferred slices) — name the blocking heuristic per class (blocked-by, not silently-passing-green).

Out of Scope

  • The vector-loss class (delivered by #14046).
  • The over-cap prevention (#14085 — this is the gate assertion, not the recovery floor).
  • Building the detect-signal heuristics themselves (#14026 deferred slices — this consumes them).

Avoided Traps

  • Do NOT fork a parallel harness — extend CorruptionRecoveryGate.spec.mjs's injector pattern.
  • Do NOT assert a class whose detect heuristic does not exist yet — block on the #14026 deferred heuristic per class rather than passing green on an unexercised path (the exact AC-dilution this lane prevents).

Related

  • #14046 (the v13.1 gate this expands — vector-loss class delivered), #14039 (v13.1 stability epic), #14026 (detect-signal class + deferred per-class heuristics), #14085 (over-cap prevention sibling), #13999 (the incident family).

Scope: v13.2 repeatable-regression-hardening — the v13.1 gate covers the vector-loss class; this generalizes the harness to the full 3-class DoD. Surfaced in Grace's #14080 review (2nd-eye approval + AC-dilution-prevention follow-up).

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