Skip to content

chore(fullsend): route review triggering via CEL config - #956

Merged
gabipodolnikova merged 2 commits into
patternfly:mainfrom
gabipodolnikova:fullsend/review-trigger-config
Nov 20, 2026
Merged

gabipodolnikova merged 2 commits into
patternfly:mainfrom
gabipodolnikova:fullsend/review-trigger-config

Conversation

@gabipodolnikova

@gabipodolnikova gabipodolnikova commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

What this changes

Moves review triggering from the dispatch workflow's built-in rules (PR opened, every push, marked ready) to an explicit CEL trigger on the review agent in .fullsend/config.yaml. After this merges, a review runs only when:

  • a draft PR is marked ready for review, or
  • the ready-for-review label is added to a PR by someone with write access or above, or
  • someone with write access or above comments /fs-review

Manual triggers (/fs-review comment and ready-for-review label) additionally require the actor to have write-level repository access (admin, maintain, or write) — outside contributors and triage-only users cannot start a review. The marked_ready path keeps the platform's built-in authorization.

Also adds a harness overlay (.fullsend/review.yaml, pinned to agents v0.52.0) with:

  • REVIEW_SKIP_AUTHORS: "app/renovate,app/dependabot" — dependency-bot PRs are skipped entirely
  • REVIEW_RISK_VERDICT_THRESHOLD: "3" — bot approval withheld at risk score ≥ 3 (default 4); conservative while trust builds, loosen to "4" once the team is familiar with the risk judgment
  • REVIEW_PROTECTED_PATHS — harness defaults plus .fullsend/, so the agent's own configuration can never be bot-approved (including this PR)

Glossary

Three similarly-named things: marked_ready is the GitHub draft→ready event (no label); ready-for-review is the label requesting a review (humans, or the code agent on its own PRs); ready-for-merge is the outcome label the reviewer applies. This trigger listens to the first two; the third is output.

Why

  • Draft PRs are currently reviewed — the built-in rules trigger on opened/synchronize regardless of draft status, costing ~$0.70–1.60 per review on work-in-progress branches. Drafts match none of the trigger conditions above.
  • Every-push re-reviews multiply cost — an active PR with N pushes currently gets N reviews. Updates after the initial review now only re-run when explicitly requested.
  • Manual triggers restricted to write access — outside contributors were already excluded by the platform's triage gate; this tightens the bar further so triage-only users cannot start a review either (cost governance, per the rollout discussion).
  • This is the trigger-policy outcome from the "What we are learning from setting up Fullsend" discussion.

Reviews are opt-in by design; the intended convention is: open as draft, mark ready when you want eyes on it.

Why a CEL trigger and not a workflow condition

An earlier approach (#954) added a draft check to the if: condition in .github/workflows/fullsend.yaml. The logic was correct, but that file is managed by fullsend ("Do not edit it directly"): fullsend repos install / github setup reconcile managed files against the declared state, so the edit would be silently reverted on the next convergence run or upgrade — draft reviews would resume with no error or signal.

The CEL trigger on the agents: entry is the documented, supported mechanism (CEL triggers reference), it lives in the repo-owned config that survives reconciliation, and it solves both the draft issue and the every-push re-review cost, which a workflow-level draft check cannot.

#954 can be closed as superseded once this lands.

Follow-up after approval (not in this PR)

  • Create the ready-for-review label — the label trigger path is included but dormant until the label exists: gh label create "ready-for-review" -R patternfly/chatbot --description "Request a fullsend review" --color "0E8A16"
  • Fullsend v0.57.0 (released Nov 20, includes the large-repo tree fix) upgrade as a separate PR; the overlay pin moves with it

Notes

  • The trigger is read from the default branch only — a PR cannot change its own routing; takes effect for PRs opened after merge.
  • fullsend lint passes. One upstream warning: the forge: overlay section is deprecated in favor of CEL when expressions (ADR 0088) — still fully functional at this version, may need migrating on a future upgrade.
  • REVIEW_RISK_VERDICT_THRESHOLD: "3" is a decision point — happy to adjust before merge ("4" = the default, "5" = critical-only, "6" = gate off).

Validation after merge

  1. Open a draft PR → expect no fullsend review run
  2. Mark it ready → expect exactly one review
  3. Push to it → expect no re-review
  4. Comment /fs-review as a write-access user → expect one review
  5. Add the ready-for-review label to a non-draft PR → expect one review

@fullsend-ai-review

fullsend-ai-review Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 12:19 PM UTC · Completed 12:32 PM UTC

Commit: ec58d1b · View workflow run →

Runtime: pi · Model: google-vertex/gemini-3.8-flash → gemini-3.8-flash · Effort: high · Cost: $1.56

@patternfly-build

patternfly-build commented Nov 20, 2026 •

Copy link
Copy Markdown

@fullsend-ai-review

fullsend-ai-review Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

Looks good to me

Previous run

<!-- fullsend:review-findings-v2:eyJ2ZXJzaW9uIjoyLCJhY3Rpb24iOiJyZXF1ZXN0LWNoYW5nZXMiLCJmaW5kaW5ncyI6W3sic2V2ZXJpdHkiOiJsb3ciLCJjYXRlZ29yeSI6ImVkZ2UtY2FzZSIsImZpbGUiOiIuZnVsbHNlbmQvY29uZmlnLnlhbWwiLCJpZCI6ImZfZDA5YjljNzZmZGE3OTcwNCIsImxpbmUiOjE2LCJhY3Rpb25hYmxlIjp0cnVlfV19 -->

Review

Findings

Low

  • [edge-case] .fullsend/config.yaml:16 — The CEL trigger matches event.transition.kind == "label_changed" without distinguishing whether the label was added or removed. The workflow subscribes to both labeled and unlabeled events on pull_request_target. If the fullsend framework maps unlabeled events to label_changed transitions with the same event.transition.label.name, then removing the ready-for-review label would also trigger a review run — likely unintended. The path is currently dormant (the label doesn't exist yet per the PR description), but would become active after the planned follow-up gh label create.
    Remediation: If the fullsend event model exposes an event.transition.label.action or similar discriminator (e.g., "added" vs "removed"), add it as an additional && guard: && event.transition.label.action == "added". Alternatively, verify in the fullsend CEL triggers reference that label_changed fires only on add, not remove, and document that assumption in a comment.

Next steps:

  • /fs-fix — agent addresses review findings automatically
  • /fs-fix <your instruction> — agent fixes with your specific guidance
  • Push commits directly — review re-runs automatically on push
  • /fs-fix-stop — disable automatic fix runs for this PR

fullsend-ai-review[bot]

This comment was marked as outdated.

@kmcfaul kmcfaul left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lgtm

@kmcfaul

kmcfaul commented Nov 20, 2026

Copy link
Copy Markdown
Contributor

I've also added this to the react fullsend PR

@fullsend-ai-review

fullsend-ai-review Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 3:20 PM UTC · Completed 3:34 PM UTC

Commit: 318ba40 · View workflow run →

Runtime: pi · Model: google-vertex/gemini-3.8-flash → gemini-3.8-flash · Effort: high · Cost: $1.42

@fullsend-ai-review fullsend-ai-review Bot added the risk/low PR risk: low label Nov 20, 2026
@fullsend-ai-review

Copy link
Copy Markdown

<!-- fullsend:risk-assessment -->
Risk Assessment: low (1/5)

Details

Small FullSend configuration change with 2 files and 33 additions by an established contributor, with low churn, no protected paths touched, and clear alignment with the linked issue.

@fullsend-ai-review
fullsend-ai-review Bot dismissed their stale review November 20, 2026 15:34

Superseded by updated review

@fullsend-ai-review fullsend-ai-review Bot added the ready-for-merge All reviewers approved — ready to merge label Nov 20, 2026
@kmcfaul

kmcfaul commented Nov 20, 2026

Copy link
Copy Markdown
Contributor

(Updated the react fullsend PR with this as well)

@gabipodolnikova
gabipodolnikova merged commit 2f4d487 into patternfly:main Nov 20, 2026
56 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-merge All reviewers approved — ready to merge risk/low PR risk: low

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants