Skip to content

feat(review-agent): skip review dispatch that cannot produce a review - #6587

Open
guyoron1 wants to merge 1 commit into
fullsend-ai:mainfrom
guyoron1:chore/review-routing-hygiene
Open

feat(review-agent): skip review dispatch that cannot produce a review#6587
guyoron1 wants to merge 1 commit into
fullsend-ai:mainfrom
guyoron1:chore/review-routing-hygiene

Conversation

@guyoron1

@guyoron1 guyoron1 commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Heyaa : )

This started from tallying dispatches where the review agent runs a full inference and cannot produce a useful review. Three cases, now skipped before dispatch:

  • Drafts — review runs once the PR is marked ready, not on every draft push.
  • fullsend-no-review label — mirroring the fullsend-no-fix label the fix agent already honours (ADR 0034 pattern).
  • Docs prose — every changed file matches docs/*.md minus docs/ADRs/**, with a notice in the job log and summary.

An explicit /fs-review bypasses all three.

The docs glob is deliberately narrow, because the obvious patterns are dangerous: docs/* would swallow the TypeScript under docs/.vitepress/ and the published docs/normative/** schema; *.md would swallow SKILL.md/AGENTS.md — markdown that is executable agent instruction, not prose; and a new ADR is among the things most worth reviewing.

Two things are never skippable: lockfiles (a lockfile-only diff can repoint a transitive dependency's resolved/integrity without touching package.json — supply-chain relevant, so Renovate PRs keep their review) and truncated file listings (GitHub caps /pulls/{n}/files at 3000 entries without erroring).

TestReviewRoutingSkips / TestReviewRoutingDocsSkip pin the routing conditions and assert the dangerous broad globs are absent — verified meaningful by reverting each guard and watching them fail. go test ./internal/scaffold/ and pre-commit run --all-files pass, including the ADR lint hooks.

Note: the ADR is 0096 — 0090 and 0091 were both taken upstream while this branch was in flight. Known follow-up, disclosed in the ADR: fullsend-no-review requires manual label creation; there's no /fs-review-stop command yet, unlike /fs-fix-stop.

@github-actions

Copy link
Copy Markdown

E2E tests did not run

E2E tests run automatically for org/repo members and collaborators on pull requests.

For other contributors, a maintainer must add the ok-to-test label after the latest push.

See E2E testing guide for details.

1 similar comment
@github-actions

Copy link
Copy Markdown

E2E tests did not run

E2E tests run automatically for org/repo members and collaborators on pull requests.

For other contributors, a maintainer must add the ok-to-test label after the latest push.

See E2E testing guide for details.

@github-actions

github-actions Bot commented Aug 25, 2026

Copy link
Copy Markdown

Site preview

Preview: https://59df9f30-site.fullsend-ai.workers.dev

Commit: ef01fdd76c76aaaf99327931bc19cb91e7495f2f

@codecov

codecov Bot commented Aug 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@guyoron1

Copy link
Copy Markdown
Contributor Author

Implements #1715 (skip review dispatch when PR is in draft state). Adjacent to #2390 and #2809, which ask for the same family of pre-dispatch skips.

Three cases where the review agent is dispatched, runs a full inference,
and cannot say anything useful (ADR 0096).

Drafts no longer trigger an automatic review on open or push — the review
fires once the PR is marked ready. A fullsend-no-review label suppresses
automatic dispatch, mirroring the fullsend-no-fix label the fix agent
already honours. And a PR whose changed files are all documentation prose
under docs/ is skipped with a notice in the job summary.

That last pattern is deliberately narrow, because bash case globs match
'/': docs/* would swallow the TypeScript under docs/.vitepress and the
normative event schema, and a bare *.md would swallow skills/*/SKILL.md,
AGENTS.md and CLAUDE.md — markdown that is executable agent instruction
rather than prose. ADRs are excluded because a new ADR is among the
things most worth reviewing, and lockfiles are not skippable at all:
npm resolves from package-lock.json, so a lockfile-only diff can repoint
a transitive dependency without touching package.json. A truncated file
listing never skips either, since GitHub caps the files endpoint at 3000
entries and stops paginating without erroring.

An explicit /fs-review bypasses all three skips.

The draft and label checks are mirrored into the per-org scaffold, which
docs/contributing/workflow-contracts.md requires for stage routing. The
docs skip is not: that installation mode is deprecated (ADR 0044) and the
requirement is scoped to routing, payload construction, and secret
threading, none of which this step is.

Rebased onto current main; renumbered the new ADR from 0091 to 0096 to
avoid a collision with 0091-per-agent-runtime-model-effort.md, which
landed upstream after this branch was cut.

Signed-off-by: guy oron <goron@redhat.com>
@guyoron1
guyoron1 force-pushed the chore/review-routing-hygiene branch from 05d40b9 to ef01fdd Compare September 1, 2026 11:56
@guyoron1
guyoron1 marked this pull request as ready for review September 1, 2026 12:57
@guyoron1
guyoron1 requested a review from a team as a code owner September 1, 2026 12:57
@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Skip unnecessary automatic review dispatches

✨ Enhancement 🧪 Tests 📝 Documentation ⚙️ Configuration changes 🕐 20-40 Minutes

Grey Divider

AI Description

• Prevent automatic reviews for drafts, opted-out PRs, and documentation-prose-only diffs.
• Preserve explicit /fs-review, ADR, lockfile, and truncated-file-list review coverage.
• Mirror routing gates in scaffolds and add regression tests and operational documentation.
Diagram

graph TD
  A["Review trigger"] --> B{"Explicit /fs-review?"} -- "No" --> C{"Draft or blocked?"} -- "No" --> D["Review stage"] --> E{"Docs prose only?"} -- "No" --> F["Dispatch review"]
  B -- "Yes" --> F
  C -- "Yes" --> G["Skip dispatch"]
  E -- "Yes" --> H["Log skip notice"] --> G
Loading
High-Level Assessment

Centralized pre-dispatch filtering is the appropriate approach because it avoids inference cost while retaining an explicit escape hatch. Native path filters cannot safely express the ADR, lockfile, API-truncation, and command-bypass semantics, while suppressing review inside the agent would occur too late to prevent wasted dispatches.

Files changed (5) +309 / -11

Enhancement (1) +67 / -5
reusable-dispatch.ymlGate automatic review dispatches before agent execution +67/-5

Gate automatic review dispatches before agent execution

• Skips automatic review routing for drafts and PRs carrying 'fullsend-no-review', while leaving explicit '/fs-review' commands unaffected. Adds conservative changed-file inspection that suppresses documentation-prose-only reviews but fails open for API errors, empty or truncated listings, ADRs, lockfiles, and other files.

.github/workflows/reusable-dispatch.yml

Tests (1) +80 / -0
workflow_call_alignment_test.goPin review-routing skip contracts +80/-0

Pin review-routing skip contracts

• Adds regression coverage for draft and label gates across both dispatch workflows, including the explicit-command bypass. Verifies the per-repo documentation check uses narrow safe patterns, records skips, and does not exempt lockfiles.

internal/scaffold/workflow_call_alignment_test.go

Documentation (2) +149 / -1
0096-skip-provably-unnecessary-review-dispatch.mdRecord the unnecessary-review dispatch decision +137/-0

Record the unnecessary-review dispatch decision

• Documents the three skip conditions, their safety boundaries, and the explicit-command escape hatch. It also records per-repo versus scaffold scope and the deferred '/fs-review-stop' follow-up.

docs/ADRs/0096-skip-provably-unnecessary-review-dispatch.md

review.mdDocument automatic review skips and control label +12/-1

Document automatic review skips and control label

• Explains draft, 'fullsend-no-review', and documentation-only skip behavior for users. Adds the new control label and clarifies that '/fs-review' always remains available.

docs/agents/review.md

Other (1) +13 / -5
dispatch.ymlMirror draft and label routing gates in scaffold +13/-5

Mirror draft and label routing gates in scaffold

• Threads draft status into generated per-org dispatch workflows and applies the same automatic routing gates for drafts and 'fullsend-no-review'. Updates the workflow size allowance for the added routing logic.

internal/scaffold/fullsend-repo/.github/workflows/dispatch.yml

@qodo-code-review

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (2) 📘 Rule violations (2) 📜 Skill insights (7)

Grey Divider


Action required

1. Accepted ADR lacks architecture update 📜 Skill insight ⚙ Maintainability
Description
ADR 0096 is newly accepted, but this PR does not modify docs/architecture.md with a linked
Decided: entry. The accepted routing decision therefore is not reflected in the repository's
living architecture overview.
Code

docs/ADRs/0096-skip-provably-unnecessary-review-dispatch.md[R2-3]

+title: "96. Skip provably unnecessary review dispatch"
+status: Accepted
Relevance

●●● Strong

Recent ADR precedent accepts adding architecture cross-references when accepted decisions introduce
repository-wide behavior.

PR-#5016
PR-#6083

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
Rules 1062062 and 1062100 require docs/architecture.md to be updated whenever a new ADR is
accepted. ADR 0096 declares status: Accepted, while no docs/architecture.md modification appears
in the PR diff.

Rule 1062062: Update architecture overview and problem docs when ADR is accepted
docs/ADRs/0096-skip-provably-unnecessary-review-dispatch.md[1-3]
Skill: writing-adrs

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 new Accepted ADR has no corresponding architecture overview update.

## Issue Context
Add a surgical `Decided:` entry under the dispatch-related component and link ADR 0096; update related problem documents where the decision resolves an open question.

## Fix Focus Areas
- docs/ADRs/0096-skip-provably-unnecessary-review-dispatch.md[1-21]
- docs/architecture.md[46-60]
- docs/problems/agent-architecture.md[1-1]
- docs/problems/code-review.md[1-1]

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


2. ADR links outside Context 📜 Skill insight ⚙ Maintainability
Description
The related ADR cross-references are placed between Status and Context rather than inside the
Context section. This also introduces a free-standing block that does not follow the ADR template's
section order.
Code

docs/ADRs/0096-skip-provably-unnecessary-review-dispatch.md[R23-26]

+Builds on [ADR 0034](0034-centralized-shim-routing-via-dispatch.md)
+(centralized dispatch routing, and the `fullsend-no-fix` label pattern this
+ADR mirrors) and [ADR 0054](0054-require-authorization-on-all-agent-dispatch-paths.md)
+(authorization on all agent dispatch paths — unaffected by this change).
Relevance

●●● Strong

Recent ADR reviews accepted restructuring and improving cross-reference placement and format.

PR-#6083
PR-#5798

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
Rule 1062094 requires related ADR references in Context, while rule 1062099 requires the template
structure. The references are inserted after Status and before the ## Context heading.

docs/ADRs/0096-skip-provably-unnecessary-review-dispatch.md[19-28]
docs/ADRs/0000-adr-template.md[14-25]
Skill: writing-adrs

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

## Issue description
Related ADR references appear outside the Context section and disrupt the required template structure.

## Issue Context
Preserve the references but incorporate them concisely into the Context section.

## Fix Focus Areas
- docs/ADRs/0096-skip-provably-unnecessary-review-dispatch.md[19-30]

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


3. Planned command lacks issue link 📜 Skill insight ≡ Correctness
Description
The not-yet-implemented /fs-review-stop command is documented as follow-up work without a `>
**Planned:**` callout or issue link. Readers cannot trace the planned feature and may mistake the
prose for an informal commitment.
Code

docs/agents/review.md[61]

+| `fullsend-no-review` | Prevents automatic (bot-triggered) review runs on this PR. Mirrors the [fix agent](fix.md)'s `fullsend-no-fix` label. Explicit `/fs-review` commands are unaffected. Currently applied manually (no `/fs-review-stop` command yet — see [ADR 0096](../ADRs/0096-skip-provably-unnecessary-review-dispatch.md)). |
Relevance

●●● Strong

The documentation explicitly describes an unimplemented feature, making the required planned callout
and issue link a straightforward compliance fix.

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
Rule 1062082 requires every planned feature mention to use a > **Planned:** blockquote and include
an issue link. The new control-label documentation states that /fs-review-stop does not exist yet
but provides neither.

docs/agents/review.md[61-61]
docs/ADRs/0096-skip-provably-unnecessary-review-dispatch.md[74-82]
Skill: writing-user-docs

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 guide mentions the unimplemented `/fs-review-stop` feature without the required planned-feature callout and tracking link.

## Issue Context
Create or reference the relevant issue and use the exact `> **Planned:**` blockquote format.

## Fix Focus Areas
- docs/agents/review.md[61-61]
- docs/ADRs/0096-skip-provably-unnecessary-review-dispatch.md[74-82]

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


View high (3)
4. Files request uses POST 🐞 Bug ≡ Correctness
Description
Adding -F per_page=100 makes gh api use POST unless --method GET is specified, but the
pull-request files endpoint is a GET operation. The request therefore enters the fail-open handler
without setting skipped=true, so documentation-only PRs continue dispatching reviews.
Code

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

+          FILES=$(gh api "repos/${SOURCE_REPO}/pulls/${PR_NUMBER}/files" --paginate -F per_page=100 --jq '.[].filename') || {
Relevance

●●● Strong

Concrete GitHub CLI method bug causes fail-open behavior; workflow correctness findings are
typically accepted.

PR-#6167
PR-#1688

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The new command supplies a form field without forcing GET, and its failure branch exits without
producing the skip output. The review is suppressed only when the later classification writes
skipped=true.

.github/workflows/reusable-dispatch.yml[555-558]
.github/workflows/reusable-dispatch.yml[576-580]
.github/workflows/reusable-dispatch.yml[111-113]

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 changed-files request supplies `-F per_page=100` without explicitly selecting GET, causing `gh api` to send a POST request and making the documentation-only skip ineffective.

## Issue Context
The existing failure handler intentionally continues review dispatch when the API call fails, so this error does not fail the workflow but prevents every intended docs-only skip.

## Fix Focus Areas
- .github/workflows/reusable-dispatch.yml[555-558]
- internal/scaffold/workflow_call_alignment_test.go[653-654]

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


5. ADR records three decisions 📜 Skill insight ⚙ Maintainability
Description
ADR 0096 separately decides draft suppression, label-based suppression, and documentation-only
suppression. These are three independently applicable routing decisions and must not be recorded as
one ADR.
Code

docs/ADRs/0096-skip-provably-unnecessary-review-dispatch.md[R54-56]

+Three additive skips in `reusable-dispatch.yml`'s "Determine stage" step.
+
+### 1. Draft skip
Relevance

●● Moderate

The rule is explicit, but historical evidence does not clearly establish rejection or acceptance of
combining related routing decisions.

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
Rule 1062089 requires exactly one decision per ADR. The Decision section explicitly introduces
Three additive skips and then defines three separately numbered policies.

docs/ADRs/0096-skip-provably-unnecessary-review-dispatch.md[52-56]
docs/ADRs/0096-skip-provably-unnecessary-review-dispatch.md[65-84]
Skill: writing-adrs

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

## Issue description
ADR 0096 records three distinct review-routing decisions in one Decision section.

## Issue Context
Each ADR must record exactly one decision; create separate ADRs with their own context and consequences.

## Fix Focus Areas
- docs/ADRs/0096-skip-provably-unnecessary-review-dispatch.md[52-112]

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


6. Renames bypass prose filter 🐞 Bug ≡ Correctness
Description
The API query extracts only each file's new filename, so renaming an ADR or executable VitePress
source into a docs/*.md path is classified as prose-only. Such a PR is skipped even though it
removes or relocates content the change explicitly declares review-worthy.
Code

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

+          FILES=$(gh api "repos/${SOURCE_REPO}/pulls/${PR_NUMBER}/files" --paginate -F per_page=100 --jq '.[].filename') || {
Relevance

●● Moderate

Rename handling is a credible correctness gap, but no closely matching historical precedent confirms
team treatment.

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The query discards status and previous_filename, after which the loop accepts any destination
matching docs/*.md. The repository explicitly excludes ADRs and VitePress TypeScript from the
skip, and docs/.vitepress/config.ts confirms these paths contain executable implementation code.

.github/workflows/reusable-dispatch.yml[555-575]
.github/workflows/reusable-dispatch.yml[543-551]
docs/.vitepress/config.ts[1-18]
docs/ADRs/0096-skip-provably-unnecessary-review-dispatch.md[92-100]

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 documentation-only filter ignores pull-file rename metadata and checks only the destination filename. A substantive file renamed into a matching Markdown path can therefore suppress review.

## Issue Context
Pull-file rename records include the old path separately as `previous_filename`. Either reject renamed files conservatively or classify both old and new paths, while preserving the 3000-file truncation safeguard.

## Fix Focus Areas
- .github/workflows/reusable-dispatch.yml[555-575]
- internal/scaffold/workflow_call_alignment_test.go[645-669]

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



Remediation recommended

7. Consequences use multiple sentences 📜 Skill insight ⚙ Maintainability
Description
Several Consequences bullets contain multiple sentences and extended implementation rationale. The
required format is 3–5 bullets with exactly one sentence per bullet.
Code

docs/ADRs/0096-skip-provably-unnecessary-review-dispatch.md[R120-123]

+- `/fs-review` remains a complete escape hatch for all three skips. A
+  maintainer can always force a review on a draft, a no-review-labeled PR, or
+  a prose-only PR by commenting.
+- `fullsend-no-review` currently requires manual label creation and
Relevance

●●● Strong

One-sentence-per-bullet is a deterministic ADR formatting requirement, and the bullets visibly
violate it.

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
Rule 1062091 requires each Consequences bullet to be one sentence. For example, the escape-hatch
bullet consists of two sentences, and later bullets contain additional multi-sentence detail.

docs/ADRs/0096-skip-provably-unnecessary-review-dispatch.md[120-125]
docs/ADRs/0096-skip-provably-unnecessary-review-dispatch.md[126-134]
Skill: writing-adrs

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 ADR Consequences bullets contain multiple sentences.

## Issue Context
Keep 3–5 bullets and rewrite every bullet as one concise sentence.

## Fix Focus Areas
- docs/ADRs/0096-skip-provably-unnecessary-review-dispatch.md[114-137]

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


8. Per-org changes not disclosed 📘 Rule violation § Compliance
Description
The PR modifies routing in the deprecated per-org scaffold, but its description does not explicitly
disclose that deprecated mode is affected or reference ADR 0044. The required deprecation warning is
therefore absent from the review context.
Code

internal/scaffold/fullsend-repo/.github/workflows/dispatch.yml[R201-204]

+                  if [[ "${EVENT_ACTION}" == "ready_for_review" || "${PR_IS_DRAFT}" != "true" ]] && ! has_label "fullsend-no-review" "${PR_LABELS}"; then
+                    if [[ "${PR_USER_LOGIN}" =~ \[bot\]$ ]] || is_event_actor_authorized "${PR_USER_LOGIN}" triage; then
+                      STAGE="review"
+                    fi
Relevance

●●● Strong

The PR changes deprecated scaffold routing and omits the required explicit ADR 0044 disclosure from
its description.

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
Rule 2795055 requires any change touching per-org installation content to be explicitly called out
in the PR description with an ADR 0044 reference. The scaffold routing is modified, and the new ADR
itself identifies that scaffold as the deprecated per-org mode, but the supplied PR description
contains no such disclosure.

Rule 2795055: Flag and avoid changes to deprecated per-org installation mode content (ADR 0044)
internal/scaffold/fullsend-repo/.github/workflows/dispatch.yml[196-204]
docs/ADRs/0096-skip-provably-unnecessary-review-dispatch.md[126-134]

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 PR changes deprecated per-org installation scaffold behavior without the required PR-description disclosure.

## Issue Context
Update the PR description to state that deprecated per-org installation behavior is touched and explicitly reference ADR 0044.

## Fix Focus Areas
- internal/scaffold/fullsend-repo/.github/workflows/dispatch.yml[196-210]
- docs/ADRs/0096-skip-provably-unnecessary-review-dispatch.md[126-134]

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



Informational

9. Workflow size limit weakened 📘 Rule violation ▣ Testability
Description
The per-file workflow limit is raised from 612 to 620, allowing the newly enlarged workflow to pass
instead of extracting its inline logic. This weakens an existing linter specifically guarding
against workflow logic accumulation.
Code

internal/scaffold/fullsend-repo/.github/workflows/dispatch.yml[2]

+# lint-workflow-size: max-lines=620
Relevance

● Weak

Recent, closely matching findings explicitly rejected raising workflow-size limits instead of
refactoring scaffold workflow logic.

PR-#5578
PR-#5244

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
Rule 1062076 prohibits weakening linters to make changes pass. The modified override raises the
accepted maximum, while the linter documentation identifies extraction into scripts as the
remediation for workflow growth.

Rule 1062076: Do not weaken tests or linters to make failures pass
internal/scaffold/fullsend-repo/.github/workflows/dispatch.yml[2-2]
hack/lint-workflow-size[45-57]

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-size lint limit was raised to accommodate additional inline workflow logic.

## Issue Context
The size linter directs oversized workflow logic into reusable scripts rather than increasing the per-file override.

## Fix Focus Areas
- internal/scaffold/fullsend-repo/.github/workflows/dispatch.yml[1-2]
- hack/lint-workflow-size[45-57]

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


10. ADR exceeds 100 lines 📜 Skill insight ⚙ Maintainability
Description
ADR 0096 contains 123 content lines after its frontmatter, exceeding the 100-line maximum. Its
extensive implementation detail should be reduced or moved to supporting documentation.
Code

docs/ADRs/0096-skip-provably-unnecessary-review-dispatch.md[R135-137]

+- Adds one paginated `gh api` call per review dispatch to fetch the
+  changed-file list — incurred only when a review would otherwise run, so it
+  never adds cost on top of a dispatch that was going to happen anyway.
Relevance

● Weak

A closely matching ADR length-limit finding was explicitly rejected by the team.

PR-#2582

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
Rule 1062092 limits ADR content excluding frontmatter to 100 lines. The frontmatter ends at line 13
and content continues through line 137, producing 123 content lines.

docs/ADRs/0096-skip-provably-unnecessary-review-dispatch.md[13-15]
docs/ADRs/0096-skip-provably-unnecessary-review-dispatch.md[135-137]
Skill: writing-adrs

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

## Issue description
ADR 0096 exceeds the maximum permitted content length.

## Issue Context
There are 123 lines after the frontmatter; retain the decision record and move implementation detail elsewhere.

## Fix Focus Areas
- docs/ADRs/0096-skip-provably-unnecessary-review-dispatch.md[15-137]

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


11. ADR Context is oversized 📜 Skill insight ⚙ Maintainability
Description
The Context contains an introductory paragraph, three substantial numbered blocks, and a concluding
paragraph. This exceeds the required 1–3 short paragraphs and restates operational detail at length.
Code

docs/ADRs/0096-skip-provably-unnecessary-review-dispatch.md[R34-36]

+There is no way to skip a review that provably shouldn't run:
+
+1. **Draft PRs.** Opening a draft or pushing to it dispatches a review
Relevance

● Weak

The team previously rejected shortening an oversized ADR Context section despite the same template
requirement.

PR-#2582

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
Rule 1062090 requires 1–3 short Context paragraphs. ADR 0096 uses an introductory block, three
multi-line numbered explanations, and a separate conclusion.

docs/ADRs/0096-skip-provably-unnecessary-review-dispatch.md[28-39]
docs/ADRs/0096-skip-provably-unnecessary-review-dispatch.md[40-50]
Skill: writing-adrs

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 ADR Context exceeds the required length and paragraph count.

## Issue Context
Summarize the motivation in no more than three short paragraphs and link the related problem documents for detail.

## Fix Focus Areas
- docs/ADRs/0096-skip-provably-unnecessary-review-dispatch.md[28-50]

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


Grey Divider

Context sources
✅ Compliance rules (platform): 72 rules
Review mode: ⚖️ Balanced

Grey Divider

Tip of the day
💡 Did you know, you can describe a rule in plain language on the Rules page and Qodo drafts it for you

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

Comment on lines +54 to +56
Three additive skips in `reusable-dispatch.yml`'s "Determine stage" step.

### 1. Draft skip

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Action required

2. Adr records three decisions 📜 Skill insight ⚙ Maintainability

ADR 0096 separately decides draft suppression, label-based suppression, and documentation-only
suppression. These are three independently applicable routing decisions and must not be recorded as
one ADR.
Agent Prompt
## Issue description
ADR 0096 records three distinct review-routing decisions in one Decision section.

## Issue Context
Each ADR must record exactly one decision; create separate ADRs with their own context and consequences.

## Fix Focus Areas
- docs/ADRs/0096-skip-provably-unnecessary-review-dispatch.md[52-112]

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

Comment on lines +2 to +3
title: "96. Skip provably unnecessary review dispatch"
status: Accepted

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Action required

3. Accepted adr lacks architecture update 📜 Skill insight ⚙ Maintainability

ADR 0096 is newly accepted, but this PR does not modify docs/architecture.md with a linked
Decided: entry. The accepted routing decision therefore is not reflected in the repository's
living architecture overview.
Agent Prompt
## Issue description
The new Accepted ADR has no corresponding architecture overview update.

## Issue Context
Add a surgical `Decided:` entry under the dispatch-related component and link ADR 0096; update related problem documents where the decision resolves an open question.

## Fix Focus Areas
- docs/ADRs/0096-skip-provably-unnecessary-review-dispatch.md[1-21]
- docs/architecture.md[46-60]
- docs/problems/agent-architecture.md[1-1]
- docs/problems/code-review.md[1-1]

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

Comment on lines +120 to +123
- `/fs-review` remains a complete escape hatch for all three skips. A
maintainer can always force a review on a draft, a no-review-labeled PR, or
a prose-only PR by commenting.
- `fullsend-no-review` currently requires manual label creation and

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Remediation recommended

6. Consequences use multiple sentences 📜 Skill insight ⚙ Maintainability

Several Consequences bullets contain multiple sentences and extended implementation rationale. The
required format is 3–5 bullets with exactly one sentence per bullet.
Agent Prompt
## Issue description
The ADR Consequences bullets contain multiple sentences.

## Issue Context
Keep 3–5 bullets and rewrite every bullet as one concise sentence.

## Fix Focus Areas
- docs/ADRs/0096-skip-provably-unnecessary-review-dispatch.md[114-137]

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

Comment on lines +23 to +26
Builds on [ADR 0034](0034-centralized-shim-routing-via-dispatch.md)
(centralized dispatch routing, and the `fullsend-no-fix` label pattern this
ADR mirrors) and [ADR 0054](0054-require-authorization-on-all-agent-dispatch-paths.md)
(authorization on all agent dispatch paths — unaffected by this change).

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Action required

7. Adr links outside context 📜 Skill insight ⚙ Maintainability

The related ADR cross-references are placed between Status and Context rather than inside the
Context section. This also introduces a free-standing block that does not follow the ADR template's
section order.
Agent Prompt
## Issue description
Related ADR references appear outside the Context section and disrupt the required template structure.

## Issue Context
Preserve the references but incorporate them concisely into the Context section.

## Fix Focus Areas
- docs/ADRs/0096-skip-provably-unnecessary-review-dispatch.md[19-30]

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

Comment thread docs/agents/review.md
| `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. |
| `fullsend-no-review` | Prevents automatic (bot-triggered) review runs on this PR. Mirrors the [fix agent](fix.md)'s `fullsend-no-fix` label. Explicit `/fs-review` commands are unaffected. Currently applied manually (no `/fs-review-stop` command yet — see [ADR 0096](../ADRs/0096-skip-provably-unnecessary-review-dispatch.md)). |

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Action required

8. Planned command lacks issue link 📜 Skill insight ≡ Correctness

The not-yet-implemented /fs-review-stop command is documented as follow-up work without a `>
**Planned:**` callout or issue link. Readers cannot trace the planned feature and may mistake the
prose for an informal commitment.
Agent Prompt
## Issue description
The guide mentions the unimplemented `/fs-review-stop` feature without the required planned-feature callout and tracking link.

## Issue Context
Create or reference the relevant issue and use the exact `> **Planned:**` blockquote format.

## Fix Focus Areas
- docs/agents/review.md[61-61]
- docs/ADRs/0096-skip-provably-unnecessary-review-dispatch.md[74-82]

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

Comment on lines +201 to +204
if [[ "${EVENT_ACTION}" == "ready_for_review" || "${PR_IS_DRAFT}" != "true" ]] && ! has_label "fullsend-no-review" "${PR_LABELS}"; then
if [[ "${PR_USER_LOGIN}" =~ \[bot\]$ ]] || is_event_actor_authorized "${PR_USER_LOGIN}" triage; then
STAGE="review"
fi

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Remediation recommended

9. Per-org changes not disclosed 📘 Rule violation § Compliance

The PR modifies routing in the deprecated per-org scaffold, but its description does not explicitly
disclose that deprecated mode is affected or reference ADR 0044. The required deprecation warning is
therefore absent from the review context.
Agent Prompt
## Issue description
The PR changes deprecated per-org installation scaffold behavior without the required PR-description disclosure.

## Issue Context
Update the PR description to state that deprecated per-org installation behavior is touched and explicitly reference ADR 0044.

## Fix Focus Areas
- internal/scaffold/fullsend-repo/.github/workflows/dispatch.yml[196-210]
- docs/ADRs/0096-skip-provably-unnecessary-review-dispatch.md[126-134]

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

if [[ -z "${PR_NUMBER}" || "${PR_NUMBER}" == "null" ]]; then
exit 0
fi
FILES=$(gh api "repos/${SOURCE_REPO}/pulls/${PR_NUMBER}/files" --paginate -F per_page=100 --jq '.[].filename') || {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Action required

10. Files request uses post 🐞 Bug ≡ Correctness

Adding -F per_page=100 makes gh api use POST unless --method GET is specified, but the
pull-request files endpoint is a GET operation. The request therefore enters the fail-open handler
without setting skipped=true, so documentation-only PRs continue dispatching reviews.
Agent Prompt
## Issue description
The changed-files request supplies `-F per_page=100` without explicitly selecting GET, causing `gh api` to send a POST request and making the documentation-only skip ineffective.

## Issue Context
The existing failure handler intentionally continues review dispatch when the API call fails, so this error does not fail the workflow but prevents every intended docs-only skip.

## Fix Focus Areas
- .github/workflows/reusable-dispatch.yml[555-558]
- internal/scaffold/workflow_call_alignment_test.go[653-654]

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

if [[ -z "${PR_NUMBER}" || "${PR_NUMBER}" == "null" ]]; then
exit 0
fi
FILES=$(gh api "repos/${SOURCE_REPO}/pulls/${PR_NUMBER}/files" --paginate -F per_page=100 --jq '.[].filename') || {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Action required

11. Renames bypass prose filter 🐞 Bug ≡ Correctness

The API query extracts only each file's new filename, so renaming an ADR or executable VitePress
source into a docs/*.md path is classified as prose-only. Such a PR is skipped even though it
removes or relocates content the change explicitly declares review-worthy.
Agent Prompt
## Issue description
The documentation-only filter ignores pull-file rename metadata and checks only the destination filename. A substantive file renamed into a matching Markdown path can therefore suppress review.

## Issue Context
Pull-file rename records include the old path separately as `previous_filename`. Either reject renamed files conservatively or classify both old and new paths, while preserving the 3000-file truncation safeguard.

## Fix Focus Areas
- .github/workflows/reusable-dispatch.yml[555-575]
- internal/scaffold/workflow_call_alignment_test.go[645-669]

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

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

Review sweep — 5 MEDIUM findings, 4 posted inline below; the one below targets a file not in this diff.

MEDIUM — User-facing bugfix guide still says closing the PR is the way to stop review (docs/guides/user/bugfix-workflow.md:169)

Verified on the PR head: docs/guides/user/bugfix-workflow.md:169 reads 'review is triggered automatically by PR events (pull_request_target), so closing the PR is the way to stop review dispatch'. This PR adds the fullsend-no-review label specifically as the lever to stop automatic review, and adds draft/docs-only skips, but the guide is not in the diff. The trigger descriptions at :83 ('review agents take over automatically'), :130/:134 ('Triggered by: pull_request_target events (PR opened, push to PR branch, ...)') and :183 ('Push commits ... the review agents will re-review') likewise do not mention the new skip exceptions. docs/agents/review.md was updated; this user-facing guide was not.

Suggestion: Update the 'Stopping automation' bullet at :169 to name the fullsend-no-review label as the way to stop automatic review (closing the PR is no longer the only option), and add a short note to the Stage 3 trigger description (:134) that drafts, fullsend-no-review-labeled PRs and docs-prose-only diffs are skipped unless /fs-review is used.

[[ -z "$f" ]] && continue
case "$f" in
docs/ADRs/*) skippable=false; break ;;
docs/*.md) ;;

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.

MEDIUMdocs/*.md skip swallows normative contract and contributing markdown the ADR says it protects

bash case globs match /, so the docs/*.md) ;; arm treats every nested markdown file under docs/ as skippable prose. Verified with the step's exact case block on the PR head: docs/normative/normalized-event/v1/README.md (NormalizedEvent v1 routing-input spec, ADR 0061), docs/normative/normalized-event/v1/jira-poll-adapter.md, docs/normative/prescript-output/v1/README.md (pre-script output contract) and docs/contributing/workflow-contracts.md (the sync contract governing the file this PR edits) all resolve to SKIP. ADR 0096 line 95 argues docs/* is dangerous precisely because it would swallow docs/normative/**, but the chosen pattern still swallows the normative prose specs alongside the JSON schema. A PR changing the documented meaning of a NormalizedEvent field without touching the JSON would receive no automatic review. docs/agents/review.md:47 documents only the ADR exclusion.

Suggestion: Add explicit non-skippable arms before docs/*.md: docs/normative/*|docs/contributing/*) skippable=false; break ;; (or invert to an allow-list of low-stakes prose directories such as docs/guides/*). Update ADR 0096 §3 and docs/agents/review.md:47 to state exactly which directories are excluded, and extend TestReviewRoutingDocsSkip to pin the new arms.


- Fewer wasted review runs: drafts, `fullsend-no-review`-labeled PRs, and
documentation-prose-only PRs no longer trigger automatic review dispatch,
reducing inference cost with no loss of coverage — nothing that would have

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.

MEDIUM — ADR 0096 asserts 'no loss of coverage' without evidence or threat-model evaluation

The Consequences bullet states 'no loss of coverage — nothing that would have been usefully reviewed is skipped' as settled fact, and the PR body says the work started from 'tallying dispatches', but no tally, cost figure, or sample of skipped PRs appears in the PR or ADR. Verified counter-evidence on head: (a) the glob already skips docs/normative/*.md and docs/contributing/*.md contract prose (see the comment at reusable-dispatch.yml:572); (b) the review agent's charter in fullsend-ai/agents docs/review.md lists 'docs currency' as a review dimension, and docs/agents/*.md + docs/contributing/*.md are the user-facing product surface — a docs-only follow-up to docs/agents/review.md (the page this PR edits) would itself be skipped; (c) docs/contributing/design-decisions.md:5 ranks external prompt injection as the top threat, and docs-only PRs are a low-friction path to land instruction-like prose that later agents read, with the automated reviewer disabled for exactly that path. The draft and label skips are self-evidently zero-loss; the docs skip is a judgement call shipped as fact. This is distinct from the existing threads on ADR format/length.

Suggestion: Either attach the dispatch tally (count and share of docs-only review runs over a stated window) and record in Consequences that the trade-off was evaluated against the injection threat model, or narrow the skip to an allow-list of low-stakes prose paths. In both cases soften the 'no loss of coverage' wording to describe the actual trade-off.

Comment thread docs/agents/review.md
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 by a user with triage-level repository permission or higher.

### Automatic skips

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.

MEDIUM — fullsend-ai/agents docs/review.md 'Triggers' section is now stale (needs a companion PR in the agents repo)

Verified against the live fullsend-ai/agents main: docs/review.md 'Triggers' states the review agent runs automatically when 'A PR/MR is opened' and 'New commits are pushed to a PR/MR (synchronized)', with no draft, fullsend-no-review, or docs-only caveat, and its Control labels table has no fullsend-no-review row. After this PR those statements are wrong for drafts, labeled PRs and docs-prose-only PRs. That document lives in fullsend-ai/agents (ADR 0058 split) and cannot be fixed from this repo; the PR and ADR reference no companion change.

Suggestion: Open a companion PR in fullsend-ai/agents updating docs/review.md Triggers (draft exclusion, fullsend-no-review label, docs-only skip with the exact exclusions) and its Control labels table, and link it from this PR and ADR 0096. Do not attempt to fix it via internal/scaffold/ here.

assert.Contains(t, s, "id: docs-lockfile-check")
assert.Contains(t, s, "steps.docs-lockfile-check.outputs.skipped != 'true'",
"job-level stage output must account for the docs skip")
assert.Contains(t, s, `if: steps.route.outputs.stage == 'review' && steps.role-check.outputs.skipped != 'true' && steps.agent-check.outputs.skipped != 'true'`,

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.

MEDIUMTestReviewRoutingDocsSkip pins substrings, not behaviour: passed green against a 404ing step and does not lock the /fs-review bypass guard

Verified on head. (1) The if: assertion at :651 checks only if: steps.route.outputs.stage == 'review' && steps.role-check.outputs.skipped != 'true' && steps.agent-check.outputs.skipped != 'true' and omits the trailing && github.event_name != 'issue_comment'; if that guard were removed the test still passes and the docs skip would apply to explicit /fs-review runs, contradicting ADR 0096's escape-hatch guarantee. (2) The gh-api pin at :653 matches the current command, which (per the existing thread at reusable-dispatch.yml:555) issues a POST and 404s, so the test passed CI while the feature it guards can never fire. (3) The two NotContains assertions at :663/:665 check literal strings (*.md|docs/*, package-lock.json|yarn.lock) that no plausible regression would produce, so they are trivially true. The PR body's claim that the tests were 'verified meaningful by reverting each guard' holds for TestReviewRoutingSkips' regexes but not for this function. hack/lint-workflow-size's own error text says logic belongs in scripts/ where it can be tested.

Suggestion: Add an explicit assertion that the docs-lockfile-check if: includes github.event_name != 'issue_comment'. When fixing the POST bug (the pin at :653 must change anyway), extract the step body to .github/scripts/check-docs-only-diff.sh and add a shell test that runs it with a stubbed gh on PATH covering: docs-only listing, a docs/ADRs/ entry, a docs/normative/ entry, a 3000-line listing, and a gh failure (fail-open). Keep the YAML test as a wiring check only, and cite a real dispatch run where the skip fired.

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.

2 participants