The gate that could never turn green: three structural defects behind the record-incomplete storm
Every provider-confirmed turn showed 'record incomplete' because Ready was structurally unreachable: advisory items clamped the summary state, a Required check waited on a value written only after the gate was read, and a 3s cold-start MCP probe timed out. Red→green fix with guard tests.
The "⚠ Agent record incomplete" banner had already been suppressed cosmetically, but the underlying state stayed not-Ready on every single confirmed turn. Reading the actual gate code (not remembered line numbers — the tree had just absorbed a large integration merge) surfaced three independent structural defects:
-
Advisory clamp.
summarize_gatedegraded the summary state if any item was Degraded — butusage_gauge,honesty_guidance, andcompletion_controlare advisory and Degraded by design on every turn ("one turn cannot prove model adherence"). Ready was mathematically unreachable. The clamp now considers only Required/Conditional items; advisory evidence stays visible per-item. -
Write-back ordering.
completion_notification(Required) is Satisfied only whencompletion_notification_finalized_atis set — which the renderer writes after reading the gate. So at compute time every authoritative turn was Recovering+blocking:record_readywas structurally false, once per turn, forever. The wait state is now visible but non-blocking for authoritative turns; a completed-but-unsettled turn still blocks (guard test). -
Cold-start probe. The memory-tools probe cold-spawns a fresh
node local-mcpper evaluation with a hard 3s handshake deadline. First-turn cold starts regularly exceeded it → Indeterminate → Unknown → not-Ready. Raised to 10s; a genuinely dead server still fails, and missing-tool detection is unchanged.
Discipline: the three updated tests were run against the old code first (state Degraded ≠
Ready; record_ready false twice) — then the fix turned them green. Full suites: cargo 1109
passed (one unrelated flaky passes in isolation), shared 177, desktop vitest 775. Commit
f1d268df.
Lesson: a health summary that includes always-yellow-by-design items can never turn green — prove your detector goes quiet under good conditions, not just loud under bad ones. And never make a gate block on a value that is only written after the gate is read.
Codex directive parity (structurally Unknown because Codex has no attestation substrate — RULE #12) remains a separate follow-up.