Repository navigation
docs(adr): use tracker-first dispatch for multiple targets #9266
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
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,109 @@ | ||
| --- | ||
| title: "167. Use tracker-first dispatch for multiple targets" | ||
| status: Accepted | ||
| relates_to: | ||
| - multi-target-execution | ||
| - agent-architecture | ||
| - agent-infrastructure | ||
| topics: | ||
| - dispatch | ||
| - coordination | ||
| - authorization | ||
| --- | ||
|
|
||
| # 167. Use tracker-first dispatch for multiple targets | ||
|
|
||
| Date: 2026-11-10 | ||
|
|
||
| ## Status | ||
|
|
||
| Accepted | ||
|
|
||
| ## Context | ||
|
|
||
| [ADR 0061](0061-harness-cel-dispatch.md) dispatches eligible harnesses, while | ||
| [ADR 0063](0063-polling-based-work-discovery.md) integrates Jira work items. | ||
| [ADR 0106](0106-serialize-agent-runs-and-coalesce-subsequent-events.md) | ||
| serializes work for a harness and subject. A request spanning several source | ||
| branches needs independent target identities and complete accounting, but | ||
| that does not require a new multi-target execution interface in the runner. | ||
|
|
||
| [Multi-target execution](../problems/multi-target-execution.md) compares the | ||
| integration choices. Durable scheduling and publication recovery are tracked | ||
| separately in [#9253](https://github.com/fullsend-ai/fullsend/issues/9253). | ||
| This ADR aims to assess multiple authorized branches by reusing ordinary | ||
| single-target triage with visible work tracking for every branch. | ||
|
|
||
| ## Options | ||
|
|
||
| A native Fullsend target-plan interface could enforce a reusable multi-target | ||
| contract, but requires broader platform implementation. A CI matrix launches | ||
| jobs without supplying target discovery, durable accounting or tracker | ||
| reconciliation. An adapter can instead create target-specific trackers first | ||
| and reuse existing single-target dispatch and triage, accepting additional | ||
| investigation tickets before applicability is known. | ||
|
|
||
| ## Decision | ||
|
|
||
| Use tracker-first dispatch to assess each authorized source target through an | ||
| ordinary single-target Fullsend triage run. | ||
|
|
||
| A trusted workflow adapter resolves a bounded manifest of maintained targets | ||
| from reviewed domain mappings. It records the manifest revision, source and | ||
| policy identities, required targets and persistent dispatch/retry bounds in | ||
| the recovery journal. After current disclosure and target/action authorization | ||
| checks, it creates or reuses one investigation tracker per target. The initial | ||
| adapter uses Jira. Tracker identity combines the domain case and stable target | ||
| identity, such as repository, branch, component and product release; a new | ||
| source SHA identifies an attempt rather than a new ticket. Each ticket starts | ||
| with applicability unknown, not an affected verdict. A discovery assessment | ||
| is not a prerequisite for creating it. | ||
|
|
||
| The adapter populates the supported single-target intake from trusted mapping | ||
| and advisory data, then schedules triage through an authorized dispatch path. | ||
| A bot comment cannot impersonate a human command or bypass the harness actor | ||
| minimum. If no supported path can authorize triage, the tracker remains | ||
| visibly pending authorization. Each run verifies its actual origin, branch | ||
|
Comment on lines
+62
to
+66
Contributor
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. I couldn't find a path either. The Jira poller drops events from its own account, app accounts and automation-looking names ( In my testing a person started every run, and the experiment's trigger also wants a person to comment. That seems fine for a first version. Could the decision say so plainly: a person starts each run, and the adapter doesn't schedule yet? |
||
| and source revision against the selected intake; a release target must not | ||
| silently fall back to the default branch. The run owns its checkout, context, | ||
|
Comment on lines
+66
to
+68
Contributor
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. Agree with the rule, but nothing gives a run its branch today. The dispatch record has no ref ( So the pre-script has to fetch and check out the branch, as the experiment does and I did (code). That swapped out the run's own Could the ADR pick one: a ref on the dispatch (a core change), or the harness does it and must restore the checkout? |
||
| case artifacts and fresh assessment receipt. Distinct target trackers provide | ||
| separate subjects for existing concurrency controls; the adapter also enforces | ||
| case-wide bounds over scheduled and running attempts until their termination | ||
| is reconciled. | ||
|
|
||
| The adapter retains separate receipts for tracker publication, scheduling and | ||
| triage outcome, using the recovery work in #9253 for duplicate prevention, | ||
| ownership and ambiguous writes. Worker errors and uncertain or failed | ||
| assessments remain attached to the same investigation ticket for retry or | ||
| human action. They never become an affected finding or coding permission. | ||
| Ticket creation is a publication milestone, not successful assessment or case | ||
| completion. Every required target remains accounted for, including blocked, | ||
| unmapped, unscheduled or exhausted work; domain policy determines completion. | ||
|
|
||
| Changed mappings, source or policy invalidate dependent attempts and require | ||
| fresh source binding and triage. New required branches extend the manifest | ||
| and reopen accounting; existing target trackers are reused and consumed work | ||
| bounds do not silently reset. Domain mapping, Jira rendering and aggregate | ||
| accounting remain in the workflow adapter. This initial route introduces no | ||
| native Fullsend multi-target scheduler or plan/result API. Later platform | ||
|
Comment on lines
+86
to
+88
Contributor
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. Keeping the workflow generic is what we want, so I like this. Two things I'd add to the ADR:
Also, I have nothing for getting from a tracker to its repo and branch. Is the experiment's |
||
| support remains an option if independently justified by other consumers. | ||
|
|
||
| ## Forge scope | ||
|
|
||
| The initial tracker adapter uses Jira for GitHub, GitLab and Forgejo source | ||
| targets. Each enabled single-target execution path must verify source binding | ||
| and authorization for its forge; unsupported combinations stay blocked. | ||
| Distinct Jira tickets do not grant source-repository access. Other tracker | ||
| systems require an adapter with equivalent identity and recovery behavior. | ||
|
|
||
| ## Consequences | ||
|
|
||
| - Existing single-target dispatch and triage remain the worker interface. | ||
| - Investigation tickets become visible before applicability is known, | ||
| including targets later found not affected. | ||
| - The workflow adapter owns branch discovery, case-wide bounds, accounting | ||
| and tracker reconciliation, with durable recovery still required. | ||
| - Branch tickets isolate existing per-subject concurrency, but their creation | ||
| cannot establish complete target coverage or successful triage. | ||
| - Coding, merge and issue closure retain their existing authorization gates; | ||
| tracker-first dispatch grants none of those actions. | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,86 @@ | ||
| --- | ||
| title: Multi-target execution | ||
| --- | ||
|
|
||
| # Multi-target execution | ||
|
|
||
| One request may require checking several repositories or maintained branches. | ||
| Launching several CI jobs does not define which targets are required, what | ||
| authorizes each action or whether every result has been collected. | ||
|
|
||
| The [repository coordination model](agent-architecture.md#interaction-model-the-repo-as-coordinator) | ||
| keeps authority in repository-visible controls. The | ||
| [infrastructure discussion](agent-infrastructure.md) considers where workers | ||
| execute. Multiple targets need independent source and evidence identities, | ||
| without making branch discovery an authorization decision. | ||
|
|
||
| ## Failure cases | ||
|
|
||
| - Two branches share one subject identity and collide under its concurrency | ||
| key, causing one branch's work to cancel or coalesce another's. | ||
| - A result from one branch is accepted for another because both name the same | ||
| package or advisory. | ||
| - Several targets succeed while one never starts, yet the request is reported | ||
| complete. | ||
| - Discovery finds a branch that the originating actor cannot authorize. | ||
| - A mapping change adds a required target while old workers still run. | ||
| - A ticket is created before its acknowledgement is retained, and retrying | ||
| creates another ticket for the same branch. | ||
| - Creating all tickets is mistaken for successful assessment, or a failed | ||
| worker is described as an affected finding. | ||
|
|
||
| ## Options and trade-offs | ||
|
|
||
| ### Tracker-first dispatch | ||
|
|
||
| A trusted adapter creates or reuses one investigation ticket per authorized | ||
| source target, then invokes normal single-target triage. Existing workers and | ||
| per-subject concurrency remain reusable. Tickets become visible before an | ||
| applicability verdict, including targets later found not affected. The adapter | ||
| still owns complete discovery, case-wide bounds, recovery and aggregation. | ||
|
|
||
| ### Adapter-led workers before tracker creation | ||
|
|
||
| An adapter can dispatch independent assessment workers and create tickets only | ||
| after collecting results. This reduces unnecessary investigation tickets, but | ||
| needs a pre-tracker source/result contract and still owns durable coordination. | ||
| An uncertain or failed worker needs an explicit investigation handoff. | ||
|
|
||
| ### Fullsend-native multi-target execution | ||
|
|
||
| A host-admitted plan could give all consumers a reusable target, isolation and | ||
| collection contract. That requires a platform interface and conformance tests. | ||
| The value must justify its implementation rather than merely duplicating a | ||
| single consumer's adapter. | ||
|
|
||
| ### Handwritten CI matrices | ||
|
|
||
| Matrices launch isolated jobs with familiar infrastructure. They do not supply | ||
| maintained-target mapping, cross-run recovery or complete coverage accounting. | ||
| They can implement execution underneath an adapter, rather than replace one. | ||
|
|
||
| ## Decision and acceptance | ||
|
|
||
| [ADR 0167](../ADRs/0167-use-tracker-first-dispatch.md) chooses tracker-first | ||
| dispatch for the initial route. Durable recovery is a separate requirement | ||
| tracked in [#9253](https://github.com/fullsend-ai/fullsend/issues/9253). | ||
|
|
||
| Acceptance must demonstrate create/reuse before assessment, one branch per | ||
| tracker, authorized single-target triage with exact source binding, and | ||
| independent subjects for branches sharing one originating case. Inject lost | ||
| Jira acknowledgements, dispatch failure, uncertain results and worker loss. | ||
| Recovery must reuse the existing ticket and keep applicability unknown until | ||
| triage establishes a supported finding. Add a required branch during an old | ||
| attempt and verify accounting reopens without duplicating existing tickets or | ||
| resetting consumed work bounds. A ticket's existence cannot imply triage ran, | ||
| all targets were discovered or remediation completed. | ||
|
|
||
| ## Open questions | ||
|
|
||
| - Which supported dispatch path can authorize adapter-scheduled triage while | ||
| preserving the configured actor minimum and target permissions? | ||
| - Which existing single-target intake fields and checkout controls need an | ||
| adapter for each source forge? | ||
| - How should adapters expose incomplete or conflicting discovery coverage? | ||
| - How should target trackers record superseded attempts and operator retries | ||
| without losing earlier evidence or repeating ambiguous publications? |
Uh oh!
There was an error while loading. Please reload this page.
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.
I read "ordinary triage" as the stock agent, though in the experiment it is really a CVE assess harness registered as
triage. Two things from testing:triagemeans the repo loses regular triage, which adopting teams will still want.What worked was a separate agent that uses the triage role. Suggest "a single-target assessment harness that uses the triage role", here and at line 101.
I put that up as its own
cveagent in a draft ADR, #9309, so it would help if this one didn't assume thetriagename, let's discuss this some more.