fix(gateway): surface an 'unknown' toolchain status at the gate instead of passing silently

The toolchain guard fails open on a recorded 'unknown' status (precision over recall — never strand a task on an inconclusive smoke). But an 'unknown' means provisioning ran yet the smoke could not confirm the suite is collectable under the interpreter, so the gate was proceeding blind with no trace — a silent hollow pass. It now emits a 'toolchain.unverified_gate_pass' warning with the agent and task ids when proceeding past 'unknown', while still not blocking; a missing marker (None) stays silent so the warning carries signal.
This commit is contained in:
Renn F
2026-06-22 13:06:55 +02:00
parent 02f43f5dfe
commit 0a890c401e
2 changed files with 40 additions and 0 deletions
@@ -1712,6 +1712,21 @@ class Choreographer:
if not _settings.toolchain_match_enabled:
return None
status = await self.git.toolchain_status_for_task(agent_id, task)
if status == "unknown":
# Fail-open (precision over recall) but never silent: a recorded
# 'unknown' means provisioning ran yet the smoke could not confirm
# the suite is collectable under the interpreter — a possible hollow
# pass. Surface it so an operator can see the gate proceeded blind.
logger.warning(
"toolchain.unverified_gate_pass",
agent_id=str(agent_id),
task_id=str(getattr(task, "id", "")),
detail=(
"gate proceeding past an unverified toolchain — the "
"workspace smoke could not confirm the project's suite is "
"collectable under the provisioned interpreter"
),
)
if status != "broken":
return None
return Envelope.invalid_state(