Skip to content

ADR 0026: stage-based dispatch for agent workflow decoupling - #474

Merged
maruiz93 merged 2 commits into
fullsend-ai:mainfrom
maruiz93:adr-dispatch-architecture
May 4, 2026
Merged

ADR 0026: stage-based dispatch for agent workflow decoupling#474
maruiz93 merged 2 commits into
fullsend-ai:mainfrom
maruiz93:adr-dispatch-architecture

Conversation

@maruiz93

Copy link
Copy Markdown
Contributor

Summary

  • Proposes ADR 0026 documenting the dispatch-based architecture from PR Add dispatching to support easy adding/replacement of agents #390
  • Covers the decision to use repository_dispatch as an indirection layer between shim workflows and agent workflows, decoupling enrolled repos from the agent inventory
  • Presents two options: direct workflow_dispatch (status quo) vs dispatcher with repository_dispatch
  • Explicitly scopes out intra-stage orchestration (DAG semantics), deferring to ADR 0018

Relates to #335, PR #390

Test plan

🤖 Generated with Claude Code

@github-actions

github-actions Bot commented Apr 28, 2026

Copy link
Copy Markdown

Site preview

Preview: https://f86c3a71-site.fullsend-ai.workers.dev

Commit: 3f8812fb528ef312be74bd92829d7f2bb3b6d055

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

@fullsend-ai-review fullsend-ai-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Review: #474

Head SHA: d2b7e9f
Timestamp: 2026-04-28T00:00:00Z
Outcome: comment-only

Summary

This ADR is well-structured, accurately references the relevant prior decisions (ADRs 0008, 0009, 0018, 0020), and correctly documents the dispatch architecture from PR #390. The scope is appropriate — documentation only. Two minor style observations worth noting but neither blocks approval.

Findings

Medium

None

Low

  • [style/conventions] docs/ADRs/0026-repository-dispatch-for-agent-workflow-decoupling.md — Missing the freeze comment block from the ADR template. The template includes <!-- Once this ADR is Accepted, its content is frozen. ... --> after the Status section. Most ADRs in the repo include this comment. Consider adding it for consistency.
    Remediation: Add the freeze comment block after the ## Status / Proposed line, matching the template in 0000-adr-template.md.

  • [style/conventions] docs/ADRs/0026-repository-dispatch-for-agent-workflow-decoupling.md:32 — Minor punctuation: the sentence ending "every enrolled repo's shim must be updated and redeployed" is missing a period before the issue link parenthetical.
    Remediation: Add a period after "redeployed" (before the parenthetical link).

Info

  • [intent-alignment] PR #390 (the referenced implementation) is still open/unmerged. This is fine for a "Proposed" ADR but worth noting — the ADR and implementation should land in coordination.

Footer

Outcome: comment-only
This review applies to SHA d2b7e9f944b2a24493235fbabf79b134d2a91f67. Any push to the PR head clears this review and requires a new evaluation.

@ggallen

ggallen commented Apr 29, 2026

Copy link
Copy Markdown
Member

Implementation Divergence in PR #390

This ADR describes using repository_dispatch for the dispatcher-to-agent-workflow connection, but the actual implementation in PR #390 uses a different approach:

What ADR 0026 Describes:

# dispatch-agent.yml emits repository_dispatch
- uses: peter-evans/repository-dispatch@v2
  with:
    event-type: fullsend-triage
    
# Agent workflows subscribe
on:
  repository_dispatch:
    types: [fullsend-triage]

What PR #390 Implements:

# dispatch.yml scans for stage markers
workflow_stage=$(grep -E '^# fullsend-stage:' "$workflow" ...)

# dispatch.yml triggers via workflow_dispatch
gh workflow run "$workflow_name" \
  -f event_type="$EVENT_TYPE" \
  -f source_repo="$SOURCE_REPO"

# Agent workflows use workflow_dispatch
on:
  workflow_dispatch:
    inputs:
      event_type: ...

The implementation uses:

  • # fullsend-stage: <name> markers in workflow files
  • File scanning + gh workflow run for fan-out
  • workflow_dispatch triggers (not repository_dispatch)

Should the ADR be updated to match the implementation, or should the implementation be changed to use repository_dispatch as described in the ADR?

See comparison details in PR #390 comment.

@ggallen ggallen left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Review: ADR against PR #390 implementation

Approval conditional on fixing the title mismatch noted below.

PR #390 has been merged (2026-04-30). The ADR content accurately describes the implementation, but the title is incorrect.

Required change before merge

Title mismatch: The ADR filename and frontmatter title say "repository_dispatch for agent workflow decoupling" but the actual implementation uses workflow_dispatch, not repository_dispatch.

