Skip to content

refactor(workflow)!: remove existing-pr gate on the workflow - #8133

Merged
waynesun09 merged 1 commit into
mainfrom
refactor/remove-pr-check-on-workflow
Oct 19, 2026
Merged

waynesun09 merged 1 commit into
mainfrom
refactor/remove-pr-check-on-workflow

Conversation

@rh-hemartin

@rh-hemartin rh-hemartin commented Oct 7, 2026 •

Copy link
Copy Markdown
Member

Summary

BREAKING CHANGE: this change removes the existing PR gate on the workflow. The gate exists on the pre-script for the code agent. A breaking change anyway, as now the workflows will run for longer up to that point.

This creates an extra cost on the workflow side, but it is accepted.

Related Issue

Related to #7608

Changes

Testing

  • make lint passes (stage changes first, then run)
  • Tests added/updated for new or modified logic

Checklist

  • PR title follows Conventional Commits (correct type, ! for breaking changes)
  • Commits are signed off (DCO) — human and human-directed agent sessions only
  • I wrote this contribution myself and can explain all changes in it

@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Remove the existing-PR gate from workflow dispatch

✨ Enhancement 🧪 Tests 🕐 10-20 Minutes

Grey Divider

AI Description

• Allow code-stage dispatch even when an issue already has an open linked PR.
• Retain role and agent checks, leaving the existing-PR decision to the code agent’s pre-script.
• Remove tests that enforced the deleted workflow gate.
Diagram

graph TD
  Route["Stage routing"] --> Role{"Role enabled?"} --> Agent{"Agent enabled?"} --> Payload["Event payload"] --> Code["Code agent"]
  Role -->|No| Skip["Skip dispatch"]
  Agent -->|No| Skip
Loading
High-Level Assessment

Removing the early check is appropriate if existing-PR eligibility belongs to the code agent’s pre-script. Keeping both gates would avoid some workflow runtime but preserve the duplicate decision this PR intends to remove.

Files changed (2) +3 / -90

Enhancement (1) +3 / -52
reusable-dispatch.ymlRemove the linked-PR check from dispatch routing +3/-52

Remove the linked-PR check from dispatch routing

• Deletes the GraphQL check that skipped code dispatch for issues with qualifying open PRs. Removes its output from the stage, agent-check, and PR-head conditions while retaining role and agent checks.

.github/workflows/reusable-dispatch.yml

Tests (1) +0 / -38
workflow_call_alignment_test.goRemove assertions for the deleted PR gate +0/-38

Remove assertions for the deleted PR gate

• Drops the PR-head condition assertion for the removed check and deletes the test of its bot filtering and skip notice. Existing PR-head resolution assertions remain.

internal/scaffold/workflow_call_alignment_test.go

@fullsend-ai-review

fullsend-ai-review Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 9:13 AM UTC · Completed 9:28 AM UTC

Commit: a1af002 · View workflow run →

Runtime: pi · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $2.46

@qodo-code-review

qodo-code-review Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Code Review by Qodo

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

Grey Divider


Remediation recommended

1. Code dispatch misstates the force override ✗ Dismissed
Description
The comment above COMMENT_BODY still says the route job's existing-PR check stops `/fs-code
--force`, but this PR deletes that check. When a maintainer reads the code-agent invocation, the
comment now gives the wrong reason to expect the documented override to fail before it reaches the
pre-script.
Code

.github/workflows/reusable-dispatch.yml[L424-426]

-      - name: Check for existing PRs
-        id: pr-check
-        if: steps.route.outputs.stage == 'code'
Relevance

●●● Strong

The removed gate makes the existing comment factually stale; recent precedent accepts correcting
misleading workflow documentation.

PR-#7056
PR-#3079

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The diff deletes the route-level check identified by the comment. The workflow still passes
COMMENT_BODY to the code-agent action, and the code-agent documentation describes --force as a
supported option.

.github/workflows/reusable-dispatch.yml[815-829]
docs/agents/code.md[37-46]

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

## Issue description
Deleting the route-level PR check makes the nearby comment about `/fs-code --force` being stopped before the pre-script inaccurate.

## Fix Focus Areas
- .github/workflows/reusable-dispatch.yml[815-829]

## Recommended Fix
Update the comment above `COMMENT_BODY` to describe the current behavior: the comment body reaches the code-agent pre-script, which handles the existing-PR check and its force override.

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



Informational

2. Workflow changes lack CI guide review ⊘ Outdated
Description
The pull request changes .github/workflows/reusable-dispatch.yml without stating that
docs/contributing/ci-workflows.md was consulted. Because the existing-PR gate and its guards are
removed, reviewers lack the required documented context for the changed dispatch behavior.
Code

.github/workflows/reusable-dispatch.yml[113]

+      stage: ${{ steps.role-check.outputs.skipped != 'true' && steps.agent-check.outputs.skipped != 'true' && steps.route.outputs.stage || '' }}
Relevance

● Weak

Nearly identical CI-guide consultation finding was rejected recently for workflow changes.

PR-#7845

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
PR Compliance ID 3201588 requires explicit evidence in the PR description, checklist, or code
comments that the CI workflow guide was consulted when modifying files under .github/workflows/.
The diff changes workflow output and execution guards, while the supplied PR description and changed
file contain no such reference.

Rule 3201588: Consult CI workflow guide when modifying GitHub Actions workflows or secrets
.github/workflows/reusable-dispatch.yml[113-113]
.github/workflows/reusable-dispatch.yml[525-525]

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 workflow changes remove the existing-PR gate and update dependent conditions, but the pull request provides no explicit evidence that `docs/contributing/ci-workflows.md` was consulted as required.

## Fix Focus Areas
- .github/workflows/reusable-dispatch.yml[113-113]
- .github/workflows/reusable-dispatch.yml[525-525]

## Recommended Fix
Add an explicit statement to the pull request description or an applicable review checklist confirming that `docs/contributing/ci-workflows.md` was consulted and that the workflow condition changes follow its documented conventions.

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


Grey Divider

Context sources
✅ Compliance rules (platform): 89 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/experiments (sha: 3f1614fa) — View relationship
  Explored: repo: fullsend-ai/.fullsend (sha: 7c163cad) — View relationship
  Explored: repo: fullsend-ai/pi-xai-vertex (sha: 8f50bdda) — View relationship
  Explored: repo: fullsend-ai/scribe (sha: 0f3eb528) — View relationship
  Explored: repo: fullsend-ai/mlflow-assessments (sha: 46f42987) — View relationship
  Explored: repo: fullsend-ai/pi-anthropic-vertex (sha: 960eff35) — View relationship
  Explored: repo: fullsend-ai/metrics (sha: 52f238e4) — View relationship
  Explored: repo: fullsend-ai/agents (sha: 56b9aa3a) — View relationship
Review mode: Auto: ⚖️ Balanced: Workflow gate removal changes CI behavior and affects dispatch eligibility.

Grey Divider

Tip of the day
💡 Did you know, you can import rules and skills only from the repositories your team follows

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

Comment thread .github/workflows/reusable-dispatch.yml
@fullsend-ai-review fullsend-ai-review Bot added the risk/moderate PR risk: moderate label Oct 7, 2026
@fullsend-ai-review

fullsend-ai-review Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Risk Assessment: moderate (2/5)

Details

While the PR modifies a protected CI workflow in a high-churn, heavily coupled area without a feature flag, the change is compact (2 files, 100 lines) with accompanying test updates and no dependency changes, yielding a moderate composite risk score.

Previous run

Risk Assessment: moderate (2/5)

Details

Moderate risk reflects a small, test-backed diff modifying a protected CI workflow without a rollback flag, where high churn and change coupling in git history offset the compact change size.

@fullsend-ai-review

fullsend-ai-review Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Review

Findings

Medium

Previous run

Review

Findings

Medium

Low

  • [stale-comment] .github/workflows/reusable-dispatch.yml:825 — The comment in the "Run code agent" step (head lines ~822-827) still says the route job's own "Check for existing PRs" step "gates stage=code first and does not honor --force". This PR removes that step, so the comment is now wrong. COMMENT_BODY now reaches the harness pre-script directly.
    Remediation: Rewrite the comment to say the existing-PR check and its --force override now happen only in the harness pre-script, and drop the reference to the removed route step.

  • [unauthorized-change] .github/workflows/reusable-dispatch.yml:113 — With the route-level gate gone, every code-routed event on an issue that already has an open closing PR gets a code-job runner, checkouts, token minting and env setup before any pre-script skip. The PR declares this as a deliberate breaking change (!) and accepts it. It links ci(workflows): reduce agent workflows to the Fullsend invocation contract #7608 as "Related to", not "Fixes". ci(workflows): reduce agent workflows to the Fullsend invocation contract #7608 is about avoiding setup cost for runs a pre-script would skip, so maintainers should confirm this ordering fits its direction. Also, the replacement pre-script lives in fullsend-ai/agents (ADR 0072) and cannot be checked from this checkout. Duplicate-run protection now depends entirely on it, including its API-error and --force handling.
    Remediation: Optional: say in the PR how the extra setup cost for skipped runs fits ci(workflows): reduce agent workflows to the Fullsend invocation contract #7608, and confirm the harness pre-script's existing-PR check before merge.


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.

fullsend-ai-review[bot]

This comment was marked as outdated.

@codecov

codecov Bot commented Oct 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

BREAKING CHANGE: this change removes the existing PR gate
on the workflow. The gate exists on the pre-script for the
code agent. A breaking change anyway, as now the workflows
will run for longer up to that point.

Signed-off-by: Hector Martinez <hemartin@redhat.com>
@fullsend-ai-review

fullsend-ai-review Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 10:51 AM UTC · Completed 11:02 AM UTC

Commit: 7f2f73d · View workflow run →

Runtime: pi · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $2.63

@waynesun09 waynesun09 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.

LGTM. Checked that the code pre-script in agents v0.48.1/main (forge_list_prs_for_issue) keeps the same gate: closing refs, OPEN only, coder-bot exempt. It also honors --force, so /fs-code --force now works end to end. No dangling pr-check references are left. Two minor notes, not blocking: a skipped code run now posts a status comment and the pr-open label instead of a silent notice, and the removed guard test has no replacement assertion.

@waynesun09
waynesun09 added this pull request to the merge queue Oct 19, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 19, 2026
@waynesun09
waynesun09 added this pull request to the merge queue Oct 19, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 19, 2026
@waynesun09
waynesun09 added this pull request to the merge queue Oct 19, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 19, 2026
@waynesun09
waynesun09 added this pull request to the merge queue Oct 19, 2026
Merged via the queue into main with commit 0a63fb7 Oct 19, 2026
53 checks passed
@waynesun09
waynesun09 deleted the refactor/remove-pr-check-on-workflow branch October 19, 2026 20:26
ifireball added a commit to ifireball/fullsend that referenced this pull request Oct 22, 2026
The existing-PR gate was removed from main in fullsend-ai#8133 but reintroduced by the workflow changes for fullsend-ai#7555. Drop the gate and its authorization metadata/test plumbing so code dispatch is not incorrectly suppressed by unrelated open PRs.

Signed-off-by: Barak Korren <bkorren@redhat.com>
Assisted-by: Codex (gpt-5.6-sol)

This branch was previously deployed

1 inactive deployment
dev — 7f2f73d8 Deployed Oct 7, 2026 by rh-hemartin via behaviour #15661
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

requires-manual-review Review requires human judgment risk/moderate PR risk: moderate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants