-
Notifications
You must be signed in to change notification settings - Fork 88
docs(adr): ADR 0079 — Jira project setup via fullsend CLI #3812
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
8755035
48b783f
94bf25c
1617b63
755080b
bac62e0
d011f22
fee93d2
020a88a
d1a7bd7
57a1c2a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,139 @@ | ||
| --- | ||
| title: "79. Jira project setup via fullsend CLI" | ||
| status: Accepted | ||
| relates_to: | ||
| - agent-infrastructure | ||
| topics: | ||
| - jira | ||
| - enrollment | ||
| - external-issue-trackers | ||
| - credentials | ||
| --- | ||
|
|
||
| # 79. Jira project setup via fullsend CLI | ||
|
|
||
| Date: 2026-07-09 | ||
|
|
||
| ## Status | ||
|
|
||
| Accepted | ||
|
|
||
| ## Context | ||
|
|
||
| Fullsend's dispatch model (see [agent-infrastructure](../problems/agent-infrastructure.md)) | ||
| uses pluggable input drivers to normalize events from multiple sources | ||
| ([ADR 0061](0061-harness-cel-dispatch.md)). For Jira, the poll driver | ||
| ([ADR 0063](0063-polling-based-work-discovery.md)) discovers work items | ||
| via JQL and dispatches agents through the shared pipeline. ADR 0063 | ||
| defers credential placement as an open question — Jira API tokens need | ||
| to reach the poll driver and agent pre-scripts, but no ADR specifies | ||
| how those credentials are provisioned or where enrollment metadata lives. | ||
|
|
||
| A proof-of-concept ([manish-jira](https://github.com/rh-hemartin-fullsendai/manish-jira)) | ||
| validated end-to-end Jira-to-agent dispatch using classic (unscoped) | ||
| API tokens against `<tenant>.atlassian.net`. The PoC is GitHub-specific | ||
| and uses push-based `repository_dispatch`; this ADR intentionally | ||
| narrows scope to credential provisioning and poll-driver config, | ||
| deferring dispatch mechanics to | ||
| [ADR 0063](0063-polling-based-work-discovery.md). The enrollment steps | ||
| were entirely manual in the PoC; the CLI automates them. | ||
|
|
||
| Atlassian is deprecating unscoped API tokens. Scoped tokens require the | ||
| `api.atlassian.com` gateway with a Cloud ID in the URL | ||
| (`https://api.atlassian.com/ex/jira/{cloudId}/rest/api/3/...`) and | ||
| Basic auth (`email:token`). The Cloud ID is a stable site identifier | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [MEDIUM] Cloud ID resolution via This states as settled fact that the Cloud ID "is a stable site identifier resolvable from any tenant hostname via Suggestion: note explicitly that |
||
| resolvable from any tenant hostname via | ||
| `https://<host>/_edge/tenant_info`; the CLI resolves it once at | ||
| enrollment time. | ||
|
|
||
| ## Options | ||
|
|
||
| ### Option 1: Manual credential setup per documentation | ||
|
|
||
| Operators follow a guide to create forge secrets and edit | ||
| `.fullsend/config.yaml` by hand. Rejected — error-prone for multi-project | ||
| setups and inconsistent across forges. | ||
|
|
||
| ### Option 2: `fullsend jira setup` CLI command | ||
|
|
||
| A CLI command provisions credentials and writes poll driver connection | ||
| config. The verb `setup` is chosen over `enroll` to avoid overloading: | ||
| `fullsend github enroll` is a lightweight config toggle that does not | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [HIGH] Naming rationale for This justifies Suggestion: drop the comparison to |
||
| set secrets, while `jira setup` provisions forge secrets alongside | ||
| config. Follows established CLI patterns (cobra subcommands, | ||
| `--dry-run`). | ||
|
|
||
| ## Decision | ||
|
|
||
| Add a `fullsend jira setup <target-repo>` CLI command that operates on | ||
| a remote `owner/repo` target via the forge API (no local clone | ||
| required). The command accepts Jira credentials via environment | ||
| variables (`JIRA_HOST`, `JIRA_EMAIL`, `JIRA_API_TOKEN`) and supports | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [MEDIUM] Forge secret names This specifies storing forge-level secrets literally named Suggestion: namespace the secrets consistently with the rest of the codebase, e.g. |
||
| `--dry-run`. Credentials are never accepted via CLI flags to avoid | ||
| shell-history and process-list exposure. | ||
|
|
||
| The CLI resolves the Jira Cloud ID from the host URL at enrollment | ||
| time (`https://<host>/_edge/tenant_info`) and writes two non-secret | ||
| values into the poll driver's `poll.input_drivers[].connection` block | ||
| in `.fullsend/config.yaml`: | ||
|
|
||
| ```yaml | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [HIGH] Sample connection config omits ADR 0063's mandatory ADR 0063 states each poll input driver entry must specify "at minimum: Driver type, Connection (base URL, credentials reference), Queries — one or more search expressions (JQL for Jira)" and its own YAML example shows Suggestion: either show |
||
| poll: | ||
| input_drivers: | ||
| - type: jira-poll | ||
| connection: | ||
| cloud_id: "<resolved-at-enrollment>" | ||
| project_key: EXAMPLE | ||
| ``` | ||
|
|
||
| Two credentials are stored as forge-level secrets (not checked into | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [MEDIUM] No mechanism specified for multiple Jira connections per repo sharing fixed-name secrets
Suggestion: either explicitly scope the decision to "one Jira connection per repo" in Consequences, or specify how multiple connections get distinct credential references (e.g. namespaced secret names or a credential-reference field in |
||
| the repository): `JIRA_EMAIL` (Atlassian account email) and | ||
| `JIRA_API_TOKEN` (scoped API token). Together these support Basic auth | ||
| against the `api.atlassian.com` gateway. This is compatible with | ||
| [ADR 0017](0017-credential-isolation-for-sandboxed-agents.md)'s | ||
| credential isolation model. Ensuring credentials stay outside the | ||
| agent sandbox is the harness author's responsibility (via `env.runner` | ||
| / `env.sandbox` per [ADR 0055](0055-unified-env-var-delivery.md) and | ||
| pre/post scripts). | ||
|
|
||
| The command is designed to be idempotent — re-running with a new token | ||
| updates the forge secret. The scope is credentials and config only; | ||
| the dispatch mechanism is the poll driver's | ||
| responsibility ([ADR 0063](0063-polling-based-work-discovery.md)), | ||
| and agent-level Jira awareness (harness `pre_script` / | ||
| `post_script`) is the repo admin's responsibility. This is distinct | ||
| from the CLI's `EnrollmentLayer` ([ADR 0006](0006-ordered-layer-model.md)), | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [MEDIUM] Decision anchors on This says the command "is distinct from the CLI's Suggestion: cite ADR 0044 alongside (or instead of) ADR 0006 for |
||
| which manages forge-level installation scaffolding. | ||
|
|
||
| ## Consequences | ||
|
|
||
| - Jira credential provisioning is automated and consistent across | ||
| forges. Two forge secrets (`JIRA_EMAIL`, `JIRA_API_TOKEN`) and two | ||
| config values (`cloud_id`, `project_key`) fully describe a Jira | ||
| connection. | ||
| - Credentials are stored as forge secrets, compatible with | ||
| [ADR 0017](0017-credential-isolation-for-sandboxed-agents.md)'s | ||
| isolation model. Sandbox isolation is enforced downstream by harness | ||
| configuration (`env.runner` / `env.sandbox` per | ||
| [ADR 0055](0055-unified-env-var-delivery.md), pre/post scripts), not | ||
| by enrollment. | ||
| - The Jira-token portion of ADR 0063's open question on credential | ||
| placement is resolved for the enrollment path; the CLI writes | ||
| connection metadata directly into `poll.input_drivers[].connection`. | ||
| No separate `integrations.jira` config key is introduced — if a | ||
| push-based dispatch path (e.g. Jira Automation webhooks) is adopted | ||
| later, a future ADR can introduce integration-level config at that | ||
| point. Forge-native credentials (`GITHUB_TOKEN`, App creds) remain | ||
| unaddressed by this ADR. | ||
| - Credentials are accepted only via environment variables, not CLI | ||
| flags, to avoid shell-history and process-list exposure. | ||
| - The Cloud ID is resolved once at enrollment time from the Jira host | ||
| URL. Runtime API calls use the `api.atlassian.com` gateway with the | ||
| stored Cloud ID, avoiding per-poll lookups. | ||
| - Jira API token rotation is the repo admin's responsibility — | ||
| re-running `fullsend jira setup` with a new token is designed to | ||
| update the forge secret. Per-forge idempotency verification is | ||
| tracked as an implementation concern. | ||
| - Repo-to-issue association is out of scope — the poll driver | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [MEDIUM] Consequences misattributes repo-to-issue routing to ADR 0063, which defines no such mechanism This states "Repo-to-issue association is out of scope — the poll driver (ADR 0063) handles which issues route to which repositories." Checked ADR 0063's actual scope: it explicitly limits itself to "A single target repository owns poll configuration, credential references, and the dispatch output path" (1:1 repo-to-Jira-project polling) and states polling is per-repo-mode only. ADR 0063 defines no cross-repo issue-routing mechanism at all, so there is no existing design for "repo-to-issue association" to actually defer to — the sentence implies a solved problem that isn't solved anywhere in the cited ADR. Suggestion: rephrase to state plainly that multi-repo/cross-project issue routing is an unsolved problem deferred to a future ADR, rather than implying ADR 0063 already covers it. |
||
| ([ADR 0063](0063-polling-based-work-discovery.md)) handles which | ||
| issues route to which repositories. | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[MEDIUM] Filename and topic tag use "enrollment", the verb this ADR explicitly rejects in favor of "setup"
Option 2 explicitly argues for the verb
setupoverenroll"to avoid overloading" withfullsend github enroll, and the Decision names the commandfullsend jira setup. The title/H1 were updated to "Jira project setup via fullsend CLI", but the filename0079-jira-project-enrollment-via-cli.mdand thistopics:frontmatter entry (enrollment) still use the rejected term. ADR filenames are effectively permanent identifiers post-merge, so this leaves a lasting mismatch between what the file is named/tagged and what it decides.Suggestion: rename the file to
0079-jira-project-setup-via-cli.mdand swap theenrollmenttopic forsetupbefore merge, since renaming after merge would violate this repo's ADR immutability convention.