Skip to content

feat(#2264): derive Jira work-item identity in fullsend run - #8922

Merged
ggallen merged 3 commits into
mainfrom
agent/2264-jira-work-item-identity
Oct 30, 2026
Merged

ggallen merged 3 commits into
mainfrom
agent/2264-jira-work-item-identity

Conversation

@fullsend-ai-coder

Copy link
Copy Markdown
Contributor

Summary

Makes fullsend run enforce the Jira work-item identity contract. Both CI paths end in fullsend run: the GitHub Actions harness-run job and the GitLab agent job.

  • Jira-sourced events: fullsend run exports FULLSEND_WORK_ITEM_SOURCE=jira, FULLSEND_WORK_ITEM_KEY (the textual key, e.g. PROJ-123) and FULLSEND_WORK_ITEM_URL (the browse URL) from the embedded normalized event, replacing any inherited values. It also clears ISSUE_NUMBER.
  • Fail closed: the run stops with a visible error before any script runs if the Jira key is missing or not shaped like PROJ-123, if the URL is missing or not https, or if the payload declares source.system: jira but its normalized event fails validation.
  • Forge-sourced events (GitHub/GitLab): only FULLSEND_WORK_ITEM_SOURCE is filled in, and only when the caller left it unset. The value comes from source.system, or the detected forge when there is no normalized event. Key, URL and ISSUE_NUMBER behave exactly as before.

Bug fixed along the way

For Jira runs, fullsend run used to set ISSUE_NUMBER from --status-number. After Jira status routing, that value is the numeric suffix of the Jira key (123 from PROJ-123). So even though reusable-dispatch.yml left ISSUE_NUMBER empty, pre/post scripts and harness env expansion saw a Jira-derived number as a forge issue number. A Jira payload whose normalized event failed validation also fell back to forge routing without any error.

Related Issue

Partial implementation. Not covered here:

  • reusable-dispatch.yml still passes the numeric Jira entity ID as status-number. It only gates status notifications: fullsend run and reconcile-status replace it with the Jira key for status routing. Removing it would disable Jira run-status updates, so changing that contract (and the protected workflow file) is left to a follow-up.
  • Jira dispatch on the GitLab pipeline path does not exist yet (Dispatch Jira work items to GitLab code-host pipelines #8919). Once it lands and embeds _normalized_event, this runner logic applies there unchanged.
  • Tracker-facing writeback of triage and code results is tracked in Use Jira as the work-item tracker for the built-in agent loop #8918.
  • The built-in triage and code harnesses in fullsend-ai/agents already have Jira overlays that map ISSUE_URL from FULLSEND_WORK_ITEM_URL; the code overlay also clears ISSUE_NUMBER. They can now also rely on FULLSEND_WORK_ITEM_KEY and FULLSEND_WORK_ITEM_SOURCE.

Changes

  • internal/cli/run_workitem.go (new):
    • resolveWorkItemIdentity builds the work-item variables and validates Jira identity.
    • issueNumberFlagEnv decides the ISSUE_NUMBER value.
    • dispatchEventPayloads is the shared reader for the dispatch file and GITHUB_EVENT_PATH.
    • dispatchPayloadClaimsJira detects a Jira-claimed payload whose normalized event failed validation.
  • internal/cli/run.go: calls the helpers after tracker-source extraction (fail closed early) and exports the variables with the other flag-derived env, before env expansion and the pre-script. extractNormalizedEventFromDispatch now uses the shared payload reader; its behavior is unchanged.
  • Docs: the jira-poll adapter spec (runner behavior) and the bring-your-own-agent dispatch env table (new FULLSEND_WORK_ITEM_SOURCE row, ISSUE_NUMBER note).

Testing

  • New unit tests cover:

    • Jira identity (inherited values overridden; malformed keys and URLs rejected)
    • Forge events (source only, caller value kept, key/URL untouched)
    • ISSUE_NUMBER selection
    • Detecting a Jira-claimed payload
  • runAgent integration tests:

    • Jira identity is exported before harness env validation. This test fails when the export is removed.
    • A Jira payload with an invalid normalized event fails closed.
    • A non-https Jira URL fails closed.
  • Coverage of the new helpers is about 100%.

  • go test ./internal/cli/ passes except TestStartFetchService_*, which fail on a clean tree in the sandbox because the local socket is blocked. TestPostScriptEnv_NoSchema* fail only when FULLSEND_OUTPUT_SCHEMA is set in the environment; they pass with it unset.

  • pre-commit could not fetch hook repos in the sandbox (TLS). The hooks that match the changed files were run directly and passed: whitespace/EOF, gofmt, go vet, broken symlinks, docs links, lychee, and gitleaks via scan-secrets.

  • make lint passes (stage changes first, then run). Hooks were run directly instead; see above.

  • Tests added/updated for new or modified logic

Checklist

  • PR title follows Conventional Commits (correct type, ! for breaking changes)
  • Commits are signed off (DCO). Not applicable: autonomous agent commit.
  • I wrote this contribution myself and can explain all changes in it. Agent-authored; needs human review.

🤖 Generated with Claude Code


Related to #2264

Post-script verification

  • Branch is not main/master (agent/2264-jira-work-item-identity)
  • Secret scan passed (gitleaks — dfe2addf04bd08fffa2c2cdddd16146945e611f3..HEAD)
  • PR body secret scan passed (gitleaks — no-git)
  • Final PR description secret scan passed (gitleaks — no-git)

For Jira-sourced dispatches, fullsend run exported ISSUE_NUMBER from
the status number. After Jira status routing that value is the numeric
suffix of the Jira key (123 for PROJ-123). Pre/post scripts and harness
env expansion then saw a Jira-derived number as a GitHub/GitLab issue
number. FULLSEND_WORK_ITEM_SOURCE was documented but never exported. A
payload claiming a Jira source whose normalized event failed validation
fell back to forge routing silently.

fullsend run is the common sink of the GitHub Actions harness-run job
and the GitLab agent job, so the identity contract is enforced there:

- Jira events: export FULLSEND_WORK_ITEM_SOURCE=jira, the textual key
  as FULLSEND_WORK_ITEM_KEY, and the browse URL as
  FULLSEND_WORK_ITEM_URL from the normalized event, overriding inherited
  values. Clear ISSUE_NUMBER.
- Fail closed when the Jira key is not PROJ-123 shaped, the URL is not
  https, or a Jira-claimed payload fails normalized-event validation.
- Forge events: only fill FULLSEND_WORK_ITEM_SOURCE when unset (event
  source.system, else the detected forge). Key, URL and ISSUE_NUMBER
  behavior is unchanged.

Helpers live in internal/cli/run_workitem.go, and dispatch payload
reading is shared with extractNormalizedEventFromDispatch. The
jira-poll adapter spec and the bring-your-own-agent env table are
updated.

Partial: reusable-dispatch.yml still passes the numeric Jira ID as
status-number (fullsend run and reconcile-status replace it with the
Jira key for status routing). Jira dispatch on the GitLab pipeline
path is tracked in #8919. Tracker writeback is tracked in #8918.

Note: pre-commit could not fetch hook repos (sandbox TLS); hooks
matching the changed files (whitespace, EOF, gofmt, go vet, symlinks,
docs links, lychee, gitleaks) were run directly and passed.
TestStartFetchService_* fail in the sandbox on a clean tree too
(local socket blocked).

Related to #2264

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@fullsend-ai-review

fullsend-ai-review Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 12:00 AM UTC · Completed 12:11 AM UTC

Commit: d34d195 · View workflow run →

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

@github-actions

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Site preview

Preview: https://31eb4f7f-site.fullsend-ai.workers.dev

Commit: 345763cd880a6c1c17c78b4cdeac589f853bd1ae

@fullsend-ai-review fullsend-ai-review Bot added the risk/moderate PR risk: moderate label Oct 30, 2026
@fullsend-ai-review

fullsend-ai-review Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

<!-- fullsend:risk-assessment -->
Risk Assessment: moderate (2/5)

Details

Moderate risk: elevated change size and high git churn on run.go are balanced by no protected paths, zero dependency or workflow changes, bot authorship, substantial test coverage, and scoped alignment with linked issue #2264.

Previous run

<!-- fullsend:risk-assessment -->
Risk Assessment: moderate (2/5)

Details

Moderate risk: moderate change size and high git churn on run.go are balanced by no protected paths, bot authorship, strong test coverage, and alignment with linked issue #2264.

Previous run (2)

<!-- fullsend:risk-assessment -->
Risk Assessment: moderate (2/5)

Details

Moderate risk: moderate change size and high git churn on run.go are balanced by no protected paths, bot authorship, strong test coverage, and alignment with linked issue #2264.

@fullsend-ai-review

fullsend-ai-review Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Review

Findings

Low

  • [incomplete-doc] docs/cli/run.md:443 — docs/cli/run.md is the manually maintained CLI reference, but it never mentions the work-item identity variables fullsend run now exports (FULLSEND_WORK_ITEM_SOURCE, FULLSEND_WORK_ITEM_KEY, FULLSEND_WORK_ITEM_URL) or that ISSUE_NUMBER is cleared for Jira-sourced runs. The PR documents this only in the guides and the jira-poll adapter spec.
    Remediation: Add a short subsection to docs/cli/run.md listing the FULLSEND_WORK_ITEM_* exports and the ISSUE_NUMBER clearing for Jira runs.
  • [backward-incompatible] internal/cli/run.go:640 — fullsend run now fails closed when a dispatch payload claims a Jira source but its normalized event is invalid, and resolveWorkItemIdentity applies a stricter key pattern (^[A-Z][A-Z0-9_]+-[1-9][0-9]*$) and an https URL check. Such payloads were previously routed as forge-originated. This is what the linked issue asks for, but callers sending malformed Jira payloads will see a visible behavior change.
    Remediation: Mention the stricter validation in the release notes; keep the error messages that name the failing field.

Earlier findings

  • internal/cli/run.go:908, breaking-config — reclassified from low to info: the docs already described ISSUE_NUMBER as empty for Jira work items, and the updated guides now point scripts to FULLSEND_WORK_ITEM_KEY.
  • internal/cli/run.go, logic-error — resolved: resolveWorkItemID now reads FULLSEND_WORK_ITEM_KEY/FULLSEND_WORK_ITEM_URL for Jira runs, with new test cases in telemetry_run_test.go.
  • docs/guides/user/jira-integration.md, incorrect-doc — resolved: the Jira guide now describes the FULLSEND_WORK_ITEM_* exports, ISSUE_NUMBER clearing, and fail-closed validation.
Previous run

<!-- fullsend:review-findings-v2:eyJ2ZXJzaW9uIjoyLCJhY3Rpb24iOiJyZXF1ZXN0LWNoYW5nZXMiLCJmaW5kaW5ncyI6W3sic2V2ZXJpdHkiOiJtZWRpdW0iLCJjYXRlZ29yeSI6ImxvZ2ljLWVycm9yIiwiZmlsZSI6ImludGVybmFsL2NsaS9ydW4uZ28iLCJpZCI6ImZfMWQyYmZmNTExNmY0ZDJkZSIsImxpbmUiOjkwOCwiYWN0aW9uYWJsZSI6dHJ1ZX0seyJzZXZlcml0eSI6Im1lZGl1bSIsImNhdGVnb3J5IjoiaW5jb3JyZWN0LWRvYyIsImZpbGUiOiJkb2NzL2d1aWRlcy91c2VyL2ppcmEtaW50ZWdyYXRpb24ubWQiLCJpZCI6ImZfN2QyZThiMTcxY2Y3ODM3ZCIsImxpbmUiOjc2LCJhY3Rpb25hYmxlIjp0cnVlfSx7InNldmVyaXR5IjoibG93IiwiY2F0ZWdvcnkiOiJiYWNrd2FyZC1pbmNvbXBhdGlibGUiLCJmaWxlIjoiaW50ZXJuYWwvY2xpL3J1bi5nbyIsImlkIjoiZl83ZDJhZjBiOWZkM2M2MDA0IiwibGluZSI6NjQwLCJhY3Rpb25hYmxlIjpmYWxzZX0seyJzZXZlcml0eSI6ImxvdyIsImNhdGVnb3J5IjoiYnJlYWtpbmctY29uZmlnIiwiZmlsZSI6ImludGVybmFsL2NsaS9ydW4uZ28iLCJpZCI6ImZfYTY2MjdmMzgyMDU0MTcyNSIsImxpbmUiOjkwNSwiYWN0aW9uYWJsZSI6ZmFsc2V9LHsic2V2ZXJpdHkiOiJsb3ciLCJjYXRlZ29yeSI6ImluY29tcGxldGUtZG9jIiwiZmlsZSI6ImRvY3MvY2xpL3J1bi5tZCIsImlkIjoiZl81MjA0OTUwMDM3NGI3ZTQ2IiwibGluZSI6NDQzLCJhY3Rpb25hYmxlIjpmYWxzZX0seyJzZXZlcml0eSI6Im1lZGl1bSIsImNhdGVnb3J5IjoiZWRnZS1jYXNlIiwiZmlsZSI6ImludGVybmFsL2NsaS9ydW4uZ28iLCJpZCI6ImZfMGJjMzEzZTY3NTJmNmNiYSIsImxpbmUiOjYzOCwiYWN0aW9uYWJsZSI6dHJ1ZX1dLCJkaXNwb3NpdGlvbnMiOlt7ImlkIjoiZl8wYmMzMTNlNjc1MmY2Y2JhIiwic3RhdHVzIjoicmVzb2x2ZWRfYnlfY2hhbmdlIn0seyJpZCI6ImZfN2QyYWYwYjlmZDNjNjAwNCIsInN0YXR1cyI6Im9wZW4ifSx7ImlkIjoiZl9hNjYyN2YzODIwNTQxNzI1Iiwic3RhdHVzIjoib3BlbiJ9XX0= -->

Review

Findings

Medium

  • [logic-error] internal/cli/run.go:908 — Clearing ISSUE_NUMBER for Jira runs removes the work-item identity that telemetry uses. resolveWorkItemID() (run.go ~4494) reads ISSUE_KEY, REPO_FULL_NAME+ISSUE_NUMBER, and legacy forge URL variables, but never FULLSEND_WORK_ITEM_KEY or FULLSEND_WORK_ITEM_URL. It is called during runAgent (~line 1858), after the clear. A Jira run with --status-repo and no legacy URL variables now records fullsend.work_item_id="unknown", and the EM-001 work_item check rejects that sentinel. Before this PR the value was a misleading repo#<suffix>, but it was not unknown.
    Remediation: In resolveWorkItemID(), check FULLSEND_WORK_ITEM_KEY/FULLSEND_WORK_ITEM_URL (at least when FULLSEND_WORK_ITEM_SOURCE=jira) before the forge fallbacks, and keep ISSUE_NUMBER empty. Add a regression test that sets the Jira identity variables and leaves the legacy issue/PR variables unset.

  • [incorrect-doc] docs/guides/user/jira-integration.md:76 — The "Event semantics — input only" section says agents write results back to GitHub by default and tells users to check the linked GitHub repo for triage results. This PR clears ISSUE_NUMBER for Jira runs, exports FULLSEND_WORK_ITEM_SOURCE/KEY/URL, and fails closed on malformed Jira identity. The guide mentions none of this. The guide already warns that built-in scripts expect a GitHub issue number (Preserve Jira work-item identity through agent execution #2264), so this is a gap, not a high-severity error.
    Remediation: Update the "Event semantics — input only" and "Repo configuration" sections. Say that fullsend run exports the three FULLSEND_WORK_ITEM_* variables, clears ISSUE_NUMBER, and fails closed on malformed Jira identity. Soften or remove the claim that built-in agent output goes to GitHub by default.

Low

  • [backward-incompatible] internal/cli/run.go:640 — fullsend run now fails closed when a dispatch payload declares a Jira source but its normalized event is invalid (dispatchJiraClaimUnresolved). Previously such a run fell through as forge-originated. The change is intentional, comes from the issue's fail-closed requirement, and is documented. Callers that send malformed Jira payloads will now see errors.
    Remediation: No code change needed. Mention it in the release notes.

  • [breaking-config] internal/cli/run.go:905 — For Jira runs, FULLSEND_WORK_ITEM_SOURCE/KEY/URL now replace inherited values and ISSUE_NUMBER is cleared. Harnesses or scripts that relied on the old values during Jira runs will see different ones. The change is intentional and documented. Forge runs are unchanged.
    Remediation: No code change needed. Mention it in the release notes.

  • [incomplete-doc] docs/cli/run.md:443 — The page does not mention the fail-closed Jira identity checks, the FULLSEND_WORK_ITEM_* exports, or the ISSUE_NUMBER clearing. The variables are documented in bring-your-own-agent.md and jira-poll-adapter.md, which this PR updates, so this is optional.
    Remediation: Optionally add a short note, or a link to the jira-poll-adapter section.

Earlier findings

  • internal/cli/run.go:638, edge-case — resolved. The Jira-claim guard now calls dispatchJiraClaimUnresolved (run.go:640). It also fires when the other dispatch channel supplied a valid forge event, and it respects an explicit --event-file. A new test covers the disagreement case.

Next steps:

  • /fs-fix — agent addresses review findings automatically
  • /fs-fix <your instruction> — agent fixes with your specific guidance
  • Push commits directly — review re-runs automatically on push
  • /fs-fix-stop — disable automatic fix runs for this PR
Previous run (2)

<!-- fullsend:review-findings-v2:eyJ2ZXJzaW9uIjoyLCJhY3Rpb24iOiJyZXF1ZXN0LWNoYW5nZXMiLCJmaW5kaW5ncyI6W3sic2V2ZXJpdHkiOiJtZWRpdW0iLCJjYXRlZ29yeSI6ImVkZ2UtY2FzZSIsImZpbGUiOiJpbnRlcm5hbC9jbGkvcnVuLmdvIiwiaWQiOiJmXzBiYzMxM2U2NzUyZjZjYmEiLCJsaW5lIjo2MzgsImFjdGlvbmFibGUiOnRydWV9LHsic2V2ZXJpdHkiOiJsb3ciLCJjYXRlZ29yeSI6ImJhY2t3YXJkLWluY29tcGF0aWJsZSIsImZpbGUiOiJpbnRlcm5hbC9jbGkvcnVuLmdvIiwiaWQiOiJmXzdkMmFmMGI5ZmQzYzYwMDQiLCJsaW5lIjo2MzQsImFjdGlvbmFibGUiOmZhbHNlfSx7InNldmVyaXR5IjoibG93IiwiY2F0ZWdvcnkiOiJicmVha2luZy1jb25maWciLCJmaWxlIjoiaW50ZXJuYWwvY2xpL3J1bi5nbyIsImlkIjoiZl9hNjYyN2YzODIwNTQxNzI1IiwibGluZSI6OTA1LCJhY3Rpb25hYmxlIjpmYWxzZX1dfQ== -->

Review

Findings

Medium

  • [edge-case] internal/cli/run.go:638 — The Jira fail-closed guard is bypassed when the two dispatch channels disagree. If dispatch/event-payload.json declares source.system=jira but its normalized event is invalid, extractNormalizedEventFromDispatch skips it and can accept a valid GitHub/GitLab event from GITHUB_EVENT_PATH. That sets trackerSource to a non-empty forge value, so the sOpts.trackerSource == "" condition never evaluates dispatchPayloadClaimsJira. The run then proceeds with forge routing and a numeric ISSUE_NUMBER even though the on-disk payload declares Jira. The new tests only cover each channel separately. The scenario is unlikely in practice, since both channels normally carry the same payload, but this guard is meant to fail closed.
    Remediation: Run dispatchPayloadClaimsJira whenever no --event-file was given and trackerSource is not already "jira", not only when it is empty. Add a regression test with an invalid Jira dispatch file plus a valid forge event in GITHUB_EVENT_PATH.

Low

  • [backward-incompatible] internal/cli/run.go:634 — The new fail-closed behavior is intended by Preserve Jira work-item identity through agent execution #2264. The exported Jira key must match ^[A-Z][A-Z0-9_]+-[1-9][0-9]*$, which rejects single-character project keys such as P-1. The URL must be https without userinfo. jira-poll-adapter.md says only "a Jira key such as PROJ-123", so producers are not told the exact pattern. Residual impact is limited to Jira instances with a non-default project-key rule or an http base URL.
    Remediation: Optionally spell out the exact key pattern in jira-poll-adapter.md.
  • [breaking-config] internal/cli/run.go:905 — For Jira runs, fullsend run now exports ISSUE_NUMBER as empty instead of the numeric suffix of the Jira key. This matches the already-documented contract ("empty for Jira work items") and Preserve Jira work-item identity through agent execution #2264, so it is a bug fix rather than a new break. Any downstream Jira consumer that relied on the old value should use FULLSEND_WORK_ITEM_KEY.
    Remediation: Optionally confirm the Jira overlays and scripts in fullsend-ai/agents do not read ISSUE_NUMBER, and mention the change in release notes.

Labels: PR changes the fullsend run dispatch/work-item identity handling in Go


Next steps:

  • /fs-fix — agent addresses review findings automatically
  • /fs-fix <your instruction> — agent fixes with your specific guidance
  • Push commits directly — review re-runs automatically on push
  • /fs-fix-stop — disable automatic fix runs for this PR

fullsend-ai-review[bot]

This comment was marked as outdated.

@fullsend-ai-review fullsend-ai-review Bot added component/dispatch Workflow dispatch and triggers go Pull requests that update go code labels Oct 30, 2026
@codecov

codecov Bot commented Oct 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@fullsend-ai-coder

fullsend-ai-coder Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 Finished Fix · ✅ Success · Started 12:12 AM UTC · Completed 12:19 AM UTC

Commit: d34d195 · View workflow run →

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

Run the Jira dispatch-payload guard whenever no --event-file was given and
the tracker source is not already jira, so a valid forge event from
GITHUB_EVENT_PATH cannot bypass an invalid Jira dispatch file. Add a
regression test and document the exact Jira key pattern.

Addresses review feedback on PR #8922.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@fullsend-ai-coder

Copy link
Copy Markdown
Contributor Author

🔧 Fix agent — iteration 1 (bot-triggered)

Fixed the medium finding by making the Jira fail-closed guard apply even when another dispatch channel supplied a valid forge event, and added a regression test. Documented the exact Jira key pattern for the low finding. Recorded the other low finding (ISSUE_NUMBER change) as out of scope. Targeted tests pass. Pre-commit could not run because the sandbox has no network access. Six unrelated tests in internal/cli fail both with and without this change.

Fixed (2):

  1. Jira fail-closed guard bypassed when dispatch channels disagree (internal/cli/run.go): The guard now runs whenever no --event-file was given and the tracker source is not already jira, via a new dispatchJiraClaimUnresolved helper. Added a regression test: an invalid Jira dispatch file plus a valid forge event in GITHUB_EVENT_PATH now fails closed.
  2. Exact Jira key pattern is not documented for producers (docs/normative/normalized-event/v1/jira-poll-adapter.md): Documented the exact key pattern, including that single-character project keys are rejected.

Disagreed (1):

  1. Optionally confirm Jira overlays/scripts in the agents repo do not read ISSUE_NUMBER, and mention the change in release notes: The reviewer describes this as intended behavior that matches the documented contract and Preserve Jira work-item identity through agent execution #2264. The check concerns an external repository and release notes, which are outside this PR's code, so no change was made.

Tests: passed

CI inspections (4):

  1. test (passing, success)
  2. codecov/patch (passing, success)
  3. playback (pending, in_progress): E2E job still running at inspection time.
  4. behaviour (pending, in_progress): E2E job still running at inspection time.

Conflict update: skipped; strategy none; forge MERGEABLE; target main

Next steps:

  • /fs-review — request a re-review of the changes
  • /fs-fix <your instruction> — run another fix pass with specific guidance
  • Push commits directly — review re-runs automatically on push
    Updated by fullsend fix agent

@fullsend-ai-review

fullsend-ai-review Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 12:21 AM UTC · Completed 12:34 AM UTC

Commit: 0a00349 · View workflow run →

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

fullsend-ai-review[bot]

This comment was marked as outdated.

@fullsend-ai-coder

fullsend-ai-coder Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 Finished Fix · ✅ Success · Started 12:36 AM UTC · Completed 12:44 AM UTC

Commit: 0a00349 · View workflow run →

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

…docs

resolveWorkItemID now reads FULLSEND_WORK_ITEM_KEY/URL when the source is
jira, so Jira runs (which clear ISSUE_NUMBER) no longer record 'unknown'.
Adds regression cases and updates the Jira integration guide to describe
the FULLSEND_WORK_ITEM_* exports, ISSUE_NUMBER clearing, and fail-closed
identity checks.

Note: pre-commit could not fetch hook repos (certificate failure); gofmt and
go vet were run directly. Six tests in internal/cli (TestStartFetchService_*,
TestPostScriptEnv_NoSchema*) fail identically without this change.

Addresses #8922

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@fullsend-ai-coder

Copy link
Copy Markdown
Contributor Author

🔧 Fix agent — iteration 2 (bot-triggered)

Fixed the two actionable findings: telemetry work-item ID now resolves from the Jira FULLSEND_WORK_ITEM_* variables (with tests), and the Jira guide was updated. The three low-severity/optional findings need no code change and are recorded as disagreements. Six tests in internal/cli fail identically with and without this change (sandbox environment); pre-commit could not fetch hooks, so gofmt and go vet were run directly.

Fixed (2):

  1. Clearing ISSUE_NUMBER for Jira runs leaves telemetry work_item_id as unknown (internal/cli/run.go): resolveWorkItemID now returns FULLSEND_WORK_ITEM_KEY, then FULLSEND_WORK_ITEM_URL, when FULLSEND_WORK_ITEM_SOURCE is jira, before the forge fallbacks. Added regression cases in telemetry_run_test.go with legacy issue/PR variables unset.
  2. Jira integration guide omits work-item exports, ISSUE_NUMBER clearing, fail-closed identity, and overstates GitHub-only output (docs/guides/user/jira-integration.md): Updated the Event semantics and Repo configuration sections to describe the FULLSEND_WORK_ITEM_* exports, ISSUE_NUMBER clearing and fail-closed behavior, and softened the claim that built-in output goes only to GitHub.

Disagreed (3):

  1. Fail-closed behavior on malformed Jira dispatch payloads is backward-incompatible: Reviewer states no code change is needed; this is a release-notes item and the behavior is intentional.
  2. Jira runs now replace inherited FULLSEND_WORK_ITEM_ values and clear ISSUE_NUMBER*: Reviewer states no code change is needed; the change is intentional and is now documented in the user guide. Release-notes item.
  3. docs/cli/run.md does not mention Jira identity checks (optional): Reviewer marked this optional. The behavior is documented in the Jira integration guide, bring-your-own-agent.md and jira-poll-adapter.md, and adding more would go beyond the minimal fix.

Tests: passed

CI inspections (5):

  1. CI / test (passing, success): Passing on the prior head.
  2. CI / commit-lint (passing, success): Passing on the prior head.
  3. codecov/patch (passing, success): Passing on the prior head.
  4. E2E Tests / behaviour (pending, in_progress): Still running when inspected.
  5. E2E Tests / playback (pending, in_progress): Still running when inspected.

Conflict update: skipped; strategy none; forge MERGEABLE; target main

Next steps:

  • /fs-review — request a re-review of the changes
  • /fs-fix <your instruction> — run another fix pass with specific guidance
  • Push commits directly — review re-runs automatically on push
    Updated by fullsend fix agent

@fullsend-ai-review

fullsend-ai-review Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 12:46 AM UTC · Completed 12:55 AM UTC

Commit: 345763c · View workflow run →

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

@fullsend-ai-review
fullsend-ai-review Bot dismissed stale reviews from themself October 30, 2026 00:55

Superseded by updated review

Comment thread internal/cli/run.go Resolved
@fullsend-ai-review fullsend-ai-review Bot added the ready-for-merge All reviewers approved — ready to merge label Oct 30, 2026
@ggallen
ggallen enabled auto-merge October 30, 2026 01:03
@ggallen
ggallen added this pull request to the merge queue Oct 30, 2026
Merged via the queue into main with commit 932adbc Oct 30, 2026
53 checks passed
@ggallen
ggallen deleted the agent/2264-jira-work-item-identity branch October 30, 2026 01:39
@ggallen

ggallen commented Oct 30, 2026

Copy link
Copy Markdown
Member

Post-merge validation for #2264:

  • Passed: PR head CI checks: 23 successful, 40 skipped, no failures or pending checks.
  • Passed: go test -count=1 ./internal/cli.
  • Passed: focused Jira acceptance tests, normally and with -race: Jira identity export, malformed or missing identity fail-closed handling, ISSUE_NUMBER clearing, GitHub/GitLab compatibility, telemetry identity, and Jira status routing.
  • Passed: nested internal/mintcore tests with -race -tags github.

The full local make go-test target reported a separate failure in internal/scaffold: its tests invoke the existing jq-style tostring expression in reusable-dispatch.yml, which Mike Farah yq v4.40.5 rejects. That workflow is unchanged by PR #8922; the other root-module package tests passed.

This branch was successfully deployed

1 active and 1 inactive deployments
site-preview — 345763cd Deployed Oct 30, 2026 by github-actions[bot]
dev — 345763cd Deployed Oct 30, 2026 by fullsend-ai-coder[bot] via behaviour #18287
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component/dispatch Workflow dispatch and triggers go Pull requests that update go code ready-for-merge All reviewers approved — ready to merge ready-for-review Triggers review agent dispatch risk/moderate PR risk: moderate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant