Skip to content

fix(headless): classify incomplete terminal provider streams under Pier - #1762

Merged
Astro-Han merged 1 commit into
mainfrom
fix/headless-pier-terminal-stream
Aug 1, 2026
Merged

fix(headless): classify incomplete terminal provider streams under Pier#1762
Astro-Han merged 1 commit into
mainfrom
fix/headless-pier-terminal-stream

Conversation

@Astro-Han

Copy link
Copy Markdown
Contributor

Summary

Post-merge external review of #1758 found that d783aa3a4's terminal-provider-stream classification only exists in the Harbor runner: a Pier trial whose last proxied provider request ends interrupted/failed/aborted (a 200 stream without its protocol terminal event = incomplete provider response) still reads the verifier reward and can record a graded model failure where Harbor throws infra. This ports the semantic to the Pier runner.

  • Extracts the predicate as incompleteTerminalProviderRequest in harbor-task-runner.ts (the module both runners already import shared helpers from); Harbor's behavior is byte-identical
  • pier-task-runner.ts throws PierInfraError ('infra_failed', telemetry artifact attached) at the same point in its flow — after the exit-code check, before reading the reward
  • Both DeepSWE arms run under Pier, so paired comparability was never broken; this fixes the classification itself for every Pier benchmark

Verification

  • RED first: new pier-runner test fails with "Missing expected rejection" before the fix
  • The test drives the runner's real seam — a hub lease whose recorded telemetry ends interrupted must throw, completed must take the reward path (the proxy's recording of truncated streams is already covered by the Harbor live-SSE test on the shared proxy machinery)
  • packages/headless suite: 1456 pass / 0 fail; format/lint clean

Review focus

The timed-out-trial exemption is shared with Harbor: complete timed-out trials settle by deadline, so their truncated tail request is expected.

@Astro-Han
Astro-Han merged commit b490600 into mainAug 1, 2026
3 checks passed
Sign up for freeto 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

@Astro-Han