Repository navigation
fix(flows): cap generated PR and comment bodies under GitHub's 65,536-character limit - #161
Conversation
…-character limit (#160) Garden run 80faae32 lost its pull request after 92 minutes to "Body is too long (maximum is 65536 characters)": nothing bounded summary.md plus the check report. Every body the generated flow posts now stays within FLOW_BODY_LIMIT (60,000 bytes, which bounds the characters too): - the check report cuts the script, each log (keeping its tail) and the repair notes to fixed section limits; summary.md gets what is left. The verdict is never cut, and an open code fence is closed; - the metadata step caps an over-long body and puts back a closing reference (Fixes #N) the cut removed, so it always survives; - the unresolved-review and time-stop comments are capped, and the withheld-workflow section's room is measured against the same limit. Cut text goes to the step's stderr, so the run journal keeps it, and the body says where the full text is. Fixes #160 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Session-Id: 27d4ebe3-2e2f-461e-849f-1bd9727cfc05
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Devin Review found 4 potential issues.
1 flag not posted on this PR by your GitHub settings — view it in Devin Review. (Configure)
…nce, keep one-line text, print no cut text Review on #161: - the withheld-workflow section is capped as a whole against the body's remaining room, so 50 long paths cannot overflow a near-full body; - the check report is told the closing reference and leaves room for its real length, so a long ticket URL never cuts the report; - relayflow_cap keeps what fits of a one-line file, cut at a UTF-8 character boundary, and closes an open fence with a matching fence; - cut text is no longer printed to stderr: a log or review can hold credentials the run journal must not show. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Session-Id: 27d4ebe3-2e2f-461e-849f-1bd9727cfc05
There was a problem hiding this comment.
All reported issues were addressed across 3 files
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
|
Preview deployed!
This is a Cloudflare Workers preview version of this PR's build. |
…osing fence Review on #161: - the prepared pull-request body stays FLOW_WITHHELD_NOTICE_RESERVE (2 KB) under FLOW_BODY_LIMIT, so the push step can always say it withheld workflow edits, however full the body is; - relayflow_cap measures its result and, when a closing fence as long as an agent's opening one ran over, keeps less and tries again (three tries, then empty), so the result never exceeds its bound. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Session-Id: 27d4ebe3-2e2f-461e-849f-1bd9727cfc05
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ca8431cb17
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d07e85b250
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Review on #161: relayflow_cap recognised only backtick fences, so a summary cut inside a ~~~ block left the report rendering as code. Tilde fences are now tracked too, and a fence closes only with the same character, at least as long. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Session-Id: 27d4ebe3-2e2f-461e-849f-1bd9727cfc05
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 246fc8d0b6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Review on #161: - the closer awk also tracks HTML comments outside code blocks, so a summary cut inside <!-- ... --> cannot hide the report after it; - a closing reference over FLOW_REFERENCE_LIMIT (1,024 bytes) is never appended, and the validation step, now given the reference, refuses it (reference-too-long) before anything is pushed. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Session-Id: 27d4ebe3-2e2f-461e-849f-1bd9727cfc05
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8d53840f72
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
All reported issues were addressed across 2 files (changes from recent commits).
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
…ce stop end to end Review on #161: - the closer awk treats a fence as one only when indented at most three spaces (GFM); four spaces or a tab is an indented code line; - the generated flow is run with the real validation command: a runaway closing reference stops at needs_human before any push or pull request, and an ordinary one publishes; - the long-reference tests derive their boundary from the prefix. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Session-Id: 27d4ebe3-2e2f-461e-849f-1bd9727cfc05
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 494079b52c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…k fences Review on #161: the closer awk now skips `<!--` inside inline code spans, and does not treat a backtick fence whose info string holds a backtick as an opener (GFM does not). Restructured so an opener records its fence and a closer must be the same character, at least as long, with only whitespace after it. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Session-Id: 27d4ebe3-2e2f-461e-849f-1bd9727cfc05
|
@codex review |
There was a problem hiding this comment.
All reported issues were addressed across 2 files (changes from recent commits).
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9bc1717e44
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Review on #161 kept finding Markdown constructs the closer awk could not track (uneven inline-code delimiters, multi-line code spans, CRLF, open <details>). Parsing Markdown in awk does not converge, so relayflow_cap no longer tries: the kept start of a cut is shown in a code block whose fence is longer than any backtick run in it. Nothing inside can be interpreted, so no construct the cut leaves open can hide the check verdict or the closing reference after it. The tests render each body with micromark (GFM, raw HTML allowed, as GitHub does) and assert the report heading and Fixes line are visible for every construct the review raised. micromark and micromark-extension-gfm become web devDependencies at the versions already in the lockfile. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Session-Id: 27d4ebe3-2e2f-461e-849f-1bd9727cfc05
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f0ba544be5
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit f0ba544. Configure here.
There was a problem hiding this comment.
All reported issues were addressed across 4 files (changes from recent commits).
const html = micromark(body, { extensions: [gfm()], htmlExtensions: [gfmHtml()], allowDangerousHtml: true });
```</violation>
</file>
const html = micromark(body, { extensions: [gfm()], htmlExtensions: [gfmHtml()], allowDangerousHtml: true });
```</violation>
</file>
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
… blocks to fit Review on #161: - a cut summary (and the last-resort cap of a whole body) is shown as code, where a closing reference does nothing, so the reference is taken out first and appended after the report, exactly once; - the report's script and log blocks use relayflow_block, a fence longer than any backtick run inside, so a cut script's own fence, or a fence in check output, can no longer end the block early; - the tests render with raw HTML allowed throughout, as GitHub does. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Session-Id: 27d4ebe3-2e2f-461e-849f-1bd9727cfc05
|
@codex review |
There was a problem hiding this comment.
All reported issues were addressed across 2 files (changes from recent commits).
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
|
Codex Review: Didn't find any major issues. Can't wait for the next one! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Session-Id: 27d4ebe3-2e2f-461e-849f-1bd9727cfc05
|
@codex review |
|
Codex Review: Didn't find any major issues. 🚀 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |

Fixes #160
Garden run
80faae32(AgentWorkforce/flows#494) did its work, then lost its pull request toBody is too long (maximum is 65536 characters). Nothing inweb/lib/flow-workflows.tsboundedsummary.mdplus the check report.What changed
Every body the generated flow posts now stays within the new
FLOW_BODY_LIMIT, set to 60,000 bytes. A byte is at most one character, so this also keeps the character count under 60,000.A shared POSIX helper,
relayflow_cap <file> <bytes> head|tail <where>, does the cutting:<details>or code span left open by the cut can hide what follows.…truncated to fit GitHub's limit … The full text is <where>. The cut text is never printed, because logs can hold credentials.Where the cap applies:
FLOW_CHECK_REPORT_COMMAND): the check script is capped at 4 KB, each log at 10 KB (keeping the tail, where the failure is), and the repair notes at 4 KB.summary.mdgets what is left. Two amounts come off before that: the real length of the closing reference, andFLOW_WITHHELD_NOTICE_RESERVE(2 KB), so the push step always has room to say it withheld workflow edits. The verdict is never cut.FLOW_PREPARE_CHANGE_METADATA_COMMANDand validation): an over-long body is capped and aFixes #Nline the cut removed is put back at the end. A reference overFLOW_REFERENCE_LIMIT(1 KB) is refused asreference-too-longbefore anything is pushed.review-blocked.mdandtime-stop.mdare capped. The withheld-workflow section is capped as a whole against the room left in the body.Tests (red, then green)
New block in
flow-workflows.test.ts(agentrelay.com#160), plus additions to the push-guard and onboarding tests:Fixes #160line and the tail of each log, and passes validation.Fixesstay visible when the cut leaves any of these open:<details>;needs_humanwith no push and no PR;The full web suite passes (456 tests), as do
tsc --noEmitandnpm run verify:recommended-flows; the shell is also exercised undergawk --posix.micromarkandmicromark-extension-gfmare added as web devDependencies at the versions already in the lockfile.🤖 Generated with Claude Code
Note
Medium Risk
Changes shell logic on the publish path (PR body assembly, push guard, comments) where mistakes could truncate content or block valid PRs, but behavior is heavily tested and fail-closed on over-long references.
Overview
Fixes #160 by bounding every body the generated Relayflow posts (PR bodies, review/time-stop comments, withheld-workflow sections) under
FLOW_BODY_LIMIT(60,000 bytes), withFLOW_WITHHELD_NOTICE_RESERVEleft for the push step andFLOW_REFERENCE_LIMITrejecting oversized closing lines before push.A shared POSIX
relayflow_cap/relayflow_blockpair truncates at line or UTF-8 boundaries, fences kept text so open Markdown/HTML cannot hide the check report orFixes #N, omits cut log text from output, and re-appends the closing reference after caps.FLOW_CHECK_REPORT_COMMANDnow caps script/logs/repair sections, sizessummary.mdto remaining room (accounting forreference), and embeds check output via safe fences; metadata prepare/validate and the generated factory flow passreferencethrough those steps.Tests add micromark-based rendering checks, push-guard near-full-body cases, and onboarding
reference-too-long→needs_humanwithout push/PR.Reviewed by Cursor Bugbot for commit 6b9979b. Bugbot is set up for automated code reviews on this repo. Configure here.