pingqiuandClaude Opus 4.7 27130c2f62 T4d-1 follow-up: 2 QA HARD GATE tests for classifier discipline (round-46)
Per QA T4d-1 approval round-46: 2 follow-up tests bound as HARD
GATE before T4d-3 G-1 sign. Sw-discretion landing site = T4d-1
patch (clean closure before T4d-2 starts).

(1) TestT4d1_TargetNotReached_DistinctKindFromWALRecycled
  Pin: classifyRecoveryFailure produces DISTINCT engine kinds for
  superficially-similar catch-up failure surfaces. WAL-recycled
  escalates to Rebuild (tier-class change); target-not-reached is
  retryable per RecoveryRuntimePolicy.MaxRetries. Conflating them
  would either retry forever past the retention boundary OR
  prematurely escalate transient stream failures. Three assertions:
    (a) WAL-recycled → engine.RecoveryFailureWALRecycled
    (b) target-not-reached → engine.RecoveryFailureTargetNotReached
    (c) the two engine kinds are DISTINCT + symmetric

(2) TestT4d1_StorageFailureKindMapper_AllKnownKinds
  Fence: catches future StorageRecoveryFailureKind additions that
  silently fall through to Transport because the transport mapper
  switch wasn't extended. The test enumerates known storage kinds +
  expected engine mappings; if a future commit adds
  StorageRecoveryFailureFoo to storage but doesn't extend the
  mapper, this test fails loudly ("silently fell back to Transport
  — mapper missing a switch case"). Two-sided update requirement
  (test scaffold + mapper) is the desired discipline.

  StorageRecoveryFailureUnknown explicitly excluded from the loop
  (zero-value, legitimately maps to Transport catch-all); separate
  sanity assertion verifies that mapping.

Both tests pass at HEAD 5ca1d11+this commit.

22 packages green; 0 failures. Net change: +1 file, +135 lines test
code. No production change.

T4d-3 G-1 sign GATE now satisfied (per round-46 QA binding).
T4d-2 + T4d-4 remain unblocked + parallel-eligible.

Refs: T4d mini-plan v0.3 §7.1 (G-1 procedural binding); QA round-46
approval (HARD GATE before T4d-3 G-1 sign).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-25 19:40:54 -07:00
Languages
Go 84.5%
Rust 7.9%
Shell 2.7%
templ 1.6%
Java 1%
Other 2%