Evidence:

  • dispatch.yml uses on: workflow_dispatch: (line 5)
  • Option C (the chosen option) explicitly uses workflow_dispatch and gh workflow run
  • Option B uses repository_dispatch but was rejected

Fix needed: Update the filename and title to reflect workflow_dispatch, e.g.:

  • Filename: 0026-stage-based-dispatch-for-agent-workflow-decoupling.md
  • Title: "Stage-based dispatch for agent workflow decoupling" or similar

Content accuracy

The ADR content is correct:

  • ✅ Correctly describes Option C (stage-marker scanning with gh workflow run)
  • ✅ Correctly documents the # fullsend-stage: marker convention
  • ✅ Correctly notes that workflow_dispatch is the sole trigger model
  • ✅ Correctly describes the shim calling with a stage parameter
  • ✅ Accurately describes trade-offs vs Option B (repository_dispatch)

Additional note

ADR number 0026 may conflict with another pending ADR on branch fullsend-on-gitlab. If that merges first, this will need renumbering (the renumber-adr skill can help).

Minor style issues (optional)

The review bot noted two low-severity items that are optional:

  • Missing freeze comment block after Status section
  • Missing period after "redeployed" on line 32

Approval is conditional: Once the title/filename is updated to reflect workflow_dispatch (not repository_dispatch), this ADR will be ready to merge.

Rename file and title from "repository_dispatch" to "stage-based dispatch"
to match the actual implementation (Option C uses workflow_dispatch with
stage-marker scanning, not repository_dispatch). Mark status as Accepted
now that PR fullsend-ai#390 has merged.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@maruiz93
maruiz93 force-pushed the adr-dispatch-architecture branch from 3f8812f to 6c28ea0 Compare May 4, 2026 10:07
@maruiz93

maruiz93 commented May 4, 2026

Copy link
Copy Markdown
Contributor Author

@ggallen Addressed your review:

Skipped the freeze comment block per our convention for this repo. ADR number conflict with fullsend-on-gitlab — will use renumber-adr if needed.

@fullsend-ai-review

Copy link
Copy Markdown

Review: #474

Head SHA: 6c28ea0
Timestamp: 2026-05-04T00:00:00Z
Outcome: comment-only

Summary

This PR adds ADR 0026 documenting the dispatch architecture implemented in PR #390. The ADR is well-structured, presents three options with clear trade-offs, and the decision rationale for Option C (stage-marker scanning) is well-argued. There are no correctness, security, or injection concerns — this is a documentation-only change. Two medium findings are noted: the PR title references repository_dispatch which is the rejected option (Option B), and there is a minor frontmatter numbering inconsistency with an adjacent ADR.

Findings

Medium

  • [Intent alignment] PR title — The PR title is "ADR 0026: repository_dispatch for agent workflow decoupling" but the ADR's decision explicitly rejects repository_dispatch (Option B) in favor of stage-marker scanning (Option C). The ADR file title correctly reads "Stage-based dispatch for agent workflow decoupling." The PR title is misleading and could cause confusion when scanning git history or PR lists.
    Remediation: Update the PR title to match the ADR file title, e.g., "ADR 0026: Stage-based dispatch for agent workflow decoupling."

  • [Style/conventions] docs/ADRs/0026-stage-based-dispatch-for-agent-workflow-decoupling.md:1 — The frontmatter title field uses unpadded numbering ("26. Stage-based dispatch...") while the immediately preceding ADR 0025 uses zero-padded numbering ("0025. Provider-based...") and ADR 0024 also uses unpadded ("24. Harness definitions..."). The convention is inconsistent in the repo, but following whichever style is most recent (0025) would favor zero-padding.
    Remediation: Consider aligning with the most recent ADR's convention. Minor — no functional impact.

Info

Footer

Outcome: comment-only
This review applies to SHA 6c28ea073af8a7f04275effe06ab6513b31f1303. Any push to the PR head clears this review and requires a new evaluation.

@fullsend-ai-review fullsend-ai-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

See the review comment for full details.

@maruiz93 maruiz93 changed the title ADR 0026: repository_dispatch for agent workflow decoupling ADR 0026: stage-based dispatch for agent workflow decoupling May 4, 2026
@maruiz93
maruiz93 added this pull request to the merge queue May 4, 2026
Merged via the queue into fullsend-ai:main with commit 2494869 May 4, 2026
12 of 14 checks passed
@maruiz93
maruiz93 deleted the adr-dispatch-architecture branch May 4, 2026 11:40
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.

3 participants