Repository navigation
Conversation
The earlier ADR 0160 tuned the candidate window and random pick of the jira-poll driver. It was accepted on 2026-11-10 and never implemented. Under sustained load it still leaves requests without a bounded wait and still drops them after 24 hours. This replaces it with a queue found by search: an issue is waiting until a label says an agent handled it, the oldest waiting issues go first, and a waiting request does not expire. Each agent's labels and commands are read from its trigger rule, automatic triggers and repeated requests are staged as a label within 24 hours, and the queue is on by default. The old file is deleted and a new file added under the same number. ADR 0063 and docs/architecture.md point at the new decision, and ADR 0061 and ADR 0153 each gain a status note for the rules this decision narrows or extends. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Signed-off-by: Bill Murdock <bmurdock@redhat.com>
|
🤖 Finished Review · ✅ Success · Started 3:09 PM UTC · Completed 3:21 PM UTC Commit: Runtime: pi · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $2.87 |
Site previewPreview: https://62c2f4f2-site.fullsend-ai.workers.dev Commit: |
|
Risk Assessment: moderate (2/5) DetailsDocumentation-only ADR replacement with no protected paths, but elevated to moderate risk by substantial diff size (744 lines across 6 files) and high churn on touched documentation files. |
ReviewFindingsHigh
Medium
Low
Labels: The PR is an ADR change about the Jira poll driver and its dispatch triggers. Next steps:
|
| ([ADR 0061](0061-harness-cel-dispatch.md)): a rule the driver cannot read | ||
| stops the poll with an error, and a reaction to a Jira issue being closed | ||
| or reopened is not served (Decision item 1). | ||
|
|
There was a problem hiding this comment.
[high] architectural-conflict
The PR deletes the Accepted ADR 0160 (docs/ADRs/0160-spend-jira-poll-slots-only-on-candidates-with-new-activity.md) from main and reuses the number 0160 for a different decision. docs/contributing/adrs.md says an accepted ADR is an immutable point-in-time record that is superseded by a new ADR, not rewritten or removed, and ADRs 0161 and 0162 already exist on main, so 0160 is not the next free number. Related: the same deletion is flagged under pattern-inconsistency (docs/ADRs/0160-spend-...md) and the number reuse under naming-convention (line 2); all three are merged here. The PR body acknowledges the departure and asks maintainers to object, but the repo's documented rule is the Superseded path.
Suggested fix: Restore docs/ADRs/0160-spend-jira-poll-slots-only-on-candidates-with-new-activity.md with status Superseded and a note linking to the new ADR. Renumber the new ADR to the next free number (0163) and update the links in docs/ADRs/0061-harness-cel-dispatch.md, docs/ADRs/0063-polling-based-work-discovery.md, docs/ADRs/0153-authorize-jira-poll-actors-without-project-administration.md and docs/architecture.md.
| happened to the requests seen so far and does not close the issue to | ||
| later ones: a new command or a label added again is staged as item 4 | ||
| describes. | ||
| 8. **The agent's own comment is the receipt.** A request that is followed |
There was a problem hiding this comment.
[high] logic-error
Decision item 8 decides that a request has been acted on from comment order alone ('followed on the issue by a result or run-status comment from that agent'). If request A starts a run, request B arrives after the run captured its input, and the run then posts its result, B counts as answered and is dropped permanently. The same rule also defeats the retry the ADR offers: after an outcome label is removed, the original request still precedes the old result comment, so pickup restores the hand-off label and runs nothing.
Suggested fix: Define receipts that identify the request or input boundary a run consumed, and treat an authorized outcome-label removal as a new retry occurrence that an earlier receipt cannot satisfy. Do not infer consumption from a later comment timestamp alone.
| hours, reads their summary, description and label history in bulk and, | ||
| where an issue carries an agent's hand-off or declined label, its | ||
| comments. | ||
| It adds the agent's queued label when, since the driver last recorded an |
There was a problem hiding this comment.
[medium] edge-case
Item 4 stages events 'since the driver last recorded an outcome', which is when the outcome label was written. A command that arrives after the driver read history (t1) but before it wrote the label (t3) is older than the recorded outcome and is not staged next cycle, although no pickup read it. This contradicts item 4's own requirement that an event landing while a cycle works on the issue must be staged by a later cycle.
Suggested fix: Specify a durable consumed-event boundary tied to the input snapshot rather than the later label-write time, with a recovery rule that stages events arriving between the snapshot and the outcome commit.
| passes, at most one per agent per pickup. The search finds candidates | ||
| and authorizes nothing. | ||
| 7. **The outcome is written as a label.** When a dispatch is written the | ||
| driver adds the agent's hand-off label and removes its queued label, at the |
There was a problem hiding this comment.
[medium] logic-error
For a repeated command or label request on an issue that already carries the outcome label, nothing in the text advances the consumed-request boundary. Adding an already-present hand-off or declined label creates no new history entry, and item 4 counts the driver's queued-label removal as an outcome only for automatic triggers. Such a request can be staged again after every pickup instead of leaving the queue.
Suggested fix: Define how every completed pickup, including repeated requests whose outcome label is unchanged, advances its consumed-request boundary, and apply it consistently to staging and pickup.
| with the first deployment that reaches it. | ||
| 5. **Two lines, each oldest first.** Each cycle searches for two sets of | ||
| waiting issues, both inside the repository's query with its sort clause | ||
| removed and both ordered by creation time ascending. The first line is |
There was a problem hiding this comment.
[medium] logic-error
Item 5 orders repeated requests by issue creation time. With a continuously occupied first line, the second line gets one slot per cycle, so a fresh request on the oldest previously handled issue can take it every cycle and a repeated request already waiting on a younger issue is never reached. Consequences documents the second line as having no bound, but this conflicts with the Context aim that every waiting request is reached eventually.
Suggested fix: Order repeated requests by when they were enqueued, or use another fair scheduling rule, so a just-served old issue cannot repeatedly overtake an existing waiter.
| ([ADR 0153](0153-authorize-jira-poll-actors-without-project-administration.md)), | ||
| because creating an issue does not require Edit Issues. The same holds | ||
| for a queued label present at creation and for a label added before the | ||
| issue moved into the project. A queued label added by anyone but the |
There was a problem hiding this comment.
[medium] api-contract
A queued label added by anyone but the driver is declared that person's label request, but the text gives no mapping from that event to the agent's trigger rule. Item 6 requires every event to pass 'the trigger rule as today', and a rule that accepts only ready-to-code or a slash command matches neither the addition of ai-code-queued. Item 3 selects the issue, but item 6's trigger evaluation rejects its only real event. The PR body lists this as known defect 4.
Suggested fix: Specify the event representation and routing for a manually added queued label, including how it satisfies the agent's trigger without fabricating a different source event, or state that manual queued labels are not requests.
| agent's requests on the issue can be dispatched (the text is not a | ||
| command, the actor is a bot or lacks permission, the rule is false, or | ||
| the issue cannot be read, or its event validated or evaluated, for a | ||
| reason a retry will not fix) the driver adds the declined label, and |
There was a problem hiding this comment.
[medium] rbac-violation
Item 7 has the driver add the declined label when the actor is a bot or lacks permission, and Consequences says an issue that only mentions a command is examined once and gets that label. Item 5 puts issues that carry an outcome label in the second line. So a commenter with no agent-trigger permission can move a later legitimate first request on that issue into the second line, which Consequences allows to wait without bound. Dispatch authorization protects agent execution but not this scheduling-state change. The PR body lists this as known defect 2.
Suggested fix: Separate rejected or incidental comment matches from the outcomes of authorized requests, and specify that an unauthorized request cannot move a later authorized first request into the second line. Keep rejection deduplication as a separate mechanism if needed.
| agent's three labels, as the triage writer refuses the labels that steer | ||
| triage today, so that an agent acting on issue text cannot hide a | ||
| request. That change is in the agents repository and the queue does not | ||
| wait for it: until it lands, such an agent can hide or delay requests on |
There was a problem hiding this comment.
[medium] prompt-injection
The queue is enabled before the agents-repository change that makes result writers refuse the queue's labels. Until then, Consequences states that 'such an agent can hide or delay requests on the one issue it runs on'. Issue text can therefore influence an agent into adding hand-off or declined labels, or removing queued labels, which suppresses other requests. The actor checks on reconstructed events do not cover this, because forged state prevents pickup in the first place. The ADR bounds the impact to one issue and to suppression, and the implementation in the agents repository was not available to verify.
Suggested fix: Make deterministic enforcement of the hand-off, queued and declined labels, for additions and removals through every agent-accessible label-writing path and outside model instructions, a prerequisite for enabling the queue.
| ([ADR 0063](0063-polling-based-work-discovery.md) keeps authorization | ||
| out of input drivers): the driver marks an event whose label was not | ||
| added by an edit in the project, the gate applies the Edit Issues rule | ||
| only to an unmarked label event, and the person who removed a label is |
There was a problem hiding this comment.
[medium] auth-bypass
Item 6 applies the Edit Issues rule only to an unmarked label event, and a label keeps the permission its adder had when it was added, at any age. Pickup now reconstructs requests of any age, including during the upgrade backfill, so a pending label added by someone whose access has since been revoked can still start an agent. Creation-time labels, pre-move labels and outcome-label removers get extra checks; ordinary historical in-project label additions do not. The former 24-hour window bounded this exposure. The PR body lists this as known defect 3.
Suggested fix: Define revocation semantics for historical label requests: require current authorization at pickup, or a fresh authorized confirmation when the adder's current permission cannot be verified. Keep the stricter creation-time and pre-move checks.
| cycle. A repeated request or an edit waits in the second line, which has | ||
| a reserved share and no bound while such events on older issues arrive | ||
| faster than that share. | ||
| - The poller writes labels on Jira issues by default, where today it |
There was a problem hiding this comment.
[low] doc-style
The Consequences section has 14 multi-sentence bullets, against the writing-adrs skill guidance of '3-5 bullet points. Each one sentence.' (skills/writing-adrs/SKILL.md line 76), which names essay-length Consequences as an anti-pattern.
Suggested fix: Condense Consequences toward 3-5 concise bullets and move operational detail into the Decision section, the Jira integration guide or the follow-up implementation docs.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
I am closing this without merging. The design in this draft grew a new rule for every case that review turned up, and I no longer think its foundation is right. The durable fix for lost Jira requests belongs in the entity-based design: ADR 0079 in #9199 and the discovery protocol in #9590. I have left review comments on both about the points that matter for Jira. For the shipped The review threads here are about the design I am withdrawing, so I am leaving them unanswered. The cases they raised are kept as test cases for the follow-up work. Written by Bill Murdock with assistance from Claude Code. |
Summary
Replaces ADR 0160 with a different decision for the
jira-polldriver: find work by searching for issues that carry a request and no label saying it was handled, oldest first. A request on an issue with no outcome label is found at any age, and a request that is waiting does not expire.This is a draft. The design is still changing, and the defects I know of are listed in the next section. I am opening it now so the direction is visible.
This pull request deletes an accepted ADR and adds a new one under the same number, which the contributing guide does not provide for. The reasons are below. That choice will land unless a maintainer objects in review.
Known defects in this draft
Two independent review passes ran on earlier drafts. These findings from the second are still open, and the fixes made since that pass have not been reviewed.
labels: jira_editors. A label keeps the permission its adder had when it was added, at any age. Today the 24-hour window limits that as a side effect.Related Issue
No GitHub issue yet; one implementation issue follows this pull request. Jira: AISDLC-680.
This deletes an accepted ADR
The contributing guide says not to rewrite an accepted ADR and to supersede it with a new one. I am deleting the file and adding a new one under the same number instead, for these reasons:
As far as I can find, no ADR file has been deleted from
mainbefore. If a maintainer prefers the usual form, the change is small: restore the old file with status Superseded and give this ADR the next free number.The diff shows one file deleted and one added. ADR 0063 and
docs/architecture.mdare edited to point at the new decision. The edits to accepted ADRs are status notes only: two in ADR 0063, one added to ADR 0061 and one added to ADR 0153.Changes in behaviour that will land unless a maintainer objects in review
ai-code-agent(handed off),ai-code-queued(waiting again),ai-code-declined(refused). Today it writes none.tracker.jira.run_labelequal to one of the queue's labels.fullsend lintreports the first two. No shipped agent is affected.tracker.jira.poll.max_issues_per_cycle(default 5, from 1 to 50). A cycle stops examining issues after five minutes, which is fixed, and writes each declined label as it goes.fullsend pollgains a preview option that reports what a cycle would do and writes nothing. It replaces the guide's dry-run tip, which advances checkpoints.createdin the poll query keeps older requests out.The ADR also asks for one change outside this repository: agents' result writers must refuse to add or remove the queue's labels, as the triage writer refuses the labels that steer triage today. The queue does not wait for it, because a label starts nothing.
Changes
docs/ADRs/0160-queue-jira-work-by-search-so-no-request-expires.md.docs/ADRs/0160-spend-jira-poll-slots-only-on-candidates-with-new-activity.md.docs/ADRs/0063-polling-based-work-discovery.md: replace the status note that pointed at the old ADR 0160, and qualify the ADR 0147 note above it.docs/ADRs/0061-harness-cel-dispatch.md: add a status note (the driver stops on a trigger rule it cannot read, and does not serve closed or reopened on Jira).docs/ADRs/0153-authorize-jira-poll-actors-without-project-administration.md: add a status note (a label not added by an edit in the project is authorized as a command is).docs/architecture.md: replace the Jira poll selection line (marked target state).No implementation is in this pull request. It follows in two: the trigger-rule reader with its lint check and the new Jira client calls, then the poller change with the guide rewrite.
Evidence for claims about current behaviour
fullsend at
1b3f16b3f09cbb103a35ccbcdd22e758db7046a9, agents at62f25ace461b9c11a712bf5762f6e881892e4b74.Newdefaults,selectRandomcall,searchCandidatesDefaultJiraPollQuerydetectChanges,readLastCheck,lastCheckPropertyKeyreadLastCheck, 24-hour defaultopened; guideRunnewCELMatcher,celtriggerconfig.yamltracker.jira.run_labelis opt-in and added by the runnerRunLabel,addJiraRunLabellockPropertyKey,lastCheckPropertyKeyautomationDisplayNamePatternandactorKind,filterBotEventsattemptLock(read, write, pause, read),releaseLock(read, delete)JiraClientinterface has no call that writes a commentlabels: jira_editorsa label-added event is admitted with no role checkauthorizeEventtracker.jira.polljiraPollKeysCONTROL_LABELS, label actionsEvidence for claims about Jira
From Atlassian's documentation:
CHANGEDandWASwork with Assignee, Fix Version, Priority, Reporter, Resolution and Status only (JQL operators), so no search finds "summary or description changed" or "label added again".I also ran read-only requests against a Jira Cloud site on 2026-11-13. No request wrote anything.
created ASC) returned its matches oldest first, including issues with no labels at all.labels not in (...)on its own drops unlabelled issues;labels is EMPTY OR labels not in (...)does not.Not tested: any write, how quickly new issues appear in search, rate limits, whether the bulk permission call reflects a workflow status that blocks edits, and whether creating an issue with a label needs only the Create Issues permission (the ADR assumes it does and takes the stricter check). The ADR requires the implementation to show that an issue the driver cannot label is never handed to an agent.
I prototyped the trigger-rule reader outside this pull request. It read the labels, commands and automatic triggers correctly from the six shipped rules that have a trigger, and gave the expected result on 22 made-up rules, including pattern matches and "closed" inside parts of a rule that cannot apply to a Jira issue. The shipped trigger rules have not changed between that test and the agents commit above.
Testing
make lintequivalent: the ADR linters and pre-commit pass on the changed filesChecklist
!for breaking changes)🤖 Generated with Claude Code