From 273d2a8d60d39cb0d5f84a837d678783d6b9e013 Mon Sep 17 00:00:00 2001 From: eshulman2 Date: Tue, 10 Nov 2026 12:05:11 +0200 Subject: [PATCH 1/2] docs(adr): define authorized multi-target execution Signed-off-by: eshulman2 --- ...7-execute-authorized-multi-target-plans.md | 106 ++++++++++++++++++ docs/architecture.md | 6 + docs/problems/agent-architecture.md | 5 + docs/problems/agent-infrastructure.md | 6 + docs/problems/multi-target-execution.md | 72 ++++++++++++ 5 files changed, 195 insertions(+) create mode 100644 docs/ADRs/0167-execute-authorized-multi-target-plans.md create mode 100644 docs/problems/multi-target-execution.md diff --git a/docs/ADRs/0167-execute-authorized-multi-target-plans.md b/docs/ADRs/0167-execute-authorized-multi-target-plans.md new file mode 100644 index 0000000000..a3a3edfed1 --- /dev/null +++ b/docs/ADRs/0167-execute-authorized-multi-target-plans.md @@ -0,0 +1,106 @@ +--- +title: "167. Execute authorized multi-target plans" +status: Accepted +relates_to: + - multi-target-execution + - agent-architecture + - agent-infrastructure +topics: + - dispatch + - coordination + - authorization +--- + +# 167. Execute authorized multi-target plans + +Date: 2026-11-10 + +## Status + +Accepted + +## Context + +[ADR 0061](0061-harness-cel-dispatch.md) dispatches matching harnesses and +supports matrix output. These mechanisms can launch several jobs, but do not +define the complete authorized target set for one request, independent target +contexts or collection of every required result. Per-subject serialization +([ADR 0106](0106-serialize-agent-runs-and-coalesce-subsequent-events.md)) also +needs to distinguish target work that shares one originating event. + +The companion recovery proposal tracked in +[#9253](https://github.com/fullsend-ai/fullsend/issues/9253) addresses attempts +and external effects. Target expansion and +collection need their own boundary; see +[multi-target execution](../problems/multi-target-execution.md). This ADR aims to +execute a bounded, authorized target set without losing isolation or mistaking +partial results for complete coverage. + +## Options + +A handwritten CI matrix can launch jobs but leaves target identity and +collection rules to each workflow. A model-led coordinator can choose branches +and retries but cannot supply execution authority. A host-admitted execution +plan makes these boundaries explicit while reusing existing schedulers. + +## Decision + +Fullsend executes host-admitted, immutable multi-target plans to enforce +independent target execution and complete result accounting. + +A trusted adapter proposes the target set from reviewed domain data. Before +dispatch, the host freezes a versioned plan containing stable target/action +identities, required targets, repository and branch/component scope, immutable +source revisions, input and policy revisions, pinned worker definitions and +finite concurrency, target-count, attempt and execution-time bounds. Source +selection is separate from the trusted revision supplying harnesses and +plugins. Discovery and model output cannot expand execution permissions. + +The host checks the admitted actor's current access and each target action +under existing authorization and disclosure rules. A blocked target stays +visible and undispatched; it is not silently removed from required coverage. +Before launch, the host verifies the checkout against the admitted repository +and source revision. Every child receives a separate checkout, scoped context, +case store and artifact namespace, bound to its plan, target, action and attempt. Scheduling +and concurrency keys include the target operation identity, so distinct targets +sharing an event or tracker do not cancel or coalesce one another. Retries of +the same operation preserve its identity; durable ownership and external-effect +recovery are tracked in #9253. + +Existing dispatch and CI execution mechanisms launch the children under those +bounds. The host validates each result against its exact attempt and frozen +inputs before collecting it. Missing, invalid, failed, blocked and uncertain +results remain explicit. Collection is accounted for only when every required +target has a retained result or explicit terminal disposition; accounting is +distinct from successful assessment, publication and domain completion. A +failed or uncertain check may request investigation through an authorized +adapter without becoming an affected verdict or remediation permission. + +Changed source, mapping, policy or required targets produce a superseding plan +revision. The host stops new work under the old revision and rejects its stale +results and new publication admissions. Adding a required target reopens +collection. Reuse of prior evidence requires explicit revalidation under the +new plan; supersession never silently resets consumed work bounds. Domain +adapters define discovery, result meaning and completion policy. This decision +does not prescribe a new CLI, queue service or agent coordinator. + +## Forge scope + +The plan contract applies to GitHub, GitLab and Forgejo targets. Each enabled +dispatch backend must preserve target identity, authorization, isolation and +result binding; unsupported combinations are blocked explicitly. Cross-forge +plans require conformance from every participating backend. Jira may identify +the originating request without becoming execution authorization. + +## Consequences + +- One request can assess multiple branches independently while retaining the + exact source and scope used for each result. +- Existing matrix execution remains reusable, but rows and concurrency groups + must preserve admitted target identities. +- Partial collection stays visible and cannot imply complete coverage or + successful remediation. +- Domain adapters retain branch-discovery and assessment semantics while + Fullsend enforces execution boundaries. +- Implementation must define the versioned plan/result interface and prove + isolation, bounds and supersession before enabling multi-target execution. diff --git a/docs/architecture.md b/docs/architecture.md index b23239a26e..6fd3c508a9 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -609,6 +609,12 @@ The existing design principle is that [the repo is the coordinator](problems/age [ADR 0151](ADRs/0151-harness-human-role-minimums.md), [Authorization Contract v2](normative/authorization/v2/)). +- Decided, not yet implemented: host-admitted multi-target plans freeze target + scope, source revisions and finite execution bounds. Child scheduling keys + include the target operation identity, and collection accounts for every + required target independently of domain success + ([ADR 0167](ADRs/0167-execute-authorized-multi-target-plans.md)). + - Entity-source discovery (target state): `fullsend poll` combines admissible harness queries into one logical candidate search per source scope and routes possible matches locally. A bound `run` rechecks source-query membership diff --git a/docs/problems/agent-architecture.md b/docs/problems/agent-architecture.md index 80d7f4d206..f45a36478b 100644 --- a/docs/problems/agent-architecture.md +++ b/docs/problems/agent-architecture.md @@ -172,6 +172,11 @@ No agent orchestrates other agents. Each agent independently observes the state The "coordination logic" is the repository's branch protection configuration — not an LLM making judgment calls about when to proceed. +A request that spans several source targets needs an explicit coverage and +isolation boundary; see [multi-target execution](multi-target-execution.md). +[ADR 0167](../ADRs/0167-execute-authorized-multi-target-plans.md) chooses +host-admitted plans while preserving independent worker roles. + This principle aligns with what Yegge's Gas City project calls "Zero Framework Cognition" (ZFC): the orchestration layer should handle mechanics only, while all judgment is deferred to the LLM via prompts. Gas City enforces this with a testable invariant — "does any line of Go contain a judgment call? If yes, it's a violation" — and extends it with the Bitter Lesson test: anything a smarter model would handle better from the prompt doesn't belong in the framework. (See [landscape.md](../landscape.md#gas-town--gas-city).) Fullsend's repo-as-coordinator model naturally satisfies ZFC: branch protection rules, CODEOWNERS, and status checks are deterministic infrastructure. The judgment happens in the review and implementation agents, mediated through GitHub's existing mechanisms. Note the architectural distinction: Gas City *does* have a controller process (reconciliation, health patrol), but enforces that it contain zero cognition. Fullsend's model goes further by eliminating the controller entirely and using the forge's native mechanisms instead. [Forge-sdlc/forge](../landscape.md#forge-sdlcforge) is the useful contrast case. It uses an event-driven FastAPI/Redis/LangGraph worker and durable checkpoints to move work forward, which is operationally sensible, but it also centralizes workflow truth and treats Jira labels/comments as approval signals. Fullsend can borrow the event-driven resume mechanics without moving merge authority or intent authorization out of repository-visible controls. diff --git a/docs/problems/agent-infrastructure.md b/docs/problems/agent-infrastructure.md index ef5cfc305d..afd07a1897 100644 --- a/docs/problems/agent-infrastructure.md +++ b/docs/problems/agent-infrastructure.md @@ -93,6 +93,12 @@ Agents are often discussed as if they run on a developer workstation: fast local ACP may still be useful for **narrow experiments** where those constraints are acceptable; it does not, by itself, deliver the isolation depth, supply-chain posture, or “agent as first-class workload with the right capabilities” that we are trying to reach here. +Independent source targets also need isolated contexts and target-aware +scheduling keys. [Multi-target execution](multi-target-execution.md) explores +that boundary; +[ADR 0167](../ADRs/0167-execute-authorized-multi-target-plans.md) chooses +bounded host-admitted plans that reuse existing scheduling mechanisms. + ## Hybrid and incremental options - **Thin orchestration layer** — We build a small layer that triggers agents, gathers results, and posts status checks; the actual compute is 3rd party or internal. This keeps coordination logic in our control while deferring platform choice. diff --git a/docs/problems/multi-target-execution.md b/docs/problems/multi-target-execution.md new file mode 100644 index 0000000000..7a421d00a6 --- /dev/null +++ b/docs/problems/multi-target-execution.md @@ -0,0 +1,72 @@ +--- +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. Multi-target execution needs to preserve those boundaries while +keeping each worker's source and evidence independent. + +## Failure cases + +- Two branches share one event or tracker 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 source or mapping change adds a required target while old workers are + still running. +- Retrying or replacing a plan silently resets its consumed work bounds. + +## Options and trade-offs + +### Handwritten CI matrices + +Matrices can launch isolated jobs with familiar infrastructure. Each workflow +must still define target identity, authorization, limits, result binding and +coverage accounting. A matrix's successful exit is not proof that the intended +target set was complete. + +### Model-led coordination + +A model can interpret a request and propose source targets or investigation +steps. Its choices cannot grant execution permission, establish source identity +or replace deterministic accounting of missing work. + +### Host-admitted execution plans + +A trusted adapter can propose a target set for host validation. An immutable +plan can bind each child to source, scope and policy while reusing existing +dispatch mechanisms. This needs a versioned interface and conformance tests; +it does not itself provide durable ownership or external-write recovery. + +## Decision and acceptance + +[ADR 0167](../ADRs/0167-execute-authorized-multi-target-plans.md) chooses +host-admitted execution plans. Durable recovery remains a separate proposal +tracked in [#9253](https://github.com/fullsend-ai/fullsend/issues/9253). + +Acceptance must include distinct branches sharing one event, a wrong-target +result, exhausted and missing children, and a new plan adding a required branch +while an old worker is still alive. Every required target stays visible. +Complete accounting remains distinct from successful assessment, publication +and domain completion. A domain adapter may request investigation after +failure without turning it into an affected verdict or coding permission. + +## Open questions + +- Which existing dispatch interfaces can carry the admitted plan and child + identities without introducing a second scheduler? +- What versioned plan/result schema and backend conformance tests are needed? +- How should adapters report incomplete or conflicting discovery coverage? +- Which evidence can be reused after a plan changes, and what revalidation + must precede acceptance? From cc821e89e4c6820c25194b47a7f0165abb250b80 Mon Sep 17 00:00:00 2001 From: eshulman2 Date: Tue, 10 Nov 2026 16:19:27 +0200 Subject: [PATCH 2/2] docs(adr): use tracker-first dispatch for multiple targets Signed-off-by: eshulman2 --- ...7-execute-authorized-multi-target-plans.md | 106 ----------------- docs/ADRs/0167-use-tracker-first-dispatch.md | 109 ++++++++++++++++++ docs/architecture.md | 11 +- docs/problems/agent-architecture.md | 5 +- docs/problems/agent-infrastructure.md | 5 +- docs/problems/multi-target-execution.md | 82 +++++++------ 6 files changed, 169 insertions(+), 149 deletions(-) delete mode 100644 docs/ADRs/0167-execute-authorized-multi-target-plans.md create mode 100644 docs/ADRs/0167-use-tracker-first-dispatch.md diff --git a/docs/ADRs/0167-execute-authorized-multi-target-plans.md b/docs/ADRs/0167-execute-authorized-multi-target-plans.md deleted file mode 100644 index a3a3edfed1..0000000000 --- a/docs/ADRs/0167-execute-authorized-multi-target-plans.md +++ /dev/null @@ -1,106 +0,0 @@ ---- -title: "167. Execute authorized multi-target plans" -status: Accepted -relates_to: - - multi-target-execution - - agent-architecture - - agent-infrastructure -topics: - - dispatch - - coordination - - authorization ---- - -# 167. Execute authorized multi-target plans - -Date: 2026-11-10 - -## Status - -Accepted - -## Context - -[ADR 0061](0061-harness-cel-dispatch.md) dispatches matching harnesses and -supports matrix output. These mechanisms can launch several jobs, but do not -define the complete authorized target set for one request, independent target -contexts or collection of every required result. Per-subject serialization -([ADR 0106](0106-serialize-agent-runs-and-coalesce-subsequent-events.md)) also -needs to distinguish target work that shares one originating event. - -The companion recovery proposal tracked in -[#9253](https://github.com/fullsend-ai/fullsend/issues/9253) addresses attempts -and external effects. Target expansion and -collection need their own boundary; see -[multi-target execution](../problems/multi-target-execution.md). This ADR aims to -execute a bounded, authorized target set without losing isolation or mistaking -partial results for complete coverage. - -## Options - -A handwritten CI matrix can launch jobs but leaves target identity and -collection rules to each workflow. A model-led coordinator can choose branches -and retries but cannot supply execution authority. A host-admitted execution -plan makes these boundaries explicit while reusing existing schedulers. - -## Decision - -Fullsend executes host-admitted, immutable multi-target plans to enforce -independent target execution and complete result accounting. - -A trusted adapter proposes the target set from reviewed domain data. Before -dispatch, the host freezes a versioned plan containing stable target/action -identities, required targets, repository and branch/component scope, immutable -source revisions, input and policy revisions, pinned worker definitions and -finite concurrency, target-count, attempt and execution-time bounds. Source -selection is separate from the trusted revision supplying harnesses and -plugins. Discovery and model output cannot expand execution permissions. - -The host checks the admitted actor's current access and each target action -under existing authorization and disclosure rules. A blocked target stays -visible and undispatched; it is not silently removed from required coverage. -Before launch, the host verifies the checkout against the admitted repository -and source revision. Every child receives a separate checkout, scoped context, -case store and artifact namespace, bound to its plan, target, action and attempt. Scheduling -and concurrency keys include the target operation identity, so distinct targets -sharing an event or tracker do not cancel or coalesce one another. Retries of -the same operation preserve its identity; durable ownership and external-effect -recovery are tracked in #9253. - -Existing dispatch and CI execution mechanisms launch the children under those -bounds. The host validates each result against its exact attempt and frozen -inputs before collecting it. Missing, invalid, failed, blocked and uncertain -results remain explicit. Collection is accounted for only when every required -target has a retained result or explicit terminal disposition; accounting is -distinct from successful assessment, publication and domain completion. A -failed or uncertain check may request investigation through an authorized -adapter without becoming an affected verdict or remediation permission. - -Changed source, mapping, policy or required targets produce a superseding plan -revision. The host stops new work under the old revision and rejects its stale -results and new publication admissions. Adding a required target reopens -collection. Reuse of prior evidence requires explicit revalidation under the -new plan; supersession never silently resets consumed work bounds. Domain -adapters define discovery, result meaning and completion policy. This decision -does not prescribe a new CLI, queue service or agent coordinator. - -## Forge scope - -The plan contract applies to GitHub, GitLab and Forgejo targets. Each enabled -dispatch backend must preserve target identity, authorization, isolation and -result binding; unsupported combinations are blocked explicitly. Cross-forge -plans require conformance from every participating backend. Jira may identify -the originating request without becoming execution authorization. - -## Consequences - -- One request can assess multiple branches independently while retaining the - exact source and scope used for each result. -- Existing matrix execution remains reusable, but rows and concurrency groups - must preserve admitted target identities. -- Partial collection stays visible and cannot imply complete coverage or - successful remediation. -- Domain adapters retain branch-discovery and assessment semantics while - Fullsend enforces execution boundaries. -- Implementation must define the versioned plan/result interface and prove - isolation, bounds and supersession before enabling multi-target execution. diff --git a/docs/ADRs/0167-use-tracker-first-dispatch.md b/docs/ADRs/0167-use-tracker-first-dispatch.md new file mode 100644 index 0000000000..95628a187b --- /dev/null +++ b/docs/ADRs/0167-use-tracker-first-dispatch.md @@ -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 +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, +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 +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. diff --git a/docs/architecture.md b/docs/architecture.md index 6fd3c508a9..db5683ad76 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -609,11 +609,12 @@ The existing design principle is that [the repo is the coordinator](problems/age [ADR 0151](ADRs/0151-harness-human-role-minimums.md), [Authorization Contract v2](normative/authorization/v2/)). -- Decided, not yet implemented: host-admitted multi-target plans freeze target - scope, source revisions and finite execution bounds. Child scheduling keys - include the target operation identity, and collection accounts for every - required target independently of domain success - ([ADR 0167](ADRs/0167-execute-authorized-multi-target-plans.md)). +- Decided, not yet implemented: tracker-first dispatch creates or reuses one + investigation tracker per authorized source target before running ordinary + single-target triage. A workflow adapter owns discovery, durable recovery, + case-wide bounds and complete target accounting; the initial route adds no + native multi-target runner interface + ([ADR 0167](ADRs/0167-use-tracker-first-dispatch.md)). - Entity-source discovery (target state): `fullsend poll` combines admissible harness queries into one logical candidate search per source scope and routes diff --git a/docs/problems/agent-architecture.md b/docs/problems/agent-architecture.md index f45a36478b..859ea8d333 100644 --- a/docs/problems/agent-architecture.md +++ b/docs/problems/agent-architecture.md @@ -174,8 +174,9 @@ The "coordination logic" is the repository's branch protection configuration — A request that spans several source targets needs an explicit coverage and isolation boundary; see [multi-target execution](multi-target-execution.md). -[ADR 0167](../ADRs/0167-execute-authorized-multi-target-plans.md) chooses -host-admitted plans while preserving independent worker roles. +[ADR 0167](../ADRs/0167-use-tracker-first-dispatch.md) chooses one target +tracker before ordinary triage, preserving independent worker roles while an +adapter retains case-wide coordination. This principle aligns with what Yegge's Gas City project calls "Zero Framework Cognition" (ZFC): the orchestration layer should handle mechanics only, while all judgment is deferred to the LLM via prompts. Gas City enforces this with a testable invariant — "does any line of Go contain a judgment call? If yes, it's a violation" — and extends it with the Bitter Lesson test: anything a smarter model would handle better from the prompt doesn't belong in the framework. (See [landscape.md](../landscape.md#gas-town--gas-city).) Fullsend's repo-as-coordinator model naturally satisfies ZFC: branch protection rules, CODEOWNERS, and status checks are deterministic infrastructure. The judgment happens in the review and implementation agents, mediated through GitHub's existing mechanisms. Note the architectural distinction: Gas City *does* have a controller process (reconciliation, health patrol), but enforces that it contain zero cognition. Fullsend's model goes further by eliminating the controller entirely and using the forge's native mechanisms instead. diff --git a/docs/problems/agent-infrastructure.md b/docs/problems/agent-infrastructure.md index afd07a1897..c3d96ad11f 100644 --- a/docs/problems/agent-infrastructure.md +++ b/docs/problems/agent-infrastructure.md @@ -96,8 +96,9 @@ ACP may still be useful for **narrow experiments** where those constraints are a Independent source targets also need isolated contexts and target-aware scheduling keys. [Multi-target execution](multi-target-execution.md) explores that boundary; -[ADR 0167](../ADRs/0167-execute-authorized-multi-target-plans.md) chooses -bounded host-admitted plans that reuse existing scheduling mechanisms. +[ADR 0167](../ADRs/0167-use-tracker-first-dispatch.md) chooses target-specific +trackers and existing single-target triage; an adapter retains case-wide bounds +and recovery rather than requiring a native multi-target scheduler. ## Hybrid and incremental options diff --git a/docs/problems/multi-target-execution.md b/docs/problems/multi-target-execution.md index 7a421d00a6..7c27a1789f 100644 --- a/docs/problems/multi-target-execution.md +++ b/docs/problems/multi-target-execution.md @@ -11,62 +11,76 @@ 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. Multi-target execution needs to preserve those boundaries while -keeping each worker's source and evidence independent. +execute. Multiple targets need independent source and evidence identities, +without making branch discovery an authorization decision. ## Failure cases -- Two branches share one event or tracker and collide under its concurrency +- 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 source or mapping change adds a required target while old workers are - still running. -- Retrying or replacing a plan silently resets its consumed work bounds. +- 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 -### Handwritten CI matrices +### 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. -Matrices can launch isolated jobs with familiar infrastructure. Each workflow -must still define target identity, authorization, limits, result binding and -coverage accounting. A matrix's successful exit is not proof that the intended -target set was complete. +### Adapter-led workers before tracker creation -### Model-led coordination +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. -A model can interpret a request and propose source targets or investigation -steps. Its choices cannot grant execution permission, establish source identity -or replace deterministic accounting of missing work. +### Fullsend-native multi-target execution -### Host-admitted execution plans +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 -A trusted adapter can propose a target set for host validation. An immutable -plan can bind each child to source, scope and policy while reusing existing -dispatch mechanisms. This needs a versioned interface and conformance tests; -it does not itself provide durable ownership or external-write recovery. +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-execute-authorized-multi-target-plans.md) chooses -host-admitted execution plans. Durable recovery remains a separate proposal +[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 include distinct branches sharing one event, a wrong-target -result, exhausted and missing children, and a new plan adding a required branch -while an old worker is still alive. Every required target stays visible. -Complete accounting remains distinct from successful assessment, publication -and domain completion. A domain adapter may request investigation after -failure without turning it into an affected verdict or coding permission. +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 existing dispatch interfaces can carry the admitted plan and child - identities without introducing a second scheduler? -- What versioned plan/result schema and backend conformance tests are needed? -- How should adapters report incomplete or conflicting discovery coverage? -- Which evidence can be reused after a plan changes, and what revalidation - must precede acceptance? +- 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?