Repository navigation
fix(#9503)!: dispatch built-in agents from Jira without registration - #9831
Conversation
|
🤖 Finished Review · ✅ Success · Started 12:31 PM UTC · Completed 12:44 PM UTC Commit: Runtime: pi · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $3.25 |
Site previewPreview: https://4977c97d-site.fullsend-ai.workers.dev Commit: |
|
Risk Assessment: moderate (2/5) DetailsModerate risk: elevated historical churn, multi-author contention, and large change size are balanced by high test coverage (50%), bot authorship, opt-out rollback safety, and full alignment with linked issue #9503 acceptance criteria. Previous runRisk Assessment: moderate (2/5) DetailsModerate risk: elevated historical churn and multi-author contention in core CLI files are balanced by strong test file coverage (50%), zero protected or security-sensitive paths modified, and full alignment with linked issue #9503 acceptance criteria. Previous run (2)Risk Assessment: moderate (2/5) DetailsModerate risk: elevated historical churn and multi-author contention across touched CLI files are counterbalanced by strong test coverage (50%), zero protected or security-sensitive paths modified, opt-out rollback safety, and full alignment with issue #9503 acceptance criteria. Previous run (3)Risk Assessment: moderate (2/5) DetailsModerate risk: elevated historical churn and multi-author contention across touched CLI files are counterbalanced by strong test coverage (50%), zero protected or security-sensitive paths modified, opt-out rollback safety, and full alignment with issue #9503 acceptance criteria. Previous run (4)Risk Assessment: moderate (2/5) DetailsModerate risk: elevated historical churn and multi-author contention across touched CLI files are counterbalanced by strong test coverage (50%), zero protected or security-sensitive paths modified, opt-out rollback safety, and full alignment with issue #9503 acceptance criteria. Previous run (5)Risk Assessment: moderate (2/5) DetailsModerate risk: elevated historical churn and multi-author contention across touched CLI files are counterbalanced by strong test coverage (50%), zero protected or security-sensitive paths modified, opt-out rollback safety, and full alignment with issue #9503 acceptance criteria. Previous run (6)Risk Assessment: moderate (2/5) DetailsModerate risk: elevated historical churn and multi-author contention across touched CLI files are counterbalanced by strong test coverage (50%), zero protected or security-sensitive paths modified, opt-out rollback safety, and full alignment with issue #9503 acceptance criteria. Previous run (7)Risk Assessment: moderate (2/5) DetailsModerate risk: elevated historical churn and multi-author contention across touched CLI files are counterbalanced by strong test coverage (48%), zero protected or security-sensitive paths modified, opt-out rollback safety, and full alignment with issue #9503 acceptance criteria. Previous run (8)Risk Assessment: moderate (2/5) DetailsModerate risk: elevated historical churn and multi-author contention in core CLI files are balanced by strong test file coverage (50%), zero protected or security-sensitive paths modified, and full alignment with linked issue #9503 acceptance criteria. Previous run (9)Risk Assessment: moderate (2/5) DetailsModerate risk: elevated historical churn and multi-author contention in core CLI files are balanced by strong test file coverage (47%), zero protected or security-sensitive paths modified, and full alignment with linked issue #9503 acceptance criteria. Previous run (10)Risk Assessment: moderate (2/5) DetailsModerate risk: elevated historical churn and multi-author contention in core CLI files are balanced by strong test file coverage (44%), zero protected or security-sensitive paths modified, and full alignment with linked issue #9503 acceptance criteria. Previous run (11)Risk Assessment: moderate (2/5) DetailsModerate risk: elevated historical churn and multi-author contention in core CLI files are balanced by strong test file coverage (41%), zero protected or security-sensitive paths modified, and full alignment with linked issue #9503 acceptance criteria. Previous run (12)Risk Assessment: moderate (2/5) DetailsModerate risk: elevated historical churn and multi-author contention in core CLI files are balanced by strong test file coverage (44%), zero protected or security-sensitive paths modified, and full alignment with linked issue #9503 acceptance criteria. Previous run (13)Risk Assessment: moderate (2/5) DetailsModerate risk: elevated historical churn and multi-author contention in core CLI files are balanced by strong test file coverage (43%), zero protected or security-sensitive paths modified, and full alignment with linked issue #9503 acceptance criteria. Previous run (14)Risk Assessment: moderate (2/5) DetailsModerate risk: elevated historical churn and multi-author contention in core CLI files are balanced by strong test file coverage (43%), zero protected or security-sensitive paths modified, and full alignment with linked issue #9503 acceptance criteria. Previous run (15)Risk Assessment: moderate (2/5) DetailsModerate risk: while touching high-churn core CLI files with elevated historical churn, the PR has high test coverage, modifies no protected or security-sensitive paths, and precisely addresses the linked issue acceptance criteria. |
ReviewFindingsMedium
Low
Earlier findings
Previous run<!-- fullsend:review-diff-hash:7d40ff5a28b1f437604b1db02acc144e7732c02526e766ac42eb9af19390da64 --> ReviewFindingsLow
Info
16 finding(s) below the |
|
🤖 Finished Fix · ✅ Success · Started 12:46 PM UTC · Completed 1:02 PM UTC Commit: Runtime: claude · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $0.56 |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Address review feedback on PR #9831. - ListEffectiveTriggeredHarnesses now returns an error when any agent fails to resolve or load, so the Jira poller no longer advances checkpoints past events only the unavailable agent could match. - Sanitize dynamic strings in the no-match warning annotation. - Rename the newJiraBuiltinResolver test seam to newJiraBuiltinResolverFn. - Document the new failure mode in the Jira guide. Note: pre-commit could not fetch hook repositories (certificate failure); go fmt, go vet and whitespace checks were run directly. Unrelated pre-existing test failures in internal/cli (TestStartFetchService_*, TestPostScriptEnv_NoSchema*) also fail without this change. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
🔧 Fix agent — iteration 1 (bot-triggered)Fixed the high-severity event-loss finding (the Jira poll now fails if any agent cannot load), sanitized the no-match annotation, renamed the test seam, and proposed a new PR title. Two low-severity findings (Jira-scoped opt-out, release notes) were recorded as disagreements as out of scope. Fixed (4):
Disagreed (2):
Tests: passed CI inspections (1):
Conflict update: skipped; strategy Decision points
PR metadata: title updatedNext steps:
Updated by fullsend fix agent |
|
🤖 Finished Review · ✅ Success · Started 1:04 PM UTC · Completed 1:20 PM UTC Commit: Runtime: pi · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $3.42 |
|
🤖 Finished Fix · ✅ Success · Started 1:22 PM UTC · Completed 1:30 PM UTC Commit: Runtime: claude · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $0.36 |
strings.NewReplacer matches without overlap, so ::: became ': ::' and still contained '::'. Encode %, CR and LF with the replacer, then loop until no '::' remains. Add a test for runs of three or more colons. Note: pre-commit hooks were not run (pre-commit could not fetch hook repositories, TLS failure in the sandbox). gofmt, go vet and go test -race ./internal/jirapoll/ passed. Addresses review feedback on PR #9831 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
🔧 Fix agent — iteration 2 (bot-triggered)Fixed the incomplete double-colon neutralization in the no-match annotation sanitizer and added a regression test. Proposed a breaking-change PR title and body. Existing commit subjects are left for a human squash. Fixed (2):
Disagreed (1):
Tests: passed CI inspections (3):
Conflict update: skipped; strategy Decision points
PR metadata: title updated; body updatedNext steps:
Updated by fullsend fix agent |
|
🤖 Finished Review · ✅ Success · Started 1:32 PM UTC · Completed 1:43 PM UTC Commit: Runtime: pi · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $2.01 |
|
🤖 Finished Fix · ❌ Failure (post-script /home/runner/work/fullsend/fullsend/.fullsend/.fullsend-cache/resources/sha256/1abfdd0aad49204449cb7461d3a90fb40952ba407b6cf0f0ddf1a25aa3772100/scripts/post-fix.sh failed: exit status 1) · Started 3:08 PM UTC · Completed 3:19 PM UTC Commit: Runtime: claude · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $0.70 |
|
The fix agent completed, but the post-fix script failed before finishing.
Workflow run: https://github.com/fullsend-ai/fullsend/actions/runs/46446459295 Details: |
Give the GitHub Poll Jira step its read-only job token for built-in agent lookup. Document the operator-supplied GITHUB_TOKEN inherited by the GitLab poller, including anonymous lookup limits when it is absent. Exercise the shipped workflow and GitLab job commands with dummy credentials, and cover resolver token precedence and anonymous access. Signed-off-by: csoceanu <csoceanu@redhat.com>
|
/fs-review |
|
🤖 Finished Review · ✅ Success · Started 3:52 PM UTC · Completed 4:03 PM UTC Commit: Runtime: pi · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $2.89 |
|
Finding threads left open (6):
|
Resolve the CLI reference conflict by retaining built-in discovery and token guidance alongside the entity-source configuration details. Signed-off-by: csoceanu <csoceanu@redhat.com>
|
@jwm4 - thanks for the review! I’ve addressed the four points from your review in c125d9d:
I also merged the latest Could you please re-review? |
|
🤖 Finished Review · ✅ Success · Started 8:38 AM UTC · Completed 8:55 AM UTC Commit: Runtime: pi · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $3.62 |
|
Risk Assessment: moderate (2/5) DetailsModerate risk: elevated historical churn, multi-author contention, and large change size are balanced by high test coverage (50%), bot authorship, opt-out rollback safety, and full alignment with linked issue #9503 acceptance criteria. |
ReviewFindingsMedium
Low
Next steps:
|
|
Finding threads left open (5):
Outdated review threads left open (2):
|
jwm4
left a comment
There was a problem hiding this comment.
Thanks, the four points are addressed. I checked each at 5d88601:
- The
Poll Jirastep now getsGH_TOKEN: ${{ github.token }}, with permissions stillcontents: read. - The GitLab requirements in the Jira guide name the
GITHUB_TOKENCI/CD variable, the need to reach github.com, and what happens without a token. - Step 6 of the guide and the PR description now describe the anonymous fallback accurately.
TestJiraPollWorkflowBuiltinTokenandTestRunPollJobScript_JiraBuiltinTokenrun the shipped step and script, so a missing token binding fails a test.
This approval also covers the change to .github/workflows/reusable-poll-jira.yml that the review agent flagged as a protected path.
Before merging, I recommend addressing the custom-poller-example.md finding in the review agent's latest review. The sample workflow on that page has the same gap: its token is on the install step only, so the step that runs fullsend poll has none. Adding GH_TOKEN: ${{ github.token }} to that step's env: fixes it.
I verified the above by reading the code and tests. I have not run this revision against a live Jira.
Posted by Bill Murdock with assistance from Claude Code.
|
/fs-fix address the custom-poller-example.md finding in the #9831 (comment). The sample workflow on that page has the same gap: its token is on the install step only, so the step that runs fullsend poll has none. Adding GH_TOKEN: ${{ github.token }} to that step's env: fixes it. |
|
🤖 Finished Fix · ✅ Success · Started 2:15 PM UTC · Completed 2:20 PM UTC Commit: Runtime: claude · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $0.31 |
The sample workflow set GH_TOKEN only on the install step, so the step that runs fullsend poll resolved built-in agents anonymously. Add it to that step's env, matching reusable-poll-jira.yml. Addresses PR #9831 review. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
🔧 Fix agent — iteration 8 (human-triggered)Addressed the custom-poller-example.md finding as instructed by adding GH_TOKEN to the poll step's env. Other review findings were out of scope for this /fs-fix instruction and were left untouched. No forge-reported merge conflict. Fixed (1):
Tests: passed CI inspections (2):
Conflict update: skipped; strategy Finding threads:
Next steps:
Updated by fullsend fix agent |
|
🤖 Finished Review · ✅ Success · Started 2:23 PM UTC · Completed 2:39 PM UTC Commit: Runtime: pi · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $2.86 |
|
E2E validation passed for the Jira → GitLab CEE dispatch flow. Using Fullsend built from
This confirms the flow works end to end in the tested environment. |
|
Risk Assessment: moderate (2/5) DetailsModerate risk: elevated historical churn, multi-author contention, and large change size are balanced by high test coverage (48%), bot authorship, opt-out rollback safety, and full alignment with linked issue #9503 acceptance criteria. |
ReviewFindingsMedium
Low
Earlier findings
1 finding(s) below the |
|
Finding threads left open (6):
|
Summary
The Jira poller now dispatches the built-in agents that can run from Jira (triage and code) without any
agents:registration. A freshfullsend github setupinstall now dispatches/fs-triageand/fs-codefrom Jira. So does a config that only tunes a built-in agent, such as- name: triagewithruntime: claude. Built-ins are resolved the same wayfullsend runresolves them: from thefullsend-ai/agentsrelease tag that matches the CLI version, using the same GitHub token sources asfullsend run(GH_TOKEN,GITHUB_TOKEN, thengh auth). The shipped GitHub poll step receives its read-only job token automatically. GitLab operators can supply a masked, protectedGITHUB_TOKENCI/CD variable, also accepted by the CLI installer. Without a GitHub token, the lookup is anonymous and shares the unauthenticated API rate limit with other jobs using the same public IP address. A cycle that selects Jira work but matches no agent for a/fs-*command or label change now writes an actionable::warning::.Review, fix, retro and prioritize are never dispatched from Jira (prioritize has no Jira support yet), so
/fs-prioritizeproduces no dispatch and these agents are never fetched.This is the functional part of #9503, as requested in #9503 (comment). It uses @ianw's reproduction (#9503 (comment)) as a regression case. The warning-only work stays in #9504.
Changes
internal/harnessdispatch/enumerate.go: newListEffectiveTriggeredHarnesses(ctx, dir, cfg, policy, BuiltinResolver). It lists the agents registered with asource:, plus the Jira-dispatchable built-ins (triageandcode) that nosource:entry replaces (case-insensitive) and no entry disables. Review, fix, retro and prioritize are never listed or resolved, so one that is unavailable cannot fail the poll. When the config setsroles:(or setup ran with--agents), only the built-ins those roles select are listed, usingconfig.BuiltinAgentSelected(codeis selected bycoder). Roles do not scope agents registered with asource:. Each selected built-in is loaded withLoadWithBase, with its entry'sharness:blocks andAgentset, so runtime, model, effort andharness:overrides apply. A built-in'sharness.triggerstays ignored (ADR 0162 Decision 6). An agent whose last entry disables it is not listed. When any listed agent fails to load, the call returns an error that points at agents-repository access andallowed_remote_resources, so the poll fails before checkpoints advance and no event is dropped.ListTriggeredHarnesses, the GitHubdispatchpath, is unchanged: it runs the shared loop with a nil resolver.internal/cli/poll.go:newCELMatcheruses the effective list.agentsRepoBuiltinResolver(test seamnewJiraBuiltinResolverFn) reuses the version-aware agents-repo fallback, including GHES host handling andallowed_remote_resources, and resolves the ref once per matcher. The configured-host client resolves authentication fromGH_TOKEN,GITHUB_TOKEN, thengh auth. Authentication depends on a token reaching the poll process; without one, the resolver falls back to anonymous access.celMatcher.DispatchCandidatesfeeds the no-match warning.internal/cli/run.go:fetchPinnedAgentsRepoFileis split intoresolveAgentsRepoPinandfetchAgentsRepoFileAtPin.fullsend run,lintanddispatch --routebehave as before.internal/jirapoll(nomatch.go,poller.go): when a cycle selected issues, evaluated at least one request-like event (a comment with a/fs-*command, or a label change), and dispatched nothing, it writes one::warning::line naming each such issue key and event (up to 10); ordinary comments never trigger it, the agents considered, and remediation steps. Dynamic strings are sanitized: control characters dropped,%, CR and LF encoded, and every::run broken up. The kill switch suppresses the warning..github/workflows/reusable-poll-jira.ymlbindsGH_TOKEN: ${{ github.token }}on the actualPoll Jirastep, retainingcontents: read. The GitLab poll job already inherits the operator'sGITHUB_TOKENthrough the installer and poll scripts. This update documents that supported path and tests it through the shipped job YAML;GH_TOKENretains precedence when both are set. No GitLab or Jira credential substitutes for a GitHub token. GitLab requires access toapi.github.comandraw.githubusercontent.comfor built-in lookup and fetch. Without a GitHub token, five repositories polling every five minutes can consume the shared 60-request/hour anonymous limit with one ref lookup per cycle.docs/guides/user/jira-integration.md,docs/reference/config-reference.md, anddocs/cli/README.mddescribe built-in discovery, the supported Jira agent set, role selection, token use, failure behavior and troubleshooting.Compatibility
roles:selects, are now dispatched from Jira when their trigger matches. An omitted, null, or bareroles:key keeps the existing layered-config inheritance behavior; only an explicitroles: []selects none. For example, an install that registered onlytriagecan now also dispatchcodeon/fs-codeor an addedready-to-codelabel. To opt out, add- name: codewithenabled: false, which also disables the agent on the code host.fullsend-ai/agentsis unreachable, orallowed_remote_resources: []is set), the poll run fails. No checkpoint advances, so events are retried next cycle. To poll with no access to the agents repository, register triage and code with asource:; a custom source replaces the built-in, which is then not fetched.source:and a valid Jira trigger are still dispatched whatever their name.main, asfullsend rundoes. The harness is fetched at the resolved commit SHA.BREAKING CHANGE: The Jira poller now dispatches the role-selected built-in triage and code agents that are not disabled, without an
agents:registration, and fails the poll run when a listed agent cannot be loaded. Add- name: <agent>withenabled: falseto opt an agent out.Testing
Regression tests cover: missing
agents:config, shorthand overrides (ianw's config) andharness:blocks, custom-source precedence, disabled agents (including source plus disable pairs), theroles:subset and inheritance forms (omitted, null and bare inherit; an explicit empty list selects none), version-pinned built-in resolution, partial and total resolution failures, the kill switch, and the no-match warning on both GitHub and GitLab targets. They also cover that/fs-prioritize,/fs-review,/fs-fixand/fs-retroproduce no dispatch while/fs-triageand/fs-codestill work, that unavailable unsupported built-ins do not fail the poll while an unavailable triage or code still does, restricted agents-repository access (allowed_remote_resources: [], no ref access) with custom sources, and that the default resolver sendsGH_TOKENorGITHUB_TOKEN, prefersGH_TOKENwhen both are set, and actually performs an anonymous lookup without either. The fixture-based production-wiring tests exercisenewCELMatcherwith the real version-aware resolver against controlled HTTP servers; they are not live Jira or live GitHub tests. Job-level regressions execute the GitHub poll step with its YAML token binding and the GitLab YAML'sbefore_scriptandscriptcommands with a stub CLI. They verify token delivery, unchanged read-only GitHub permissions, and GitLab's token-absent path using dummy credentials.go test -race: pass.make lintand commit hooks: pass, including actionlint, shellcheck,go vet, secret scanning, and documentation links.make go-test(race detection and coverage): the main-module run passed every package exceptinternal/scaffold. Its existingTestValidateAgentsConfigStep_AcceptsOverrideOnlySettingsfails with local yq v4.45.1. The same failure was reproduced on the unchanged PR head520b5e1; this update does not change that validation step or its test. The new token tests pass. The remaininginternal/mintcoretests with-race -tags githubwere run separately and pass.E2E validation passed for the Jira → GitLab CEE dispatch flow.
Using Fullsend built from
c125d9de17c2605296b0bb9c06dbb99da49867fe(the reachable pre-merge commit for this PR), I verified:/fs-triagedispatched successfully./fs-codedispatched successfully.fs-code-live-test-fourth-try.md.This confirms the flow works end to end in the tested environment.
pkg/behaviourteststill builds its Jira matcher from registered harnesses only.Checklist
!) because the default Jira dispatch behavior changesCloses #9503