Repository navigation
feat(jira): let JIRA_ISSUE_GET page back to older comments - #7886
Merged
Merged
Conversation
The issue rendering gives its 12k comment budget to the newest comments and only says "[… N older comments omitted]". A run had no way to read those, so anything that lived in an old comment, like a test account a card points to, was out of reach. JIRA_ISSUE_GET takes `commentsBefore`: render only the first N comments of the thread, with the same budget. When older comments are hidden or the oldest shown one is clipped, the rendering names the value that reaches them, so a run can page back to the first comment and read each one whole once (a single comment over the budget stays clipped).
viktormarinho
enabled auto-merge (squash)
October 13, 2026 16:28
decocms Bot
pushed a commit
that referenced
this pull request
Oct 13, 2026
PR: #7886 feat(jira): let JIRA_ISSUE_GET page back to older comments Bump type: minor - decocms (apps/api/package.json): 4.468.0 -> 4.469.0 - @decocms/native (apps/native/package.json): 4.468.0 -> 4.469.0 Deploy-Scope: server
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is this contribution about?
renderIssueForPromptis used by both a Jira run's opening message andJIRA_ISSUE_GET. It gives its 12k comment budget to the newest comments, which is the right default. Older ones are dropped with a[… N older comments omitted]marker, and nothing could read them: a run had no way to page back. In practice, anything that lives in an old comment is out of reach. For example, a card's acceptance criteria said where the test account was, and two runs in a row were blocked on it.This change:
JIRA_ISSUE_GETtakes an optionalcommentsBefore: number. The rendering then shows only the first N comments of the thread, oldest first, with the same budget, under a## Comments (1–N of T)heading.To read the earlier comments, call JIRA_ISSUE_GET with `commentsBefore: K`.This line also appears in a run's opening message, so the run learns about the parameter where it hits the limit.renderIssuesForPrompt) is untouched.How did you verify your code works?
bun test apps/api/src/jira/issue-prompt.test.ts: 16 pass. The existing budget tests are unchanged. 5 new tests:commentsBeforethat reaches the hidden comments;1–N of Tand keeps the rest of the issue;bun run verify: 10573 pass, 0 fail.bun run check: exit 0.JIRA_ISSUE_GETagainst a real Jira thread on this build.How to Test
JIRA_ISSUE_GETwith its key. The result says[… N older comments omitted]and names acommentsBeforevalue.## Comments (1–K of T). Repeat until no value is named.Review Checklist
Summary by cubic
Lets
JIRA_ISSUE_GETpage back through a long comment thread. The 12k comment budget always went to the newest comments and older ones were dropped with an omitted marker, with no way to read them; now the tool takes an optionalcommentsBeforethat renders only the first N comments, oldest first.commentsBeforevalue to call next, so a run can page back and read each comment whole once.Written for commit 4d1e0fb. Summary will update on new commits.