[eric] agents: OSW_FAULT=unclassified_error makes the generic error card drillable, pinned as owned by no classifier

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012G8kyALnPjsA7aJFmMBq3R
This commit is contained in:
ciregenz
2026-09-02 00:06:45 -07:00
co-authored by Claude Fable 5.1
parent 4d9ecb9a16
commit 5cc9754709
3 changed files with 22 additions and 0 deletions
@@ -28,6 +28,7 @@ KNOWN_FAULTS: Set[str] = {
"dead_lane", # the router has already given up on the credential (ENG-414 preflight)
"cli_context_squeeze", # a tiny context window, so autocompact thrash is drillable (ENG-418)
"stale_tool_schema", # the CLI's deferred-tool 400, byte-real incl. truncation (ENG-394 wall 2)
"unclassified_error", # a raw runtime failure no classifier owns, so the snag card is drillable (self-heal audit)
}
# The window `cli_context_squeeze` pretends the model has, and the number is load-bearing.
@@ -75,6 +75,10 @@ class TurnRunner(AgentManagerProtocol):
"'mcp__openswarm-core__ShowUI' cannot have both defer_loading=true and cache_ "
"(reset after 15s)\"}}"
)
# One-shot, and deliberately a text NO classifier owns: it must fall through to the generic
# branch, whose raw "Error: ..." card used to render as nothing at all (self-heal audit, 2026-09-01).
if p_fault_once("unclassified_error"):
raise RuntimeError("Command failed with exit code 1 (exit code: 1)\nError output: Check stderr output for details")
async def prompt_stream():
yield {
+17
View File
@@ -63,6 +63,7 @@ WIRED_IN = {
"dead_lane": "backend/apps/agents/manager/run/lane_preflight.py",
"cli_context_squeeze": "backend/apps/agents/manager/configure_provider_env.py",
"stale_tool_schema": TURN_RUNNER,
"unclassified_error": TURN_RUNNER,
}
@@ -181,3 +182,19 @@ def test_the_harness_declares_what_it_cannot_reach():
from backend.apps.agents.core.fault_injection import UNREACHABLE_WITH
assert "empty_finish" in UNREACHABLE_WITH
assert set(UNREACHABLE_WITH) <= KNOWN_FAULTS
def test_the_unclassified_fault_is_owned_by_no_classifier():
"""The drill exists to reach the generic branch; if any classifier ever claims this text the
drill silently measures a different door."""
from backend.apps.agents.core.error_classify import (
is_auth_error, is_connection_lost, is_context_overflow_error, is_external_kill_error,
is_stale_tool_schema_error, is_transient_capacity_error,
)
text = re.search(r'RuntimeError\("(.+?)"\)', p_block("unclassified_error")).group(1).encode().decode("unicode_escape")
exc = RuntimeError(text)
assert "exit code 1 " in text or "exit code 1\n" in text
for pred in (is_external_kill_error, is_stale_tool_schema_error, is_transient_capacity_error, is_context_overflow_error):
assert not pred(exc), pred.__name__
assert not is_auth_error(exc)
assert not is_connection_lost(exc)