Repository navigation
feat(cli): let agents read and update Jira tickets safely - #28592
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 2 minutes. View limit details
📝 Walkthrough
Priority: ➖ Normal Severity of issue fixed: Medium Merge Risk: 🟡 Moderate · up to
|
There was a problem hiding this comment.
Actionable comments posted: 3
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
6dda33fc-3785-42da-a7d1-a24b3c758f01
📒 Files selected for processing: 41
config/scripts/generate-bundled-skill-guides.mjsresources/skills/current-manifest.jsonskill-guides/jira-tickets.mdskill-guides/orca-jira.mdskill-stubs/jira-tickets.mdskill-stubs/orca-jira.mdskills/jira-tickets/SKILL.mdskills/orca-jira/SKILL.mdsrc/cli/args.tssrc/cli/bundled-skill-guides.tssrc/cli/command-body-input.tssrc/cli/handler-group-manifest.tssrc/cli/handlers/jira-write.tssrc/cli/handlers/jira.tssrc/cli/index-jira.test.tssrc/cli/jira-command-surface.test.tssrc/cli/jira-format.tssrc/cli/jira-handler-group.tssrc/cli/jira-target.tssrc/cli/linear-request-builders.tssrc/cli/reference-handler-group.tssrc/cli/specs/index.tssrc/cli/specs/jira.tssrc/main/jira/jira-agent-read.test.tssrc/main/jira/jira-issue-comments.tssrc/main/jira/jira-issue-create-metadata.tssrc/main/jira/jira-issue-mutations.test.tssrc/main/jira/jira-issue-mutations.tssrc/main/jira/jira-issue-read.tssrc/main/jira/jira-issue-search.tssrc/main/jira/jira-project-queries.tssrc/main/jira/jira-read-failure.tssrc/main/jira/jira-transition-queries.tssrc/main/runtime/rpc/methods/jira.test.tssrc/main/runtime/rpc/methods/jira.tssrc/main/runtime/runtime-jira-commands.tssrc/main/startup/cli-command-names.tssrc/shared/jira-agent-capability.tssrc/shared/jira-types.tssrc/shared/protocol-version.tssrc/shared/rpc-contract/jira-params.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 2 remain after this review.
## ELI5 Keep the test suite working with the Jira features that have just landed. There is no visible app change. ## What Changed The host-picker test now expects the host-qualified selection the parent already accepts. The startup fixture provides Electron's protocol handler and verifies that ready installs the Jira image scheme. Jira edit tests use exported wrappers with module-local setters that are cleared on unmount, preserving the issue/source switch tests without the banned mutable function export. The WSL storage inventory classifies Jira list columns, linked-view choice and prompt templates as device preferences, matching their keys and the existing Linear policy. Skill-guide tests check the actual generated discovery projection rather than assuming it is shorter than every full guide or uses one fixed phrase. The cache test follows the headless workflow's deliberate removal of its push trigger; cache-warmer checks remain intact. ## Why Final CI found six stale integration assumptions after the Jira batch. Updating the fixtures and inventory preserves the landed behavior and the underlying checks. Changing production code, padding the Jira guide, or restoring an intentionally removed workflow trigger would change the product to satisfy incorrect test assumptions. ## Linked Issue Follow-up to #28622, #28631 and #28592. The existing headless trigger policy was introduced in #28664. ## Visual Proof N/A — tests, test fixtures and storage inventory declarations only; no visual or interaction change. ## Testing - [x] Automated tests updated. - [x] 196 focused tests across nine files pass on macOS, covering every failed shard assertion, fixture consumers and the headless workflow policy. - [x] Node and web typechecks pass; all seven changed-code quality stages, formatting and diff checks pass. - Reproduced five failing assertions in startup/export/storage tests and the skill projection failure before the repairs. The host-picker owner also reproduced the stale selection failure before correcting it. - Final full CI will run on this PR. The prior Ubuntu 22.04 persistence job crashed in the native watcher build before persistence tests ran; this change does not claim a Linux release, live Jira or real SSH pass. ## Review Independent source review found no issues; all six reviewed file hashes and the complete diff match committed head `aa703eb50147ba95646cb82f10b6d86b4f890fc4`. Risk: low. No authentication, network, protocol implementation, workflow, renderer behavior, remote messages or migration rewrite logic changes. ## Agent skill upstream boundary - [x] Not applicable; no upstream skill-installer source or artifacts copied. ## Notes The three storage keys contain device-level preferences, without workspace paths or identifiers. Tests preserve host disambiguation and issue/source switching. Platform, SSH and provider behavior remains in the existing implementations. ## Checklist - [x] Small and focused. - [x] Explained the before/after, mechanism and choice of approach. - [x] Visual proof marked N/A with a reason. - [x] Self-reviewed for correctness and cleanup. - [x] Cross-platform and SSH impact considered. - [x] Focused tests, types, formatting and quality checks pass; full CI covers the broader build.
|
Thanks for your work on this 😄 |
ELI5
Agents can now work on Jira tickets from the terminal: read them, create tickets, leave comments, change status, assign people, set priorities, and edit labels. They use the Jira account already connected to the Orca host they are working on.
What Changed
Before, Jira worked in the Tasks panel but had no agent command surface. This adds the complete
orca jiracommand family, human-readable and JSON output, and theorca-jira/jira-ticketsdiscovery guides. Project keys resolve to real project IDs before creation; project issue types and required create fields are discoverable. Multiline descriptions/comments support files and stdin using the existing body-reading implementation.Each operation pins one saved Jira site. Browse URLs match the complete site origin and context path; ambiguous keys and conflicting sites fail before writing. Read failures remain errors, while a successful empty comment list remains a success. Status changes resolve against the issue's available transitions, and label add/remove use Jira's atomic operations so unrelated labels survive concurrent edits. Failed or uncertain writes never print success and are not retried automatically.
Why
A read-only CLI cannot complete a Jira task. This follows the established command registry and existing host-owned Jira methods, with optional verified-read and label-operation fields negotiated through
jira.agent-access.v1. Older hosts receive update guidance before an agent reads or writes; older clients retain existing behavior. Separate credentials, transports, legacy link storage, and read-only aliases would add competing paths without completing the task.Linked Issue
Fixes #11982.
Visual Proof
N/A — command-line commands and backend read/mutation handling; no renderer layout or visual interaction changed. A compiled-CLI demonstration over a temporary fixture socket verified reads, successful empty comments, multiline create/comment bodies, transitions, atomic label edits, and refusal of an older host before any Jira write. All demonstration data was synthetic; no real Jira account was contacted.
Testing
Reproduced the missing command surface against the starting main commit. On macOS, focused CLI/RPC/backend tests and adjacent command-registry, vocabulary, startup-name, Linear, Jira-query, skill, and guide suites passed. The final guide/read/CLI check ran 116 tests; a follow-up manifest extraction passed direct lint, the CLI typecheck and 44 routing/Jira tests; the preceding focused check ran 111 tests. Coverage includes wrong-site URLs, ambiguous keys, old-host write refusal, genuine empty reads, real read errors, mutation rejections, transition ambiguity, uncertain-write handling, and atomic label edits for Cloud and Server/DC.
pnpm tc:cli, the CLI compiler/bin verification, changed-code quality gate, bundled-guide/skill-manifest/RPC-catalog verification, andgit diff --checkpassed. The reviewed merged headd60f71e072falso passed node and CLI product typechecks after incorporating current main. The prior clock issue is resolved on main; #28593 was closed as redundant. CI must cover the full build and native platforms. Live Jira credentials, Linux, Windows, and a real SSH host were not exercised; remote command routing and Server/DC request shapes are covered by fixtures.Review
Adapted the full command surface, formatting and guide from #11986 by Dan Cieslak (@dcieslak19973), with exact-site selection and honest saved-connection reporting informed by #26055 by kokbee (@kokbee). Both authors are credited in commit trailers. These source PRs are alternatives; this PR implements a single complete surface instead of landing both unchanged.
Agent skill upstream boundary
Notes
Merge risk: Medium. This is a complete new command family, plus small optional backend changes required to avoid misleading reads and unsafe label replacement. Old-client defaults are preserved and new semantics require a capability check. Creation/comments are intentionally not retried after uncertainty. The Cloud-filter and transition-field PRs touch nearby query/schema methods and require integration review; preserve their newer query ownership and optional transition fields when resolving overlap.
Credentials and Jira requests stay on the selected execution host. Commands use no shell commands or platform-specific paths, work independently of git/folder workspace state, and add no mobile/UI requirement or new stream opcode. No original PR was merged, closed, or modified.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred) — focused validation above passed; full CI/native build remain.