Skip to content

feat(jirapoll)!: serve issues oldest first up to a per-cycle limit - #9898

Draft
guyoron1 wants to merge 147 commits into
fullsend-ai:mainfrom
guyoron1:feat/jirapoll-cycle-ceiling
Draft

guyoron1 wants to merge 147 commits into
fullsend-ai:mainfrom
guyoron1:feat/jirapoll-cycle-ceiling

Conversation

@guyoron1

@guyoron1 guyoron1 commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The jira-poll driver now serves every issue with new activity in the search's order, oldest change first by default, instead of picking five at random. A cycle stops when it holds tracker.jira.poll.max_dispatches_per_cycle dispatch records (default 100, from 1 to 250) and, on GitHub, before the issue whose records would take the matrix output past 768 KB. Implements the selection of ADR 0085 Decision item 3 and the max_dispatches_per_cycle key of item 4. It is the last card of the AISDLC-826 main path.

Draft because it is stacked on #9879 → #9878 → #9876 → #9855 → #9854 → #9853 → #9852. #9758 has merged, so the base is now main. Its own changes are the commits feat(jirapoll)!: serve issues oldest first up to a per-cycle limit, docs(jira-poll): drop two leftovers…, fix(jirapoll): read the per-cycle limit when the config has no tracker block, fix(jirapoll): validate tracker.jira when an explicit source replaces the translated one, fix(jirapoll): check only the per-cycle limit when an explicit source replaces the translated one, docs(jira-poll): quote the all-failed error as it now reads…, refactor(jirapoll): drop the count snapshot that per-issue counts replace and refactor(jirapoll): drop the loader's own check of the per-cycle limit; everything else in the diff belongs to the PRs below it. Jira: AISDLC-882.

Related Issue

Part of #9751

Changes

  • internal/jirapoll/poller.go: Run reads the active issues in order and stops at the record limit, at the size limit (GitHub target) or at a time limit. An issue's records are taken whole or not at all: an issue that does not fit in the room left waits for the next cycle, and the cycle does not skip ahead to a smaller one. An issue is always taken when the cycle holds no records, so an issue over the limit is dispatched alone. selectRandom and Options.N go; Options.MaxDispatchesPerCycle (default 100) is new.
  • pendingCheckpoint carries the issue's event counts, and Run adds them to the cycle's counts only for issues it takes, so an issue left for the next cycle does not count toward this cycle's all-dropped guard. This settles the point refactor(jirapoll): return an issue's records with its checkpoint as one unit #9854 left open, and it replaces the snapshot of the counts that feat(jirapoll): limit reading to 5 minutes per cycle and 2 per issue #9855 takes around each issue. The issue's unmatched requests are carried the same way, for the no-match warning that main added (fix(#9503)!: dispatch built-in agents from Jira without registration #9831), and the warning counts the issues served.
  • internal/jirapoll/limits.go: addedOutputSize keeps a running size of the batch; matrixOutputSize uses it.
  • internal/config/issue_targets.go: tracker.jira.poll.max_dispatches_per_cycle, with PollMaxDispatchesPerCycle(), the default and the bounds. ValidateConnection checks the bounds, so the write path and the poll run path both reject a bad value. A value that is not a whole number is rejected at parse time: yaml.v3 would otherwise decode 2.5 as 2.
  • internal/cli/poll.go: the setting reaches the poller options on both targets. The settings loader has the shape main gave it (feat(#9884): resolve entity-source config into a canonical model #9893, entity sources) and reads the limit from tracker.jira.poll. A config with no tracker block gets the default. The loader does not check the limit itself. It did for a while, because an explicit entity source could replace the scope translated from tracker.jira and that path skipped the block's validation. main now rejects tracker.jira combined with entity sources (feat(#9907)!: normalize legacy tracker to provider-named connections #9933), so the block is always validated and the loader gets the error from JiraDiscoveryScope. The last commit removes that check, with the ValidatePollLimits method it called.
  • Log and error text: poll complete reports issues served instead of selected; all N selected issues failed to process is now all N active issues failed to process; two new lines say why a cycle stopped and how many issues wait.
  • pkg/behaviourtest/steps: the two N: 50 overrides go.
  • Tests: TestRunServesActiveIssuesInSearchOrder, TestRunStopsAtTheRecordLimit, TestRunIssueThatDoesNotFitWaits, TestRunIssueOverTheLimitGoesAlone, TestRunStopsBeforeTheSizeLimit (GitHub and GitLab), TestJiraTracking_ValidatePollMaxDispatchesPerCycle, TestLoadJiraPollSettings_NoTrackerBlock, a limit too high row in TestLoadJiraPollSettings_InvalidConfig, and the settings and merge-and-clone tests cover the new key.
  • Docs: the Jira guide (sort order, Poll coordination, a "Per-cycle limit" paragraph, the security note, scaling and multi-repo text) and the config reference.

Notes for review:

  • ADR 0085 asks the implementation to show three things that this PR covers in unit tests: an issue larger than the configured limit is dispatched alone and does not hold back the issues behind it (TestRunIssueOverTheLimitGoesAlone); a cycle stopped by a limit leaves undispatched requests eligible for the next one (TestRunStopsAtTheRecordLimit, TestRunIssueThatDoesNotFitWaits); the batch stays within the size limit (TestRunStopsBeforeTheSizeLimit). The full-size check on GitHub itself is AISDLC-883 (ci(jira-poll): add a full-size batch check for the GitHub hand-off #9917).
  • The config reference says "New in fullsend v0.58.0". v0.57.1 is the latest release; the number must match the release this ships in.
  • An issue that does not fit has already been read, so its write check and listings are paid again next cycle. The record count is only known after the read.
  • Marked breaking: the random pick of five is gone and a cycle can now start up to 100 dispatches, or more for a single oversized issue.
  • main is merged in (3 December), now that feat(jirapoll): skip Jira poll candidates with no new activity #9758 has landed. One conflict, in internal/cli/poll_jira_config_test.go: Allow explicit default Jira connection to use existing polling credentials #9982 on main and this PR each added tests at the same place, and both are kept.
  • A config that declares connections.jira directly polls with the default limit. Allow explicit default Jira connection to use existing polling credentials #9982 allows such a config, without tracker. It has no tracker.jira.poll block, so it cannot set max_dispatches_per_cycle. The config reference says so.
  • 3 December: the "Per-cycle limit" paragraph this PR adds to the Jira guide is wrapped at about 80 columns, as docs/contributing/documentation.md asks. The text is unchanged.

Testing

  • make lint passes (stage changes first, then run)
  • Tests added/updated for new or modified logic
go test -race -count=2 ./internal/jirapoll/
go test -count=1 ./internal/config/ ./internal/cli/ ./internal/poll/ ./internal/scaffold/ ./internal/forge/jira/ ./pkg/behaviourtest/steps/ ./pkg/behaviourtest/drivers/jiramock/

All pass. Patch coverage on changed production lines: 78/78.

Checklist

  • PR title follows Conventional Commits (correct type, ! for breaking changes)
  • Commits are signed off (DCO) — human and human-directed agent sessions only
  • I wrote this contribution myself and can explain all changes in it

A lastCheck entity property that is not a timestamp made loadLastCheck
return an error, so processIssue failed the issue on every pick and
never saved a valid value. The activity filter keeps such an issue
active, so when it was the only active candidate every quiet cycle
ended in "all 1 selected issues failed to process".

Treat a value that is not a JSON string holding an RFC 3339 timestamp
as unset, as a future value already is. The issue gets one first-poll
look bounded by the backfill window, which saves a valid lastCheck.
Processing logs a WARNING naming the issue without the stored value,
and the filter's per-cycle line names such candidates. A failed read
is still an error.

Amend ADR 0160 Decision item 1, which said the per-issue error path
reports such a value, and update the Jira guide's security note.

Fixes fullsend-ai#9766

Signed-off-by: guy oron <goron@redhat.com>
Implements ADR 0085 Decision item 1. The managed GitHub workflow and
the managed GitLab schedule run one poll cycle at a time per
repository, so the lock never coordinated anything there.

- The driver neither reads nor writes the lock property and ignores
  locks left by earlier versions. filterLocked becomes filterActive,
  the activity filter alone. attemptLock, releaseLock, readLock,
  isLockStale, LockValue, Options.StaleThreshold and the jitter
  sleep go.
- Before reading an issue's comments and history, processIssue
  writes a writeCheck entity property to confirm the credential can
  write, as the lock write did. An issue that fails yields no records
  and the driver warns and goes on; a cycle in which every selected
  issue fails ends in the existing all-failed error. Idle candidates
  still cost no write.
- The "poll complete" line drops its unlocked count.
- The Jira guide, architecture overview and custom poller example
  describe the one-cycle-per-repository rule; the example gains a
  concurrency group.

BREAKING CHANGE: the jira-poll driver no longer locks issues. A
scheduler other than the managed GitHub workflow or GitLab schedule
must keep two poll cycles for one repository from overlapping, for
example with a GitHub Actions concurrency group; overlapping cycles
dispatch the same requests twice. Lock properties left by earlier
versions are ignored and can be deleted.

Signed-off-by: guy oron <goron@redhat.com>
…one unit

processIssue appended its dispatch records straight to the cycle's
list, and Run sliced them back out by index to pair them with the
issue's checkpoint. processIssue now returns a pendingCheckpoint that
holds both, and Run adds the records and the checkpoint to the cycle
together.

No behaviour changes. The per-cycle and per-issue limits of ADR 0085
Decision item 3 need this: an issue that does not fit in the room left
must be left out whole, records and checkpoint, for the next cycle.

Signed-off-by: guy oron <goron@redhat.com>
Implements the time limits of ADR 0085 Decision item 3.

- Run reads under a context that ends CycleTimeLimit (5m) after the
  cycle starts: the auth preflight, the search, the activity filter and
  the selected issues. Each issue is read under its own IssueTimeLimit
  (2m) context. Dispatching and committing checkpoints keep the caller's
  context, so they get the rest of the job's time.
- An issue over its limit is a failed read: a WARNING names it, none of
  its records are taken and its lastCheck stays, and the next issue is
  read. When the cycle limit is reached the issue being read and those
  not reached wait for the next cycle, and the cycle dispatches and
  commits what it finished and exits normally.
- A cycle that serves none of its selected issues fails: the existing
  "all N selected issues failed to process" error, or a new one when
  the cycle limit ended reading first.
- The Jira guide describes the limits.

Signed-off-by: guy oron <goron@redhat.com>
Implements the checkpoint clause of ADR 0085 Decision item 2. The
activity filter read every candidate's lastCheck property with its own
call; the search now returns it with each row, so the filter makes no
call of its own. Processing still reads lastCheck from the issue.

- jira.LiveClient.SearchIssues takes the names of entity properties to
  return (the search/jql "properties" parameter) and decodes them into
  the new Issue.Properties.
- searchCandidates asks for the target's lastCheck key. hasNewActivity
  parses the row's value with the new parseLastCheck, split out of
  loadLastCheck, and fails open as before: a row without the property,
  or with one that does not parse, is active. filterActive and
  hasNewActivity drop their context argument.
- jiramock's search returns the requested properties an issue has, as
  Jira does.
- The Jira guide and the behaviour-testing guide describe the change.

Signed-off-by: guy oron <goron@redhat.com>
Implements the pool of ADR 0085 Decision item 2, except the
backfill_window_hours setting.

- searchCandidates limits the configured query to the issues whose
  updated value falls within the backfill window, as
  (<query>) AND updated >= "-24h", and reads every row: Options.M and
  its 50-row limit go.
- A query with no ORDER BY is sorted oldest change first
  (ORDER BY updated ASC). A query's own ORDER BY is kept, and
  ORDER BY updated DESC logs a WARNING once per cycle recommending
  oldest change first. The default query no longer carries a sort
  clause.
- jira.SearchIssues returns ErrSearchTruncated with the issues it read
  when results remain after its 200-page cap (10,000 issues); the
  poller logs a WARNING and serves those rows, so a pool larger than
  the cap is not cut short silently.
- The ORDER BY splitter moves from internal/config to the new
  internal/jql package so the poller can use it.
- The Jira guide, the config reference and the custom poller example
  describe the window and the order, and their example queries drop
  the newest-first sort clause.

BREAKING CHANGE: the default tracker.jira.poll.query is now
"statusCategory != Done" with no ORDER BY, the poller reads issues
oldest change first unless the query has its own ORDER BY, and it
searches only issues updated within the last 24 hours, with no 50-row
limit. A query that ends in ORDER BY updated DESC still works and logs
a WARNING every cycle; remove the clause to get the recommended order.

Signed-off-by: guy oron <goron@redhat.com>
Review follow-up for the unparseable lastCheck fix.

- TestRunGarbageLastCheckTreatedAsUnset runs a full cycle for each way
  a stored value can fail: a string that is not a time, JSON that is
  not a string, and bytes that are not JSON. The first only reaches the
  time.Parse branch; the other two reach the json.Unmarshal branch.
- It asserts the saved lastCheck equals the issue's updated value
  instead of only being set.
- TestRunAllSelectedIssuesFailedFailsCycle restores coverage of Run's
  all-failed guard, which the replaced test was the only one to reach.

Signed-off-by: guy oron <goron@redhat.com>
Review follow-up for the lock removal.

- A denied issue keeps its lastCheck unset, so its request is retried;
  the served issue's lastCheck is committed.
- The write-check property holds an RFC 3339 time, and a served issue
  costs two property writes: the check and the lastCheck.
- TestRenderJiraPollCaller asserts the managed poll job's concurrency
  group and cancel-in-progress: false. With no per-issue lock, that
  group is what keeps two cycles from overlapping.
- The two filter tests are renamed from FilterLocked to FilterActive,
  and the mock's counter comment no longer refers to a lock.

Signed-off-by: guy oron <goron@redhat.com>
…heck

Review follow-up for the lock removal.

- Restore docs/architecture.md. main already describes the lock
  removal there (ADR 0085), and the edit here conflicted with it.
- The Jira guide says the write-check property stays on the issue and
  why it is not deleted, and that the poll job's concurrency group
  covers one workflow file, so a repository must not be polled from a
  second workflow. The custom poller example says the same.
- Three code comments no longer mention a Jira lock.

Signed-off-by: guy oron <goron@redhat.com>
…-records-unit

Signed-off-by: guy oron <goron@redhat.com>
…l-time-limits

Signed-off-by: guy oron <goron@redhat.com>
…ed out

Review follow-up for the cycle and per-issue time limits.

- When the caller's context ends, Run returns "poll cycle interrupted"
  with that error. It used to log that the cycle time limit was reached
  and return a time-limit error, because a cancelled read context looks
  the same as an expired one.
- The error for a cycle that the time limit ended with no issue served
  now reads "... reached with none of the N selected issues served
  (M tried)".
- The Jira guide no longer says a cycle can run long while reading
  under sustained Jira errors: retry waits count against the limits.

Signed-off-by: guy oron <goron@redhat.com>
…eckpoint

Signed-off-by: guy oron <goron@redhat.com>

# Conflicts:
#	internal/jirapoll/poller_idle_test.go
Review follow-up for taking lastCheck from the search results.

- The mock's search answered 400 to a body it could not decode. It
  ignored the body before, so it now treats such a body as naming no
  properties.
- The multi-repo section of the Jira guide no longer says each poller
  reads an entity property per candidate; the search returns it.

Signed-off-by: guy oron <goron@redhat.com>
…dow-oldest-first

Signed-off-by: guy oron <goron@redhat.com>
…n outage

Review follow-up for the window search.

The search returns only issues that changed within the backfill
window. An issue whose last change is older than the window is no
longer listed, so:

- it is not checkpointed on first enable, and
- activity on it that fell out of the window during an outage leaves
  no "predates the backfill window" line in the log.

The Jira guide's first-enable bullet, its resume-after-a-gap bullet and
its troubleshooting row said otherwise.

Signed-off-by: guy oron <goron@redhat.com>
Implements the per-issue limits of ADR 0085 Decision item 3.

- One issue contributes at most 250 dispatch records per cycle on both
  targets and, on the GitHub target, 768 KB of the poll job's matrix
  output. Over a limit the driver keeps the oldest records, by the time
  of the event that produced them, drops the rest with a WARNING that
  names the issue, and still advances the checkpoint. Records within
  the limits keep their order.
- matrixOutputSize measures records as the managed workflow emits them,
  compact JSON inside {"include":[...]}, at two bytes per UTF-16 code
  unit, which is how GitHub approximates job output size. Go's escaped
  <, > and & count at their escaped length, so the measure can be above
  what GitHub sees and is never below.
- The cap of 100 events per issue is unchanged.
- The Jira guide describes the limits.

Signed-off-by: guy oron <goron@redhat.com>
The per-issue size limit drops a single record that is over the limit,
since dispatching it would lose the whole batch. The limit tests did
not cover that case.

Signed-off-by: guy oron <goron@redhat.com>
…remove-lock

Signed-off-by: guy oron <goron@redhat.com>

# Conflicts:
#	docs/guides/user/jira-integration.md
…-records-unit

Signed-off-by: guy oron <goron@redhat.com>
…l-time-limits

Signed-off-by: guy oron <goron@redhat.com>

# Conflicts:
#	docs/guides/user/jira-integration.md
Review follow-up for the cycle and per-issue time limits. ADR 0085
Decision item 3 says that at the cycle limit the driver stops reading
and exits normally, and that a cycle ends in an error when every issue
it tried failed or timed out. Two cases did not follow it:

- A search that ran into the cycle limit failed the run. It now logs a
  WARNING, reads no issue and exits normally.
- An issue the cycle limit cut off counted as a failure, so a cycle
  that finished no issue always failed. It now waits for the next cycle
  without counting, and the cycle fails only when at least one issue
  failed or took longer than the per-issue limit and none was served.

The Jira guide describes both.

Signed-off-by: guy oron <goron@redhat.com>
…eckpoint

Signed-off-by: guy oron <goron@redhat.com>

# Conflicts:
#	docs/guides/user/jira-integration.md
With the unparseable-lastCheck fix merged in, a stored value that is
not a timestamp is treated as unset instead of returning an error, so
parseLastCheck has no error left to return. Drop the return value and
the branch in hasNewActivity that checked it.

Signed-off-by: guy oron <goron@redhat.com>
…dow-oldest-first

Signed-off-by: guy oron <goron@redhat.com>

# Conflicts:
#	docs/guides/user/jira-integration.md
…ssue-record-limits

Signed-off-by: guy oron <goron@redhat.com>

# Conflicts:
#	docs/guides/user/jira-integration.md
…drop some

capIssueRecords sorted the records by event time when a limit was
exceeded, so the kept records came out oldest first on overflow and in
production order otherwise. It now ranks the records by event time
without moving them, keeps the oldest that fit, and returns the kept
ones in the order they were produced. The limits only ever drop the
newest records; they never reorder.

Signed-off-by: guy oron <goron@redhat.com>
…aragraph

The sort-order paragraph added for the window search ended with the
sentence about an omitted poll.query and poll.enabled. Move it back to
the end of the paragraph that describes the query.

Signed-off-by: guy oron <goron@redhat.com>
…ssue-record-limits

Signed-off-by: guy oron <goron@redhat.com>
Implements the selection of ADR 0085 Decision item 3 and the
max_dispatches_per_cycle key of item 4.

- Run reads the active issues in the search's order, oldest change
  first by default, instead of picking five at random. It stops when
  the cycle holds tracker.jira.poll.max_dispatches_per_cycle dispatch
  records (default 100, from 1 to 250) and, on the GitHub target, before
  the issue whose records would take the matrix output past 768 KB.
- All of an issue's records go out in the same cycle. An issue that does
  not fit in the room left waits for the next cycle, and the cycle does
  not skip ahead to a smaller one. An issue is always taken when the
  cycle holds no records, so an issue over the limit is dispatched
  alone.
- processIssue returns its event counts with the issue, and Run counts
  them only for issues it takes, so an issue left for the next cycle
  does not count toward this cycle's all-dropped guard.
- tracker.jira.poll.max_dispatches_per_cycle is validated wherever the
  Jira connection is: a whole number from 1 to 250. A value that is not
  a whole number is rejected at parse time, because yaml.v3 would round
  it down.
- Options.N and selectRandom go. The "poll complete" line reports
  issues served instead of selected, and the all-failed error says
  "active" instead of "selected".
- The Jira guide and the config reference describe the order, the
  limit and the new key.

BREAKING CHANGE: the jira-poll driver no longer picks five issues at
random each cycle. It serves every issue with new activity in the
query's order, oldest change first by default, until the cycle holds
100 dispatch records. Set tracker.jira.poll.max_dispatches_per_cycle
(1 to 250) to change that, after upgrading: an older fullsend rejects a
config that sets the key.

Signed-off-by: guy oron <goron@redhat.com>
@fullsend-ai-review

fullsend-ai-review Bot commented Dec 2, 2026 •

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 11:06 PM UTC · Completed 11:20 PM UTC

Commit: 8d4ed37 · View workflow run →

Runtime: pi · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $3.12

@fullsend-ai-review

Copy link
Copy Markdown

Risk Assessment: moderate (2/5)

Details

While this breaking change modifies high-churn Jira polling core logic without a rollback flag, zero protected or dependency paths are touched, test coverage is solid (0.44 ratio), and the implementation closely matches the linked issue scope.

@fullsend-ai-review

fullsend-ai-review Bot commented Dec 2, 2026 •

Copy link
Copy Markdown

Review

Findings

Low

  • [architectural-conflict] docs/ADRs/0160-spend-jira-poll-slots-only-on-candidates-with-new-activity.md:288 — This PR adds a ## Amendments section to ADR 0160, which is Accepted on main. It changes what Decision item 1 does: an unparseable lastCheck is now treated as unset instead of going to the per-issue error path. docs/contributing/adrs.md limits post-acceptance edits to minor annotations and says to write a superseding ADR when circumstances change. Mitigating: ADRs 0038 and 0070 already carry ## Amendments sections, so this follows existing practice.
    Remediation: Either move the behaviour into a new ADR that supersedes or relates to Decision item 1, or keep the amendment and call out the edit to an accepted ADR in the PR description, as docs/contributing/adrs.md requires.

Earlier findings

  • docs/ADRs/0160-spend-jira-poll-slots-only-on-candidates-with-new-activity.md:290, scope-bundling — reclassified (info); the stacked-PR amendment commit is authorized under Jira poller: fresh requests wait behind handled tickets and can be missed under load #9751.
  • internal/jirapoll/types.go:69, breaking-api — reclassified (info); the package is internal, the only in-repo caller is updated, and the PR title carries !.
  • internal/forge/jira/types.go, breaking-api — reclassified (info); internal package, no external importers.
  • internal/jirapoll/poller.go, backward-incompatible — reclassified (info); the behaviour change is documented and the PR is marked breaking.

4 finding(s) below the low severity threshold were not posted.

fullsend-ai-review[bot]

This comment was marked as outdated.

@fullsend-ai-review
fullsend-ai-review Bot dismissed their stale review December 2, 2026 23:20

Superseded by updated review

@fullsend-ai-review

Copy link
Copy Markdown

Finding threads left open (4):

  1. Thread: the explanation was posted in this older copy of a finding thread, but it could not be resolved. Reason: FORBIDDEN: Resource not accessible by integration. Next step: resolve it manually.
  2. Thread: the explanation was posted in this older copy of a finding thread, but it could not be resolved. Reason: FORBIDDEN: Resource not accessible by integration. Next step: resolve it manually.
  3. Thread: the explanation was posted in this older copy of a finding thread, but it could not be resolved. Reason: FORBIDDEN: Resource not accessible by integration. Next step: resolve it manually.
  4. Thread: the explanation was posted in this older copy of a finding thread, but it could not be resolved. Reason: FORBIDDEN: Resource not accessible by integration. Next step: resolve it manually.

@codecov

codecov Bot commented Dec 2, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 99.01478% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
internal/jirapoll/poller.go 98.30% 1 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

…ble-lastcheck

Signed-off-by: guy oron <goron@redhat.com>
…remove-lock

Signed-off-by: guy oron <goron@redhat.com>
…-records-unit

Signed-off-by: guy oron <goron@redhat.com>
Every unparseable row of the filter's decision table had updated one
hour ago, inside the backfill window, where "treated as unset" and
"floored to the window start" give the same answer. The new row has
updated three days ago: unset keeps the issue active, while a floor
would drop it and leave the bad value stored.

Signed-off-by: guy oron <goron@redhat.com>
…remove-lock

Signed-off-by: guy oron <goron@redhat.com>
With the lock gone the driver deletes no entity property, so
DeleteEntityProperty leaves the JiraClient interface and the test mock.
A delete now fails to compile, which replaces the mock's delete counter.

TestRunIgnoresLegacyLock also fails if the legacy lock is read: until
now a filter that read it and skipped the issue on a read error passed.

Signed-off-by: guy oron <goron@redhat.com>
The jira-poll driver keeps no per-issue lock, so on GitLab the poll
job's resource group is what keeps two cycles apart. Nothing failed if
the template lost it.

Signed-off-by: guy oron <goron@redhat.com>
docs/architecture.md called the lock's removal a target state, and the
normalized-entity spec listed an operational lock among the properties
Fullsend keeps on an issue. The driver now writes a write-check
property instead.

Signed-off-by: guy oron <goron@redhat.com>
…-records-unit

Signed-off-by: guy oron <goron@redhat.com>
…l-time-limits

Signed-off-by: guy oron <goron@redhat.com>
…eckpoint

Signed-off-by: guy oron <goron@redhat.com>
…dow-oldest-first

Signed-off-by: guy oron <goron@redhat.com>
…ssue-record-limits

Signed-off-by: guy oron <goron@redhat.com>
…ycle-ceiling

Signed-off-by: guy oron <goron@redhat.com>
@fullsend-ai-review

fullsend-ai-review Bot commented Dec 3, 2026 •

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 2:23 PM UTC · Completed 2:39 PM UTC

Commit: 4263bda · View workflow run →

Runtime: pi · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $2.92

@fullsend-ai-review

Copy link
Copy Markdown

Risk Assessment: moderate (2/5)

Details

While this breaking change modifies high-churn Jira polling core logic without a rollback flag, zero protected or dependency paths are touched, test coverage is solid (0.43 ratio), and the implementation closely matches the linked issue scope.

@fullsend-ai-review

fullsend-ai-review Bot commented Dec 3, 2026 •

Copy link
Copy Markdown

Review

Findings

Low

  • [architectural-conflict] docs/ADRs/0160-spend-jira-poll-slots-only-on-candidates-with-new-activity.md:288 — ADR 0160 is Accepted on main. This PR appends a ## Amendments section that records a new behavioral decision (an unparseable checkpoint is treated as unset instead of going down the per-issue error path). docs/contributing/adrs.md says to write a new ADR that supersedes an old one when circumstances change, and allows only minor annotations in an accepted ADR. The guide does not explicitly ban an Amendments section, and accepted ADRs 0038 and 0070 already have one, so this is a borderline policy question rather than a clear violation. This section is unchanged since the prior review.
    Remediation: Optionally move the decision into ADR 0085 or a short follow-up ADR and leave a one-line cross-reference in ADR 0160. Either way, call out the edit to an accepted ADR in the PR description.

Info

  • [scope-bundling] docs/ADRs/0160-spend-jira-poll-slots-only-on-candidates-with-new-activity.md:290 — The ADR amendment sits alongside the poller work. It serves the same Jira poller issue, so this is same-domain bundling. Unchanged since the prior review.
  • [breaking-api] internal/jirapoll/types.go:69 — Exported poller surface changed (Options.N removed, Options.MaxDispatchesPerCycle added). The package is under internal/, so no other repository can import it. The latest push also drops DeleteEntityProperty from the JiraClient interface, which only narrows what the poller requires.
  • [breaking-api] internal/forge/jira/types.go — Internal Jira client type change. The package is under internal/ and no external consumer is affected.
  • [backward-incompatible] internal/jirapoll/poller.go — A cycle no longer picks five issues at random; it serves every active issue oldest-first up to the per-cycle limit (default 100). The title already carries the ! marker for this.

Earlier findings

  • docs/normative/entity-execution-cli/v1/README.md:98, stale-doc — resolved earlier; not reported again.

4 finding(s) below the low severity threshold were not posted.

neither widens nor narrows the window, and the clearance bound above
applies only to candidates inside it.

## Amendments

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[low] architectural-conflict

ADR 0160 is Accepted on main. This PR appends an Amendments section that records a new behavioral decision (an unparseable checkpoint is treated as unset). docs/contributing/adrs.md says to write a new ADR that supersedes an old one, allowing only minor annotations. It does not explicitly ban Amendments sections and accepted ADRs 0038 and 0070 already have one, so this is borderline.

Suggested fix: Optionally move the decision into ADR 0085 or a short follow-up ADR and leave a one-line cross-reference in ADR 0160; call out the edit to an accepted ADR in the PR description.

@fullsend-ai-review
fullsend-ai-review Bot dismissed their stale review December 3, 2026 14:38

Superseded by updated review

@fullsend-ai-review

Copy link
Copy Markdown

Finding threads left open (5):

  1. Thread: the explanation was posted in this older copy of a finding thread, but it could not be resolved. Reason: FORBIDDEN: Resource not accessible by integration. Next step: resolve it manually.
  2. Thread: the explanation was posted in this older copy of a finding thread, but it could not be resolved. Reason: FORBIDDEN: Resource not accessible by integration. Next step: resolve it manually.
  3. Thread: the explanation was posted in this older copy of a finding thread, but it could not be resolved. Reason: FORBIDDEN: Resource not accessible by integration. Next step: resolve it manually.
  4. Thread: the explanation was posted in this older copy of a finding thread, but it could not be resolved. Reason: FORBIDDEN: Resource not accessible by integration. Next step: resolve it manually.
  5. Thread: the explanation was posted in this older copy of a finding thread, but it could not be resolved. Reason: FORBIDDEN: Resource not accessible by integration. Next step: resolve it manually.

This branch was successfully deployed

1 active deployment
site-preview — 4263bda6 Deployed Dec 3, 2026 by github-actions[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

go Pull requests that update go code requires-manual-review Review requires human judgment risk/moderate PR risk: moderate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants