Repository navigation
Description
What is missing
Review routing is bash in the route job of reusable-dispatch.yml. A repository cannot change when review runs. For example, it cannot keep /fs-review and turn off the automatic review on every PR (#2078).
agents[] entries in config.yaml can already tune a built-in agent without a harness file (runtime, model, effort, subagents), but they cannot say when it runs. A harness trigger: exists, but the default agents are never routed through it, and overriding the whole review harness just to change when it runs means maintaining a base: pin.
Part of #2888. Implements the routing half of #2898.
What should happen
Users set when review runs with a CEL expression in config.yaml:
agents:
- name: review
trigger: >-
event.transition.kind == "comment_added"
&& has(event.entity.linked_change_proposal)
&& event.transition.comment.command == "/fs-review"
&& event.actor.kind == "human"This is dispatch policy (whether an agent runs), so it belongs in config.yaml per ADR 0080. The trigger is CEL, per ADR 0061.
CEL decides whether review runs. The existing review job still runs it, so the PR environment (PR_URL, PR_NUMBER, PRIOR_REVIEW_*), prior-review prefetch, role/enabled checks and per-PR concurrency stay as they are.
1. agents[].trigger in config.yaml
- New
AgentEntry.trigger(string, CEL), validated at config load with the same check harness triggers use. - Follow
docs/contributing/harness-composition.md"Checklist forAgentEntryfield changes": merge inperRepoConfig.AgentEntries()(an omitted or empty value inherits the parent; last overlay wins), layered-merge tests, and the layered configuration reference. RecheckHasSettings()/IsOverrideOnly(): an entry with onlytriggerstays override-only, but counts for routing. - Document it in
docs/reference/config-reference.md. Fix the Jira guide's "triggeris a harness field, not aconfig.yamlfield".
2. Opt-in rule: a config.yaml trigger
For the review agent, routing uses CEL only when agents[].trigger is set for review in config.yaml (any layer). Everything else stays on bash, unchanged: no entry, an entry without trigger, the default harness, and any trigger: in a sourced review harness, whether written there or inherited from base:. A harness trigger never opts a built-in agent into CEL routing; to opt in, put the expression in config.yaml.
This keeps upgrades free of surprises: nothing changes unless someone edits config.yaml. In particular, Jira-oriented harness triggers added per the Jira guide keep their meaning for the Jira poller and do not take over GitHub routing.
The default harness's own trigger (fullsend-ai/agents#1756) is not used for routing until the cutover that removes bash routing (#2902).
There is no repository variable or other switch: the config.yaml trigger is the opt-in.
3. fullsend dispatch --route <agent>
Decides for an allowlisted built-in agent (only review in this issue; later agents add one allowlist entry and their acceptance rule) and prints one JSON line: {"agent":"review","decision":"run|skip|bash","reason":"...","harness":"..."}.
- Use the
config.yamltrigger per §2; none →bash. - Kill switch active or agent disabled →
bash(the existing route checks report them). - Authorize with the event-level gate plus the per-harness threshold (feat(dispatch): apply per-harness permission threshold on the CEL path #8724).
- A bot
comment_added→skip(bash parity), before any harness fetch. - Trigger true →
run, false →skip. - Document the flag and the JSON contract on the
fullsend dispatchpage indocs/cli/.
4. Wiring in the route job (maintainers push this part)
- "Determine stage" stays as it is on
mainapart from its step id. - New CEL steps run after it only when the bash stage is empty or
review, the event ispull_request_targetor anissue_commenton a PR, and.fullsend/config.yamlhas areviewagent entry withtrigger. Every CEL step iscontinue-on-error. - A final step applies the decision:
run→STAGE=review(accepted only forpull_request_target, or anissue_commenton a PR);skip→ empty;bashor any CEL failure → keep the bash stage and log a warning. - Repositories without such an entry produce byte-identical routing; a test asserts this.
Known differences from bash (documented)
| Case | Bash | CEL |
|---|---|---|
| PR opened or pushed by a bot without a registered role | review | denied (ADR 0107) |
| PR opened or pushed by the fix bot | review | denied until #8329 wires the bot-role lookup into GitHub dispatch; until then the review → fix → re-review loop stops |
| Who is checked on PR opened / synchronize / ready | PR author | event sender |
| A maintainer's push to an outside contributor's fork PR | not reviewed | reviewed |
| GitLab | — | only MR opened and /fs-review notes; no re-review on push |
The user guide says to opt in only after #8329 ships, or to accept the fix-bot gap.
Tests (same PR)
| Layer | Cases |
|---|---|
| Go unit, config | trigger merge and inheritance across layers; invalid CEL rejected at load |
Go unit, --route review |
config trigger set (each layer) vs. absent, including a sourced harness with its own trigger → bash; kill switch and disabled → bash; bot comment → skip; auth denied → skip |
| Parity golden | recorded review events through routeBuiltinAgent with a trigger equal to the default harness trigger; mismatches only on the known-difference rows |
Behaviour (e2e/behaviour/) |
with the existing "the repository agents are configured with:" step and an on-demand-only trigger: PR opened → no review; /fs-review → review dispatched exactly once; a repository without a review entry → bash routing unchanged |
Docs
docs/guides/user/customizing-agents.md: "Choosing when review runs" walkthrough, with theconfig.yamlexample, how to check the result in the route job summary (review_route=cel|bash), and the known differences.docs/guides/user/cel-triggers-reference.md: coexistence with built-in agents.docs/reference/config-reference.md, layered configuration reference,docs/cli/dispatch page.
Out of scope
- Moving review execution to
harness-run; removing bash routing (feat(dispatch)!: make harness-dispatch primary and remove bash routing #2902); the same opt-in for other built-in agents (follow the same pattern per agent); org-modedispatch.yml(deprecated).
Implementation notes for the code agent
- Reference implementation: branch
8726-cel-review-routeate501087d8ab8a90db7f569ce586b1ed01eb4e68b(five commits onmain08b461637). Port its non-workflow files:internal/celtrigger, theAgentEntry.Triggerfield and merge,fullsend dispatch --route <agent>with its allowlist, tests, docs,e2e/behaviour/features/dispatch/review-cel-route.featureand the newthe write actor opens a pull requestbehaviour step. Keep the--routeflag and its JSON fields (agent,decision,reason,harness) unchanged: the workflow wiring depends on them. .github/workflows/reusable-dispatch.ymlandinternal/scaffold/cel_route_test.goare out of scope for this run, because the code agent cannot edit workflow files. Maintainers push them onto the PR.- Keep Go patch coverage at or above the repository target.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
fullsend-ai-triage commentedon Oct 22, 2026
🤖 Finished Triage · ✅ Success · Started 8:55 PM UTC · Completed 8:57 PM UTC
Commit:
fe68925· View workflow run →Runtime: claude · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $0.09
fullsend-ai-triage commentedon Oct 22, 2026
Thanks for the thorough spec. This is blocked on two open issues that the description itself names as required for the
onmode:--route review. Without it, triage-role humans get denied where bash would route a review.reviewoverride with a trigger does not run twice. Scenario V6 also depends on it.Only
shadowmode is independent of both. The "Done when" list (V2–V6 on a test repository) can't be met until both land. Once they merge, this can be re-triaged for implementation.Notes for whoever picks this up:
routejob changes are in.github/workflows/reusable-dispatch.yml, so the code agent can't make them under current permissions. A human PR or maintainer action is needed for the workflow portion. The Go--route reviewmode, the behaviour step and the docs updates are separable.trigger:toharness/review.yaml) is a separate PR, and the issue says to merge it only after the release carrying fix(dispatch): don't fan out built-in agents from GitHub CEL dispatch #8725's filter. Its status was not checked.docs/cli/anddocs/reference/config-reference.mdas well as the two guides listed in the issue, per the repo's documentation rules.Blocked by:
fullsend-ai-triage commentedon Oct 22, 2026
🤖 Triage ·⚠️ Cancelled · Started 9:17 PM UTC · Ended 9:18 PM UTC
Commit:
fe68925· View workflow run →fullsend-ai-triage commentedon Oct 22, 2026
🤖 Finished Triage · ✅ Success · Started 9:20 PM UTC · Completed 9:21 PM UTC
Commit:
fe68925· View workflow run →Runtime: claude · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $0.15
fullsend-ai-triage commentedon Oct 22, 2026
This issue is still blocked. Re-checking the dependencies found all of them open, and no open or merged PR addresses this issue. The earlier closed PR #8729 is only the reference implementation.
Blockers for the
onmode:--route reviewneeds it. Without it, triage-role humans are denied where bash would route a review.reviewoverride with a trigger runs twice. Scenario V6 also depends on it.gha-eventadapter. It is listed in the implementation notes, and it is also open and marked as needing design. Until it lands, a synchronize event sent by the fix bot is denied under CEL, which silently stops the review → fix → re-review loop.Only
shadowmode has no dependencies. The full "Done when" list (V2–V6 on a test repository) can't be met until the blockers above merge.Notes for whoever picks this up:
routejob wiring is in.github/workflows/reusable-dispatch.yml. The code agent can't edit workflow files, so a maintainer must push that part, along with the scaffold test that asserts on it. The Go--route reviewmode, the behaviour step and the docs updates can be done separately.docs/cli/anddocs/reference/config-reference.md, in addition to the two guides named in the issue.trigger:toharness/review.yaml) has not been verified.Once the blockers are resolved, this can be re-triaged for implementation.
Blocked by:
fix(#8726): isolate CEL review routing failures and tighten parity
fullsend-ai-triage commentedon Oct 22, 2026
🤖 Finished Triage · ✅ Success · Started 9:35 PM UTC · Completed 9:37 PM UTC
Commit:
fe68925· View workflow run →Runtime: claude · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $0.12
fullsend-ai-triage commentedon Oct 22, 2026
This issue is still blocked. All three dependencies were re-checked and remain open, and no open or merged PR addresses this issue (the closed reference-implementation PR does not count).
Blockers for the
onmode:--route reviewneeds. Without it, triage-role humans are denied where bash would route a review.reviewoverride with a trigger runs twice, and scenario V6 cannot pass. It is already marked ready-to-code, so it is the closest to landing.gha-eventadapter. It is still marked as needing design. Until it lands, a synchronize event sent by the fix bot is denied under CEL, which silently stops the review → fix → re-review loop.Only
shadowmode has no dependencies, but the full "Done when" list (V2–V6 on a test repository) cannot be met until the blockers merge.Notes for whoever picks this up:
routejob wiring lives in.github/workflows/reusable-dispatch.yml. The code agent cannot edit workflow files, so a maintainer must push that part, along with the scaffold test that asserts on it. The Go--route reviewmode, the behaviour step and the docs updates are separable.docs/cli/anddocs/reference/config-reference.md, in addition to the two guides named in the issue.trigger:toharness/review.yaml) has not been verified.Once the blockers are resolved, this can be re-triaged for implementation.
Blocked by:
15 remaining items
waynesun09 commentedon Oct 23, 2026
/fs-code
Do not sign off. No
git commit -s, noSigned-off-bytrailer.waynesun09 commentedon Oct 23, 2026
/fs-code
Do not sign off. No
git commit -s, noSigned-off-bytrailer.fullsend-ai-coder commentedon Oct 23, 2026
🤖 Finished Code · ✅ Success · Started 12:04 AM UTC · Completed 12:15 AM UTC
Commit:
33dc5e1· View workflow run →Runtime: claude · Model: opus → claude-opus-5-5 · Effort: high · Cost: $2.24
ci(#8726): route a configured review trigger in the dispatch route job
fix(#8726): fail the review route on invalid config, keep harness dis…
docs(#8726): describe agents[].trigger as review routing only in the …
docs(#8726): say an invalid agents[].trigger fails every agent run
docs(#8726): add the invalid-trigger agent error to the troubleshooti…
fix(#8726): skip on trigger evaluation errors and harden CEL route steps
feat(fullsend-ai#8726): let agents[].trigger decide when review runs
Merge pull request fullsend-ai#8733 from fullsend-ai/agent/8726-cel-r…
feat(fullsend-ai#8736): let config triggers route retro, triage and p…