Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .github/workflows/reusable-dispatch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,9 @@ jobs:
fi
;;
/fs-review)
Comment thread
ifireball marked this conversation as resolved.
Resolved
Comment thread
ifireball marked this conversation as resolved.
Resolved
Comment thread
ifireball marked this conversation as resolved.
Resolved
Comment thread
ifireball marked this conversation as resolved.
Resolved
Comment thread
ifireball marked this conversation as resolved.
Resolved

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[low] silent-skip

When /fs-review is issued on an issue without a linked PR, STAGE remains empty and the workflow silently skips dispatch. The user receives no feedback. This is consistent with existing patterns (/fs-code silently skips when ISSUE_IS_PR is true), so this is not a regression.

Comment thread
ifireball marked this conversation as resolved.
Resolved
STAGE="review"
if [[ "${ISSUE_HAS_PR}" == "true" ]]; then
STAGE="review"
fi
;;
/fs-fix)
if [[ "${ISSUE_HAS_PR}" == "true" ]]; then
Expand Down Expand Up @@ -185,7 +187,9 @@ jobs:
if [[ "${TRIGGERING_LABEL}" == "ready-to-code" ]]; then
STAGE="code"
elif [[ "${TRIGGERING_LABEL}" == "ready-for-review" ]]; then
STAGE="review"
if [[ "${ISSUE_HAS_PR}" == "true" ]]; then
STAGE="review"
fi
fi
fi
;;
Expand Down
6 changes: 5 additions & 1 deletion docs/ADRs/0033-per-repo-installation-mode.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,13 +170,17 @@ The org-level `.fullsend` config repo tier is skipped — the in-repo `.fullsend
This is the key new artifact, published in `fullsend-ai/fullsend/.github/workflows/`. It is a reusable version of the per-org `dispatch.yml` (ADR 0034), accepting event context via `workflow_call` inputs and performing the same routing and dispatch logic.

The routing logic (identical to per-org `dispatch.yml`) maps:
- `issues` + `labeled` → stage based on label name (`ready-to-code` → code, `ready-for-review` → review)
- `issues` + `labeled` → `ready-to-code` → code; `ready-for-review` on a PR → review
- `issue_comment` + slash commands → `/fs-triage`, `/fs-code`, `/fs-review`, `/fs-fix`, `/fs-retro`, `/fs-prioritize`
- `issue_comment` + `needs-info` label (non-command) → auto-triage
- `pull_request_target` + `opened`/`synchronize`/`ready_for_review` → review
- `pull_request_target` + `closed` → retro
- `pull_request_review` + `changes_requested` from review bot → fix (same-repo PRs only)

> **Note (2026-06):** Review and fix require PR context. `ready-for-review` and
> `/fs-review` only dispatch when `issue.pull_request` is present. See
> [ADR 0034](0034-centralized-shim-routing-via-dispatch.md) routing note.

In per-org mode, `dispatch.yml` routes events and dispatches to thin callers via `workflow_call`. In per-repo mode, `reusable-dispatch.yml` routes events and dispatches to per-stage reusable workflows directly via conditional `workflow_call` jobs, keeping the entire pipeline within a single `workflow_call` chain.

**Dispatch mechanism**: Per-org uses `workflow_call` to fan out to thin callers in `.fullsend`, which in turn call upstream reusable workflows via `workflow_call`. Per-repo uses conditional `workflow_call` jobs inside `reusable-dispatch.yml` to call `reusable-code.yml` etc. directly, eliminating the need for thin callers.
Expand Down
10 changes: 8 additions & 2 deletions docs/ADRs/0034-centralized-shim-routing-via-dispatch.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,18 @@ a stage name:
- `issue_comment` with `/fs-triage`, `/fs-code`, `/fs-review`, `/fs-fix`, `/fs-retro`, `/fs-prioritize`
commands → corresponding stage
- `issue_comment` on `needs-info` issue from non-bot → `triage`
- `issues` + `labeled` with `ready-to-code` or `ready-for-review` → `code`
or `review`
- `issues` + `labeled` with `ready-to-code` → `code`
- `issues` + `labeled` with `ready-for-review` on a PR (`issue.pull_request` present) → `review`
- `pull_request_target` opened/synchronize/ready_for_review → `review`
- `pull_request_target` closed → `retro`
- `pull_request_review` with bot `changes_requested` → `fix`

Comment thread
ifireball marked this conversation as resolved.
Resolved
> **Note (2026-06):** Review and fix require PR context. Review dispatches from
> `pull_request_target`, `/fs-review` on a PR comment, or `ready-for-review`
> labeled on a PR (`issue.pull_request` present). Fix dispatches from
> `pull_request_review` or `/fs-fix` on a PR comment. Standalone issues no
> longer trigger review or fix.

If no stage matches, `dispatch.yml` exits early with no fan-out. The existing
kill switch, role enablement, and `# fullsend-stage:` marker scanning
([ADR 0026](0026-stage-based-dispatch-for-agent-workflow-decoupling.md)) run
Expand Down
2 changes: 1 addition & 1 deletion docs/agents/code.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ on issues (not PRs). The code agent is also triggered automatically when the
| Label | Meaning |
|-------|---------|
| `ready-to-code` | Triggers the code agent. Applied by the [triage](triage.md) post-script for low-risk categories (bug, documentation, performance), or manually by a human for feature work after prioritization. |
| `ready-for-review` | Applied by the code agent's post-script after pushing a PR. Signals the [review agent](review.md) to evaluate the change. |
| `ready-for-review` | Applied by the code agent's post-script after pushing a PR. Triggers review when applied to a PR; also marks workflow state for humans and the retro agent. |

## Configuration and extension

