Skip to content

docs(adr): define multi-target execution, recovery and Pi tools - #9252

Closed
eshulman2 wants to merge 1 commit into
fullsend-ai:mainfrom
eshulman2:docs/cve-intake-durable-workers
Closed

eshulman2 wants to merge 1 commit into
fullsend-ai:mainfrom
eshulman2:docs/cve-intake-durable-workers

Conversation

@eshulman2

@eshulman2 eshulman2 commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Updated proposal branch: ADR 0167 and its linked-document updates are published in commit 5157f7a0a on the same head branch. GitHub keeps this closed PR's diff pinned to its original commit, so its Files tab currently contains ADRs 0165/0166. The updated branch contains all three proposals. Reopening remains subject to the contributor vouch gate.

Summary

Branch-specific assessment workers need to survive host loss and publish investigation work after an inconclusive or failed check. Today a Pi extension can load while its declared native tool is dropped by strict tool translation, and existing poll/concurrency state does not reserve an operation across dispatch, execution and publication.

The updated design branch records three focused decisions needed by that consumer: repository-owned operation journals (ADR 0165), exact selection of vetted Pi extension tools (ADR 0166), and authorized multi-target execution plans (ADR 0167). Each ADR records one decision. Implementation remains separate.

Related Issue

Implementation follow-ups: #9253 (operation journal and recovery), #9254 (exact native Pi extension tools), and #9260 (authorized multi-target execution).

Follows the existing plugin boundary in ADR 0094, per-subject serialization in ADR 0106 and shared poll state in ADR 0132. Related work: #8225 / #8226 / #8228 for runtime-workflow packaging and launch; #9179 for MCP tool selection and child permission intersection. This PR does not replace those changes.

Changes

  • Freeze and authorize a complete multi-target execution plan; isolate each child, use target-aware scheduling/concurrency keys, enforce finite execution bounds and collect every required target independently of domain success. Superseding a plan invalidates stale work without resetting consumed bounds.
  • Choose repository-scoped conditional state updates, attempt ownership generations and separate scheduling, worker and publication receipts; short-lived reconcilers reuse existing schedulers.
  • Preserve pending work across ambiguous scheduler acknowledgements and reconcile external writes before retrying; an empty eventually consistent search cannot prove a create failed.
  • Require exact native Pi tool selection without granting sibling tools, default tools, shell access or publication authority; missing names fail before inference.
  • Add a problem document with alternatives and fault-test acceptance, and update the architecture and related living documents. No ADR already accepted on main is rewritten; the unmerged ADR 0165 now references ADR 0167 for dispatch and collection semantics.
  • Keep CVE/package mapping, Jira payloads and assessment semantics in adapters. A branch investigation ticket after worker failure is not an affected verdict, coding authorization or proof of remediation.

The recovery contract covers GitHub, GitLab and Forgejo, with each backend disabled until it demonstrates conformance. Jira issue properties cannot substitute for conditional journal updates. Native Pi tool selection is forge-neutral.

Current-behavior evidence

Inspected baseline: 96e0c43384dfbd1d57b80711ff75a3b74b753156.

  • piToolsFor: translates the known built-ins and drops otherwise unsupported exact tool names.
  • PiRuntime.Bootstrap: uploads vetted harness Pi extensions separately from tool translation.
  • fullsend-hooks.js: already preserves an extension's native name when no built-in hook mapping exists.
  • jirapoll.Run: documents the downstream scheduling-acknowledgement gap on the shell dispatch path; the output-driver path still allows duplicate accepted dispatches after partial failure.
  • poll/state.go: existing signed CAS poll state is credited as precedent, not treated as an operation reservation or publication journal.
  • internal/cli/run.go: validation and post-script handling belong to one invocation; this decision adds cross-invocation receipts rather than claiming those hooks are absent.

Additional dispatch evidence at baseline 7455751ecb9446953527dbf73b4e379ea5442cb0:

Testing

  • Staged make lint passes, including ADR status/number/frontmatter checks, offline Markdown links, secret scanning and the pinned Semgrep scan.
  • git diff --check passes.
  • Documentation only: no runtime, scheduler, API or forge behavior changes, and no live worker or Jira acceptance is claimed.

Checklist

  • PR title follows Conventional Commits.
  • Human-directed commit has DCO sign-off.
  • I wrote this contribution myself and can explain all changes in it.

Prepared with coding-agent assistance; the contributor can assess the personal-authorship attestation above.

Signed-off-by: eshulman2 <ellashulman1@gmail.com>
@eshulman2
eshulman2 requested a review from a team as a code owner November 10, 2026 07:28
@github-actions github-actions Bot closed this Nov 10, 2026
@github-actions

Copy link
Copy Markdown

Thank you for your interest in contributing to fullsend, @eshulman2.

This project uses a vouch system for first-time contributors. Before submitting a pull request, you need to be vouched by a maintainer.

To get vouched:

  1. Open a Vouch Request discussion.
  2. Describe what you want to change and why.
  3. Write in your own words — do not have an AI generate the request.
  4. A maintainer will comment /vouch if approved.
  5. Once vouched, open a new PR (preferred) or reopen this one.

See CONTRIBUTING.md for details.

@github-actions

Copy link
Copy Markdown

E2E tests did not run

E2E tests run automatically for pull requests authored by users with write access or higher.

For other contributors, someone with write access must add the ok-to-test label after the latest push.

Reason: unauthorized

See E2E testing guide for details.

@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Define durable work recovery and strict Pi extension tool selection

📝 Documentation 🕐 20-40 Minutes

Grey Divider

AI Description

• Adopt repository-owned journals to recover admitted work across dispatch, execution, and
 publication failures.
• Require exact selection of vetted Pi extension tools without widening agent permissions.
• Document failure cases, acceptance criteria, and implementation boundaries; no runtime behavior
 changes yet.
Diagram

graph TD
  D["Host dispatcher"] --> J[("Forge journal")] --> R["Reconciler"] --> W["Worker"] --> PI["Pi runner"] --> T["Vetted tools"]
  R --> P["Publication adapter"] --> E["External system"]
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Integration-owned recovery databases
  • ➕ Allow each integration to tailor its storage and recovery protocol.
  • ➖ Duplicate ownership, authorization, and publication-reconciliation controls across integrations.
2. Mandatory durable workflow service
  • ➕ Provides centralized timers, retries, and ownership management.
  • ➖ Adds an operated dependency and still cannot make external publication atomic.
3. Hardcode extension tools in built-in translation
  • ➕ Keeps tool-name resolution in one existing translation path.
  • ➖ Couples independently versioned extensions to runner releases.

Recommendation: Keep the two decisions separate as proposed. Repository-owned journals fit the existing repo-as-coordinator model, while exact resolution against vetted extensions preserves strict tool permissions. Implementation should remain gated on forge conditional-write and recovery tests, plus real-Pi permission-denial tests.

Files changed (9) +306 / -1

Documentation (9) +306 / -1
0165-recover-work-through-repository-owned-operation-journals.mdDecide on repository-owned journals for recoverable work +100/-0

Decide on repository-owned journals for recoverable work

• Adopts conditional forge state updates, ownership generations, and separate scheduling, worker, and publication receipts. Defines reconciliation of ambiguous writes, trust boundaries, and backend conformance gates while leaving implementation for follow-up.

docs/ADRs/0165-recover-work-through-repository-owned-operation-journals.md

0166-select-pi-extension-tools-without-widening-access.mdDecide on exact Pi extension tool selection +74/-0

Decide on exact Pi extension tool selection

• Requires exact native tool names to resolve against vetted extensions and missing or ambiguous selections to fail before inference. Keeps effective tool sets explicit, including empty sets, and preserves hook and child permission limits.

docs/ADRs/0166-select-pi-extension-tools-without-widening-access.md

architecture.mdRecord both decisions in the living architecture +12/-1

Record both decisions in the living architecture

• Adds the planned Pi tool-selection and operation-journal contracts. Clarifies that the journal decision does not settle adapter implementation or external-system guarantees.

docs/architecture.md

agent-architecture.mdConnect agent coordination to recovery and tool permissions +10/-0

Connect agent coordination to recovery and tool permissions

• Links cross-host recovery to the repository coordination model and identifies the Pi extension tool boundary. Notes that implementation of both decisions remains outstanding.

docs/problems/agent-architecture.md

agent-infrastructure.mdAdd durable ownership to infrastructure considerations +6/-0

Add durable ownership to infrastructure considerations

• Identifies external-effect reconciliation as a requirement when workers restart and points to the journal decision. Leaves backend implementation and operational acceptance open.

docs/problems/agent-infrastructure.md

cross-run-memory.mdSeparate mechanical recovery from learning across runs +5/-0

Separate mechanical recovery from learning across runs

• Clarifies that an operation journal retains attempts and work bounds but does not decide whether a different model strategy will succeed.

docs/problems/cross-run-memory.md

durable-work-recovery.mdDefine recovery failures, trade-offs, and acceptance tests +88/-0

Define recovery failures, trade-offs, and acceptance tests

• Documents lost acknowledgements, overlapping hosts, expired ownership, partial child work, and ambiguous external writes. Compares recovery approaches and sets fault-test expectations and open implementation questions.

docs/problems/durable-work-recovery.md

operational-observability.mdDistinguish receipts from execution traces +5/-0

Distinguish receipts from execution traces

• Explains why traces alone cannot establish the outcome of an unacknowledged external write and links operators to separate recovery receipts.

docs/problems/operational-observability.md

security-threat-model.mdDocument least-privilege Pi extension selection +6/-0

Document least-privilege Pi extension selection

• States that selecting one vetted extension tool must not enable sibling or default tools. Links the requirement to exact names and consistent hook and child permissions.

docs/problems/security-threat-model.md

@qodo-code-review

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 🔗 Cross-repo conflicts (0) 📜 Skill insights (3)

Grey Divider


Remediation recommended

1. Living-doc edits reach documents outside the ADR's problem areas 📜 Skill insight ≡ Correctness
Description
The PR adds durable-work-recovery backlink paragraphs to docs/problems/cross-run-memory.md and
docs/problems/operational-observability.md, but neither file is in ADR 0165's relates_to list
(durable-work-recovery, agent-architecture, agent-infrastructure). The rule asks that
living-document changes stay within the ADR's problem areas, and these two additions are cross-links
to the new durable-work-recovery doc rather than edits to a relates_to area. A reviewer reading ADR
0165 alone would not expect these two files to change, so the decision's scope becomes harder to
audit.
Code

docs/problems/cross-run-memory.md[R89-92]

+Recovering scheduling ownership and ambiguous external writes is a separate
+mechanical problem; see [durable work recovery](durable-work-recovery.md).
+Its operation journal retains attempts and work bounds without deciding
+whether another model approach is likely to succeed.
Relevance

●● Moderate

No precedent on relates_to scope mismatch; the cross-link edits are plausible living-doc updates, so
the team's view is unclear.

PR-#9027

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
ADR 0165 declares relates_to of durable-work-recovery, agent-architecture and agent-infrastructure.
The PR also modifies cross-run-memory.md (backlink paragraph at lines 89-92) and
operational-observability.md (backlink paragraph at lines 50-53), neither of which appears in that
list.

docs/ADRs/0165-recover-work-through-repository-owned-operation-journals.md[1-10]
docs/problems/cross-run-memory.md[89-92]
docs/problems/operational-observability.md[50-53]
Skill: writing-adrs

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The PR edits `docs/problems/cross-run-memory.md` and `docs/problems/operational-observability.md` alongside ADR 0165, but neither document is in the ADR's `relates_to` list, so the living-document changes exceed the ADR's declared problem areas.

## Fix Focus Areas
- docs/problems/cross-run-memory.md[89-92]
- docs/problems/operational-observability.md[50-53]
- docs/ADRs/0165-recover-work-through-repository-owned-operation-journals.md[1-10]

## Recommended Fix
Either add `cross-run-memory` and `operational-observability` to ADR 0165's `relates_to` if the cross-links are intended, or remove those two backlink paragraphs from this PR and keep the ADR's living-document edits to `architecture.md`, `agent-architecture.md` and `agent-infrastructure.md`.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Dismiss ↗ | View ↗


2. ADR does not link the Pi tool-dropping behavior it describes 📜 Skill insight ⚙ Maintainability
Description
The Context section of ADR 0166 states as current behavior that the Pi runner drops declared
extension tool names, so an extension can load while its tool cannot be selected. The paragraph
links ADR 0094 and #9179, but neither introduces the translation behavior: ADR 0094 covers extension
admission and #9179 covers MCP patterns. A reader cannot trace when or why the dropping behavior was
introduced, and the PR description's pinned-commit evidence does not substitute for that provenance
link in the ADR itself.
Code

docs/ADRs/0166-select-pi-extension-tools-without-widening-access.md[R24-26]

+through trusted harness resources. The Pi runner translates built-in agent
+tool names, but drops other declared names. An extension can therefore load
+while its tool cannot be selected by a strict agent allowlist.
Relevance

●● Moderate

No direct precedent on missing provenance links; a related commit-pinned-evidence suggestion on an
ADR was rejected, but it is only loosely similar.

PR-#9186

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The ADR's current-behavior claim about dropped Pi extension tool names is cited only to ADR 0094 and
#9179, which do not introduce the translation behavior, so no introducing PR, issue or ADR is linked
for it.

docs/ADRs/0166-select-pi-extension-tools-without-widening-access.md[23-29]
Skill: writing-adrs

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

Issue description
ADR 0166 Context states that the Pi runner drops declared extension tool names, but it links only ADR 0094 and #9179, neither of which introduces that translation behavior. Current-behavior descriptions need a link to the PR, issue or ADR that introduced them.

Fix Focus Areas
- docs/ADRs/0166-select-pi-extension-tools-without-widening-access.md[23-29]

Recommended Fix
Identify the PR, issue or ADR that introduced `piToolsFor` dropping unmapped exact tool names, and add that link to the Context paragraph next to the current-behavior sentence. If no such record exists, state that explicitly in the ADR so the provenance gap is visible.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Dismiss ↗ | View ↗



Informational

3. ADR 0165 bundles several decisions into one record 📜 Skill insight ⚙ Maintainability
Description
The Decision section of ADR 0165 combines journal adoption with the publication-adapter
reconciliation protocol, the lease and ownership-generation rules, the forge enablement policy
(GitHub first, GitLab and Forgejo disabled until conformance) and the Jira write exclusion. Each of
these is a separate, independently accepted or rejected choice, and the PR description says each ADR
records one decision, so a reviewer cannot accept or revisit one of them without the others.
Code

docs/ADRs/0165-recover-work-through-repository-owned-operation-journals.md[R44-47]

+Fullsend adopts repository-owned operation journals to recover work across
+dispatch, execution and publication.
+
+The trusted host records work before dispatch in repository-scoped forge
Relevance

● Weak

Same bundling critique on ADR 0146 was explicitly dismissed by the author as intentional
(2026-11-06), a close, recent precedent.

PR-#8679

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The Decision section for ADR 0165 contains multiple distinct decisions: the repository-owned journal
(lines 47-53), the lease and generation fencing and publication-adapter protocol (lines 55-68), and
the forge scope with the Jira exclusion (lines 83-88). The ADR is one record covering all of them.

docs/ADRs/0165-recover-work-through-repository-owned-operation-journals.md[44-88]
Skill: writing-adrs

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
ADR 0165 (`docs/ADRs/0165-recover-work-through-repository-owned-operation-journals.md`) records several independent decisions in one `Decision` section: adopting a repository-owned journal, the publication reconciliation protocol, the lease and generation rules, the forge enablement policy, and the Jira write exclusion. The compliance rule requires each ADR to record exactly one decision.

## Fix Focus Areas
- docs/ADRs/0165-recover-work-through-repository-owned-operation-journals.md[44-88]

## Recommended Fix
Keep only the journal adoption decision in ADR 0165. Move the publication reconciliation protocol, the ownership-generation rules and the forge enablement policy into separate ADRs, each with its own Context, Options, Decision and Consequences. Update the cross-references in `docs/architecture.md` and the problem doc `docs/problems/durable-work-recovery.md` to point to the new records.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Dismiss ↗ | View ↗


Grey Divider

Context sources
✅ Linked PRs:
  🌐 PR #8225
  🌐 PR #8226
  🌐 PR #8228
✅ Compliance rules (platform): 96 rules
✅ Skills: 5 invoked
  writing-user-docs
  writing-adrs
  check-patch-coverage
  cutting-releases
  adr-corner
✅ Cross-repo context — repo relationships
  Explored: repo: fullsend-ai/agents (sha: 82226d2a) — View relationship
✅ REVIEW.md
Review mode: Auto: ⚖️ Balanced: Markdown-only, but normative ADRs set security and tool-permission contracts.

Grey Divider

Tip of the day
💡 Did you know, you can move or hide resolved findings to focus on what still needs action

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

Comment on lines +89 to +92
Recovering scheduling ownership and ambiguous external writes is a separate
mechanical problem; see [durable work recovery](durable-work-recovery.md).
Its operation journal retains attempts and work bounds without deciding
whether another model approach is likely to succeed.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remediation recommended

1. Living-doc edits reach documents outside the adr's problem areas 📜 Skill insight ≡ Correctness

The PR adds durable-work-recovery backlink paragraphs to docs/problems/cross-run-memory.md and
docs/problems/operational-observability.md, but neither file is in ADR 0165's relates_to list
(durable-work-recovery, agent-architecture, agent-infrastructure). The rule asks that
living-document changes stay within the ADR's problem areas, and these two additions are cross-links
to the new durable-work-recovery doc rather than edits to a relates_to area. A reviewer reading ADR
0165 alone would not expect these two files to change, so the decision's scope becomes harder to
audit.
Agent Prompt
## Issue description
The PR edits `docs/problems/cross-run-memory.md` and `docs/problems/operational-observability.md` alongside ADR 0165, but neither document is in the ADR's `relates_to` list, so the living-document changes exceed the ADR's declared problem areas.

## Fix Focus Areas
- docs/problems/cross-run-memory.md[89-92]
- docs/problems/operational-observability.md[50-53]
- docs/ADRs/0165-recover-work-through-repository-owned-operation-journals.md[1-10]

## Recommended Fix
Either add `cross-run-memory` and `operational-observability` to ADR 0165's `relates_to` if the cross-links are intended, or remove those two backlink paragraphs from this PR and keep the ADR's living-document edits to `architecture.md`, `agent-architecture.md` and `agent-infrastructure.md`.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Dismiss ↗ | View ↗

Comment on lines +24 to +26
through trusted harness resources. The Pi runner translates built-in agent
tool names, but drops other declared names. An extension can therefore load
while its tool cannot be selected by a strict agent allowlist.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remediation recommended

2. Adr does not link the pi tool-dropping behavior it describes 📜 Skill insight ⚙ Maintainability

The Context section of ADR 0166 states as current behavior that the Pi runner drops declared
extension tool names, so an extension can load while its tool cannot be selected. The paragraph
links ADR 0094 and #9179, but neither introduces the translation behavior: ADR 0094 covers extension
admission and #9179 covers MCP patterns. A reader cannot trace when or why the dropping behavior was
introduced, and the PR description's pinned-commit evidence does not substitute for that provenance
link in the ADR itself.
Agent Prompt
Issue description
ADR 0166 Context states that the Pi runner drops declared extension tool names, but it links only ADR 0094 and #9179, neither of which introduces that translation behavior. Current-behavior descriptions need a link to the PR, issue or ADR that introduced them.

Fix Focus Areas
- docs/ADRs/0166-select-pi-extension-tools-without-widening-access.md[23-29]

Recommended Fix
Identify the PR, issue or ADR that introduced `piToolsFor` dropping unmapped exact tool names, and add that link to the Context paragraph next to the current-behavior sentence. If no such record exists, state that explicitly in the ADR so the provenance gap is visible.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Dismiss ↗ | View ↗

@eshulman2 eshulman2 changed the title docs(adr): define recoverable work and strict Pi extension tools docs(adr): define multi-target execution, recovery and Pi tools Nov 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant