Skip to content

fix(judge): carry the rules output as a mail attachment - #812

Merged
TheGreatAxios merged 3 commits into
mainfrom
cl-12014-handle-1-mib-rules-payloads-in-triage-judge-without-failing
Nov 4, 2026
Merged

TheGreatAxios merged 3 commits into
mainfrom
cl-12014-handle-1-mib-rules-payloads-in-triage-judge-without-failing

Conversation

@TheGreatAxios

@TheGreatAxios TheGreatAxios commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Closes CL-12014

On a pull request whose rules output is over 1 MiB, the judge failed every step with "the mail carries no request", including the report and the stop, so the manager waited for the judge until its deadline. Stock stores a mail part over 1 MiB by reference and leaves out its text, and the judge read only the text.

What changed

  • The manager mails the judge the pull request as the body and the rules output as a rules.json attachment.
  • The judge's mail triggers its run directly instead of an onTrigger body, because stock reads attachments only for a top-level agent step. Its first step, whose director makes no model call, replies with the attachment for the steps after it, within the judge's 15-minute step timeout.
  • report and stop read only the body, so the judge reports and stops however the rest ended.
  • report.test.ts is removed: the judge's workflow test covers judgeRequest, report and stop end to end.
  • docs/ARCHITECTURE.md describes the judge's mail. The user manual describes nothing that changed.

Verified

  • A new chain test runs a 40-file pull request whose rules output is over 1 MiB, through the real hub, sidecars and stock mail. On main the judge failed with "the mail carries no request" and the manager never stopped. With this change the judge asks the decision model every slice question, one verdict is posted, and the manager stops. A manager pass on this pull request takes about a minute (CL-12049), so the test waits up to 400 s.
  • The judge's workflow test runs the definition through runLocal, with the rules director given the attachment. A new case shows a judge mailed without the rules reports "the judge did not finish" and stops.
  • bun run check, bun run lint, tests/model, the triage-judge and triage-manager tests and the vendor-diff gate pass.

@linear-code

linear-code Bot commented Nov 3, 2026

Copy link
Copy Markdown

CL-12014

@TheGreatAxios
TheGreatAxios marked this pull request as ready for review November 3, 2026 19:26
@corbits-triage

corbits-triage Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Triage: Pass

No changes needed from you. A maintainer will review this pull request.

Notes:

  • Risk: medium (2 recently fixed files)

@TheGreatAxios
TheGreatAxios added this pull request to the merge queue Nov 4, 2026
Merged via the queue into main with commit 330c6a0 Nov 4, 2026
18 checks passed
@TheGreatAxios
TheGreatAxios deleted the cl-12014-handle-1-mib-rules-payloads-in-triage-judge-without-failing branch November 4, 2026 04:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant