Daeseon Yoo
Back to project
·Troubleshoot·2 min

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:

  1. Advisory clamp. summarize_gate degraded the summary state if any item was Degraded — but usage_gauge, honesty_guidance, and completion_control are 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.

  2. Write-back ordering. completion_notification (Required) is Satisfied only when completion_notification_finalized_at is set — which the renderer writes after reading the gate. So at compute time every authoritative turn was Recovering+blocking: record_ready was 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).

  3. Cold-start probe. The memory-tools probe cold-spawns a fresh node local-mcp per 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 DegradedReady; 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.