Repository navigation
feat(jirapoll)!: search the whole backfill window, oldest change first #9878
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
527843f
e0d3663
c060643
f2c408c
a8cfc1c
95d4ad7
c999cae
71112a5
5d27b04
6635f32
ea42aab
a85a142
34f1a18
fa9fcb0
094cc3b
afeda2c
2d83300
a772539
01d47ae
ede31d1
0d65b81
5847e8c
870f3e7
07a34db
2fa4335
5814593
d94f734
bf9f4b2
abd309f
ca2a217
f32dd09
3607b26
c5bc2b0
ff8b695
ed3327b
d073774
0a619f0
cd9d329
c696b96
abef7cc
cfd8196
875ac79
423d60c
9905ace
1216ae9
bf8aafc
191c0d7
ee0693e
a81de2a
b56a622
b3b6024
194ca1f
94672e4
29f4acc
1fb717e
2340925
d226986
f9a7ed2
9f04b42
b5e4b01
22151d0
820d2b8
61aa0df
277a2c8
8827fae
48c7b23
4f0e8d7
57ef4f1
c177c77
07582e1
8ff4790
dff9273
50cdf0a
d80f8ba
2030ac4
9c87e7e
96699c2
473e176
eb0498f
59289b6
352b540
42af816
b66e01c
6df1f09
5140bb0
96805f5
2ec3341
1c73a81
50a8999
20982f4
42a15a0
e1bf398
5ffdb8e
f821b61
c964f48
e247b90
ead3b82
77b2215
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -284,3 +284,20 @@ their own discovery and are unaffected. Forgejo has no Jira poll target. | |
| - Starvation beyond the top M stays documented and unmitigated: the filter | ||
| neither widens nor narrows the window, and the clearance bound above | ||
| applies only to candidates inside it. | ||
|
|
||
| ## Amendments | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [medium] architectural-conflict ADR 0160 is Accepted. The added Suggested fix: Move the changed decision into ADR 0085 or a new superseding ADR and reduce the ADR 0160 edit to a short cross-reference. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Resolved by the review agent: this is an older copy of a finding that a newer review thread also carries: #9878 (comment) The finding is still open. Follow up in the newer thread. Resolving this duplicate. Unresolve it if you disagree. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Resolved by the review agent: this is an older copy of a finding that a newer review thread also carries: #9878 (comment) The finding is still open. Follow up in the newer thread. Resolving this duplicate. Unresolve it if you disagree. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Resolved by the review agent: this is an older copy of a finding that a newer review thread also carries: #9878 (comment) The finding is still open. Follow up in the newer thread. Resolving this duplicate. Unresolve it if you disagree. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Resolved by the review agent: this is an older copy of a finding that a newer review thread also carries: #9878 (comment) The finding is still open. Follow up in the newer thread. Resolving this duplicate. Unresolve it if you disagree. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [medium] architectural-conflict ADR 0160 on main has status Accepted and was already partially superseded by ADR 0085. This PR appends an "Amendments" section that revises Decision item 1 (how an unparseable checkpoint is handled) inside the accepted ADR. docs/contributing/adrs.md treats an Accepted ADR as a point-in-time record and asks for a new superseding ADR when circumstances change. The section is appended and leaves the Decision text alone, so this is borderline and advisory. Suggested fix: Record the revision in a superseding ADR (or in ADR 0085) instead of amending ADR 0160, or reduce the amendment to a short note that links to the newer decision. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Resolved by the review agent: this is an older copy of a finding that a newer review thread also carries: #9878 (comment) The finding is still open. Follow up in the newer thread. Resolving this duplicate. Unresolve it if you disagree. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Resolved by the review agent: this is an older copy of a finding that a newer review thread also carries: #9878 (comment) The finding is still open. Follow up in the newer thread. Resolving this duplicate. Unresolve it if you disagree. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Resolved by the review agent: this is an older copy of a finding that a newer review thread also carries: #9878 (comment) The finding is still open. Follow up in the newer thread. Resolving this duplicate. Unresolve it if you disagree. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [low] architectural-conflict The diff appends a dated There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Resolved by the review agent: this is an older copy of a finding that a newer review thread also carries: #9878 (comment) The finding is still open. Follow up in the newer thread. Resolving this duplicate. Unresolve it if you disagree. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Resolved by the review agent: this is an older copy of a finding that a newer review thread also carries: #9878 (comment) The finding is still open. Follow up in the newer thread. Resolving this duplicate. Unresolve it if you disagree. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [low] architectural-conflict ADR 0160 is already Accepted on main. The PR adds an Amendments section that changes how Decision item 1 treats a non-timestamp checkpoint. docs/contributing/adrs.md treats Accepted ADRs as point-in-time records, says changed circumstances call for a superseding ADR, and asks that edits to an accepted ADR be called out in the PR description. The description does not mention ADR 0160. Suggested fix: Record the change in a new ADR that supersedes or refines 0160 and leave a short cross-reference in 0160. Or keep the amendment as a minor annotation and call out the edit in the PR description. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Resolved by the review agent: this is an older copy of a finding that a newer review thread also carries: #9878 (comment) The finding is still open. Follow up in the newer thread. Resolving this duplicate. Unresolve it if you disagree. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [low] architectural-conflict ADR 0160 still records as a consequence that starvation beyond the top M stays documented and unmitigated. This change removes M and searches the whole 24-hour window with no row limit (ADR 0085 Decision item 2), so the stated consequence no longer matches the active design. The new amendment section does not mention it. |
||
|
|
||
| ### 2026-11-25: A checkpoint that is not a timestamp is treated as unset (#9766) | ||
|
|
||
| Decision item 1 sends a checkpoint that cannot be parsed to processing, | ||
| where "the existing per-issue error path reports it as today". That path | ||
| fails the issue on every pick and never saves a new checkpoint, so the | ||
| issue is never processed again, and when it is the only active candidate | ||
| every quiet cycle ends in the all-failed error. The driver now treats a | ||
| stored value that is not a timestamp as unset, as it already treats one | ||
| dated in the future: the issue stays active, gets one first-poll look | ||
| bounded by the backfill window, and that look saves a valid checkpoint. | ||
| Processing logs a WARNING naming the issue without the stored value, and | ||
| the filter's one line per cycle names such candidates. A failed read is | ||
| still an error. Replay stays bounded by one backfill window, the same as | ||
| deleting or forward-dating the checkpoint today. | ||
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -98,8 +98,9 @@ const DefaultJiraAPIURL = "https://api.atlassian.com" | |
|
|
||
| // DefaultJiraPollQuery is the JQL predicate the Jira poller uses when | ||
| // tracker.jira.poll.query is unset. It is always scoped to the configured | ||
| // project (see JiraTrackingConfig.PollJQL). | ||
| const DefaultJiraPollQuery = "statusCategory != Done ORDER BY updated DESC" | ||
| // project (see JiraTrackingConfig.PollJQL). It carries no ORDER BY, so the | ||
| // poller serves the oldest change first (ADR 0085, Decision item 2). | ||
| const DefaultJiraPollQuery = "statusCategory != Done" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [low] breaking-config The exported constant config.DefaultJiraPollQuery is now Suggested fix: Keep the breaking There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Resolved by the review agent: this is an older copy of a finding that a newer review thread also carries: #9878 (comment) The finding is still open. Follow up in the newer thread. Resolving this duplicate. Unresolve it if you disagree. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Resolved by the review agent: this is an older copy of a finding that a newer review thread also carries: #9878 (comment) The finding is still open. Follow up in the newer thread. Resolving this duplicate. Unresolve it if you disagree. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Resolved by the review agent: this is an older copy of a finding that a newer review thread also carries: #9878 (comment) The finding is still open. Follow up in the newer thread. Resolving this duplicate. Unresolve it if you disagree. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Resolved by the review agent: this is an older copy of a finding that a newer review thread also carries: #9878 (comment) The finding is still open. Follow up in the newer thread. Resolving this duplicate. Unresolve it if you disagree. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [low] breaking-config The comment above DefaultJiraPollQuery documents the changed default query semantics (no ORDER BY, oldest change first). It is the same concern as the default-query finding at line 105 and stays open with it. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Resolved by the review agent: this is an older copy of a finding that a newer review thread also carries: #9878 (comment) The finding is still open. Follow up in the newer thread. Resolving this duplicate. Unresolve it if you disagree. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Resolved by the review agent: this is an older copy of a finding that a newer review thread also carries: #9878 (comment) The finding is still open. Follow up in the newer thread. Resolving this duplicate. Unresolve it if you disagree. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Resolved by the review agent: this is an older copy of a finding that a newer review thread also carries: #9878 (comment) The finding is still open. Follow up in the newer thread. Resolving this duplicate. Unresolve it if you disagree. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [low] breaking-config DefaultJiraPollQuery changed from There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Resolved by the review agent: this is an older copy of a finding that a newer review thread also carries: #9878 (comment) The finding is still open. Follow up in the newer thread. Resolving this duplicate. Unresolve it if you disagree. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Resolved by the review agent: this is an older copy of a finding that a newer review thread also carries: #9878 (comment) The finding is still open. Follow up in the newer thread. Resolving this duplicate. Unresolve it if you disagree. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [low] breaking-config The effective Jira poll query changes for existing deployments. DefaultJiraPollQuery loses its ORDER BY updated DESC. The poller now always appends AND updated >= "-24h" and adds ORDER BY updated ASC when the query has no ordering. A user query ordered updated DESC is still honoured but logs a WARNING, and older requests can go unserved once they leave the window. The ! marker and the Jira guide declare the change. Suggested fix: Optionally add an upgrade note for deployments with a custom poll.query or that relied on newest-first order. No code change is required. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Resolved by the review agent: this is an older copy of a finding that a newer review thread also carries: #9878 (comment) The finding is still open. Follow up in the newer thread. Resolving this duplicate. Unresolve it if you disagree. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [low] breaking-config DefaultJiraPollQuery is now Suggested fix: Call out the changed default in release notes / migration docs. |
||
|
|
||
| // JiraTrackingConfig holds Jira issue-tracking settings: the Jira site and | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [low] breaking-config DefaultJiraPollQuery changed from 'statusCategory != Done ORDER BY updated DESC' to 'statusCategory != Done'. Consumers relying on the default tracker.jira.poll.query now get a 24h-window search sorted oldest change first, and a custom query ending in 'ORDER BY updated DESC' logs a WARNING every cycle. The '!' marker and the docs cover this behavioural break. Suggested fix: Call out the default-query change in the release notes. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Resolved by the review agent: this is an older copy of a finding that a newer review thread also carries: #9878 (comment) The finding is still open. Follow up in the newer thread. Resolving this duplicate. Unresolve it if you disagree. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Resolved by the review agent: this is an older copy of a finding that a newer review thread also carries: #9878 (comment) The finding is still open. Follow up in the newer thread. Resolving this duplicate. Unresolve it if you disagree. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Resolved by the review agent: this is an older copy of a finding that a newer review thread also carries: #9878 (comment) The finding is still open. Follow up in the newer thread. Resolving this duplicate. Unresolve it if you disagree. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Resolved by the review agent: this is an older copy of a finding that a newer review thread also carries: #9878 (comment) The finding is still open. Follow up in the newer thread. Resolving this duplicate. Unresolve it if you disagree. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [low] breaking-config DefaultJiraPollQuery changed from Suggested fix: State the new default, the oldest-first ordering and the window clause applied to all poll queries, including explicit ones, in the release notes. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Resolved by the review agent: this is an older copy of a finding that a newer review thread also carries: #9878 (comment) The finding is still open. Follow up in the newer thread. Resolving this duplicate. Unresolve it if you disagree. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [low] breaking-config Default read order is now oldest change first, applied only when the query has no ORDER BY; a custom query with its own ORDER BY keeps that order, so ordering depends on whether the query carries one. Suggested fix: Document the ordering rule for |
||
| // project this repository is connected to, the cross-project issue | ||
|
|
@@ -239,7 +240,7 @@ func ScopeJQLToProject(project, query string) string { | |
| // keys and the predicate's parentheses (see ValidJiraProjectKey and | ||
| // JQLParensBalanced): this function only formats. | ||
| func ScopeJQLToProjects(projects []string, query string) string { | ||
| predicate, orderBy := splitJQLOrderBy(query) | ||
| predicate, orderBy := SplitJQLOrderBy(query) | ||
| predicate = strings.TrimSpace(predicate) | ||
| // Quote each key so a reserved-word key (AND, OR, IN) stays a value. | ||
| quoted := make([]string, len(projects)) | ||
|
|
@@ -261,9 +262,9 @@ func ScopeJQLToProjects(projects []string, query string) string { | |
| return scoped | ||
| } | ||
|
|
||
| // splitJQLOrderBy splits query at its last ORDER BY that is outside a | ||
| // SplitJQLOrderBy splits query at its last ORDER BY that is outside a | ||
| // quoted string, returning the predicate and the ORDER BY clause. | ||
| func splitJQLOrderBy(query string) (string, string) { | ||
| func SplitJQLOrderBy(query string) (string, string) { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [low] design-smell The PR body describes a new 'internal/jql' package (SplitOrderBy, QuotedRanges, InRanges, TestSplitOrderBy) and a 'go test ./internal/jql/' command. No internal/jql package exists in the PR head; the function is exported as config.SplitJQLOrderBy instead. The PR description is stale against the implementation. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Resolved by the review agent: this is an older copy of a finding that a newer review thread also carries: #9878 (comment) The finding is still open. Follow up in the newer thread. Resolving this duplicate. Unresolve it if you disagree. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Resolved by the review agent: this is an older copy of a finding that a newer review thread also carries: #9878 (comment) The finding is still open. Follow up in the newer thread. Resolving this duplicate. Unresolve it if you disagree. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Resolved by the review agent: this is an older copy of a finding that a newer review thread also carries: #9878 (comment) The finding is still open. Follow up in the newer thread. Resolving this duplicate. Unresolve it if you disagree. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Resolved by the review agent: this is an older copy of a finding that a newer review thread also carries: #9878 (comment) The finding is still open. Follow up in the newer thread. Resolving this duplicate. Unresolve it if you disagree. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Resolved by the review agent: this is an older copy of a finding that a newer review thread also carries: #9878 (comment) The finding is still open. Follow up in the newer thread. Resolving this duplicate. Unresolve it if you disagree. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [low] design-smell SplitJQLOrderBy, which holds JQL string handling, is now exported from the config package so that jirapoll can use it. This is a minor placement question. The function already lived in config as an unexported helper. |
||
| query = strings.TrimSpace(query) | ||
| quoted := quotedRanges(query) | ||
| matches := jqlOrderByRe.FindAllStringIndex(query, -1) | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[medium] architectural-conflict
ADR 0160 has status Accepted on main. This PR appends a '## Amendments' section ('2026-11-25: A checkpoint that is not a timestamp is treated as unset (#9766)') that changes the behaviour Decision item 1 prescribes. docs/contributing/adrs.md allows only minor annotations on accepted ADRs and asks that a changed decision go in a new or superseding ADR; it also requires the PR description to call out any edit to an accepted ADR, and the PR body does not mention ADR 0160. The amendment covers #9766, outside this PR's stated scope. Advisory: linked issue #9751 itself refers to planned amendments to ADR 0160, so a maintainer should decide whether this form is acceptable.
Suggested fix: Either record the decision in a superseding ADR (or ADR 0085) and keep only a short cross-reference note in ADR 0160, or call out the ADR 0160 edit in the PR description and get maintainer agreement for the amendment form.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolved by the review agent: this is an older copy of a finding that a newer review thread also carries: #9878 (comment)
The finding is still open. Follow up in the newer thread.
Resolving this duplicate. Unresolve it if you disagree.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolved by the review agent: this is an older copy of a finding that a newer review thread also carries: #9878 (comment)
The finding is still open. Follow up in the newer thread.
Resolving this duplicate. Unresolve it if you disagree.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolved by the review agent: this is an older copy of a finding that a newer review thread also carries: #9878 (comment)
The finding is still open. Follow up in the newer thread.
Resolving this duplicate. Unresolve it if you disagree.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolved by the review agent: this is an older copy of a finding that a newer review thread also carries: #9878 (comment)
The finding is still open. Follow up in the newer thread.
Resolving this duplicate. Unresolve it if you disagree.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolved by the review agent: this is an older copy of a finding that a newer review thread also carries: #9878 (comment)
The finding is still open. Follow up in the newer thread.
Resolving this duplicate. Unresolve it if you disagree.