Expand Down
10 changes: 5 additions & 5 deletions docs/agents/review.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,19 @@ If a prior review exists (e.g., re-review after fixes), it is injected into the

| Command | Where | Effect |
|---------|-------|--------|
| `/fs-review` | Issue or PR comment | Triggers a review |
| `/fs-review` | PR comment | Triggers a review on the PR |

The `/fs-review` command does not accept arguments. The review agent also runs
automatically when a PR is opened, synchronized (new commits pushed), or moved
out of draft.
The `/fs-review` command does not accept arguments and only works on pull
requests. The review agent also runs automatically when a PR is opened,
Comment thread
ifireball marked this conversation as resolved.
Resolved
synchronized (new commits pushed), or moved out of draft.

## Control labels

These labels are applied by the review post-script based on the review outcome.

| Label | Meaning |
|-------|---------|
| `ready-for-review` | Signals the review agent to evaluate the PR. Applied by the [code agent](code.md) post-script. |
| `ready-for-review` | Workflow state marker on the PR. Applied by the [code agent](code.md) post-script after pushing. Triggers review when applied to a PR (not standalone issues). |
Comment thread
ifireball marked this conversation as resolved.
Resolved
| `ready-for-merge` | The review agent approved the PR. No blocking findings. |
| `requires-manual-review` | The review agent found issues that require human judgment — it could not confidently approve or reject. |
| `rejected` | The review agent rejected the PR and the post-script closed it. |
Expand Down
2 changes: 1 addition & 1 deletion docs/glossary.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ See [architecture.md](architecture.md) and [agent-architecture.md](problems/agen

### Label State Machine

The set of valid label transitions on issues and PRs that encode workflow state. Labels like `ready-to-code`, `ready-for-review`, `ready-for-merge`, and `requires-manual-review` are control markers that drive agent dispatch and enforce ordering. The label state machine guard validates that transitions are legal and enforces mutual exclusion — for example, starting a triage run clears downstream labels so stale state does not carry forward.
The set of valid label transitions on issues and PRs that encode workflow state. Labels like `ready-to-code` and `ready-for-review` (on PRs only) drive agent dispatch; others such as `ready-for-merge` and `requires-manual-review` encode review outcomes. Applying `ready-for-review` to a standalone issue does not trigger review — only PR-backed issues qualify. The label state machine guard validates that transitions are legal and enforces mutual exclusion — for example, starting a triage run clears downstream labels so stale state does not carry forward.
See [ADR 0002](ADRs/0002-initial-fullsend-design.md) building block 3.

## M
Expand Down
4 changes: 2 additions & 2 deletions docs/guides/user/bugfix-workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ These labels track where an issue is in the pipeline:
| `feature` | Issue categorized as a feature request | Waits for human prioritization before coding |
| `triaged` | Triage passed but not auto-promoted | Waits for human review (applies to features and uncategorized issues) |
| `ready-to-code` | Triage passed (bug, docs, performance) | Code agent picks it up |
| `ready-for-review` | PR ready for review (manual trigger) | Review agents evaluate the PR |
| `ready-for-review` | PR ready for review | Triggers review when applied to a PR; also runs automatically via PR events |
| `ready-for-merge` | All reviewers unanimously approved | PR can be merged per governance policy |
| `requires-manual-review` | Reviewers disagreed or flagged security concerns | Human must decide |

Expand Down Expand Up @@ -124,7 +124,7 @@ The code agent:

### Stage 3: Review

**Triggered by:** `pull_request_target` events (PR opened, push to PR branch, or marked ready for review), `/fs-review` command, or `ready-for-review` label.
**Triggered by:** `pull_request_target` events (PR opened, push to PR branch, or marked ready for review), `/fs-review` on a PR comment, or applying `ready-for-review` to a PR.

The review swarm:

Expand Down
10 changes: 7 additions & 3 deletions internal/scaffold/fullsend-repo/.github/workflows/dispatch.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
# lint-workflow-size: max-lines=414
# lint-workflow-size: max-lines=420
# Dispatcher workflow that routes events to agent workflows based on stage.
# Routing logic determines the stage from event context — the shim only
# forwards the raw event. Adding a new stage requires only a case branch
Expand Down Expand Up @@ -94,7 +94,9 @@ jobs:
fi
;;
/fs-review)
STAGE="review"
if [[ "${ISSUE_HAS_PR}" == "true" ]]; then
STAGE="review"
fi
;;
/fs-fix)
if [[ "${ISSUE_HAS_PR}" == "true" ]]; then
Expand Down Expand Up @@ -142,7 +144,9 @@ jobs:
if [[ "${TRIGGERING_LABEL}" == "ready-to-code" ]]; then
STAGE="code"
elif [[ "${TRIGGERING_LABEL}" == "ready-for-review" ]]; then
STAGE="review"
if [[ "${ISSUE_HAS_PR}" == "true" ]]; then
STAGE="review"
fi
fi
fi
;;
Expand Down
4 changes: 3 additions & 1 deletion internal/scaffold/scaffold_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,10 @@ func TestDispatchWorkflowContent(t *testing.T) {
assert.Contains(t, s, "needs-info")
assert.Contains(t, s, `! has_label "feature"`)
assert.Contains(t, s, "opened|synchronize|ready_for_review")
// /code must only run on issues, not PRs
// /code must only run on issues, not PRs; /review must only run on PRs
assert.Contains(t, s, "ISSUE_HAS_PR")
assert.Regexp(t, `(?s)/fs-review\).*?ISSUE_HAS_PR`, s)
assert.Regexp(t, `(?s)ready-for-review.*?ISSUE_HAS_PR`, s)
// Author association checks
assert.Contains(t, s, "is_authorized")
assert.Contains(t, s, "OWNER|MEMBER|COLLABORATOR")
Expand Down
Loading