Skip to content

fix(lab-gate): report a gate that printed nothing by its exit code and resource-guard verdict - #18504

Merged
chubes4 merged 2 commits into
mainfrom
fix/lab-gate-empty-stdout-names-job-cause
Nov 18, 2026
Merged

chubes4 merged 2 commits into
mainfrom
fix/lab-gate-empty-stdout-names-job-cause

Conversation

@chubes4

@chubes4 chubes4 commented Nov 18, 2026

Copy link
Copy Markdown
Member

Problem

A Lab gate job that ends before gate-execute prints anything was reported as a receipt parse error:

validation.invalid_argument … Invalid argument 'gate.receipt': Lab gate gate_stdout unparseable (0 bytes) … EOF while parsing

That buried the real cause. In runner job 58a52bd1 (Cook agent-task-a4a1fedf), the runner's resource guard had stopped the gate with resource_guard.process_count_limit_exceeded and exit code 1. That verdict was already in the job's result event, under metrics.guard_violation.

Change

When the terminal gate stdout is empty, the transport returns a typed runner.lab_transport_failure before attempting to parse:

Lab gate job <id> ended with exit code N before printing its result: resource_guard.process_count_limit_exceeded: process_count=… (top: chrome-headless×79, …)

  • Details: exit_code and resource_guard (the violation), with gate_disposition: unavailable.
  • No guard verdict: without one, the message carries the redacted stderr tail instead. Private gates omit stderr.
  • Retry behavior: the error remains a retryable non-execution, so Cook defers the gate with the candidate preserved, as for other unavailable gates.

The cause of this particular kill (pids.max set in the wrong unit) is fixed in #18503.

Evidence

  • New a_gate_that_printed_nothing_names_its_exit_and_resource_guard covers both cases, guard verdict and stderr-only. It also checks the result is still classified as a Lab gate transport failure.
  • -p homeboy-lab-runner --lib gate_transport on the Lab: 21/21.

Written by Claude (claude-opus via Claude Code): traced from the Lab runner job events and implemented this change.

@chubes4
chubes4 merged commit 2caa105 into main Nov 18, 2026
17 checks passed
@chubes4
chubes4 deleted the fix/lab-gate-empty-stdout-names-job-cause branch November 18, 2026 22:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant