Skip to content

[CI] Add documentation checks to AI Review - #23299

Merged
zhangxinyuehfad merged 3 commits into
vllm-project:mainfrom
MrZ20:ai_doc_quality
Nov 26, 2026
Merged

zhangxinyuehfad merged 3 commits into
vllm-project:mainfrom
MrZ20:ai_doc_quality

Conversation

@MrZ20

@MrZ20 MrZ20 commented Nov 26, 2026 •

Copy link
Copy Markdown
Collaborator

What this PR does / why we need it?

This PR extends AI Review to assess documentation changes against internal standards and report documentation findings alongside code findings in the same /ai-review round.

The review covers root READMEs, project and Triton operator documentation, and Chinese translations. If an author withdraws a documentation change, the agent can verify the withdrawal and resolve the original finding; issues that persist after content is moved remain open.

Does this PR introduce any user-facing change?

PR authors can receive documentation findings in AI Review. This is a contributor workflow change, so no release note fragment is needed.

How was this patch tested?

Local validation:

  • .venv/bin/pytest -q .github/workflows/scripts/test_ai_review.py: 56 passed.
  • .venv/bin/mkdocs build --site-dir /private/tmp/vllm-ascend-doc-quality-site: passed.
  • .venv/bin/python .github/workflows/scripts/check_md_links.py docs/source/community/ai-review.md --timeout 60 --report-dir /private/tmp/vllm-ascend-doc-quality-linkcheck-network: passed.
  • bash format.sh ci in the project virtual environment: all checks passed except gitleaks-offline-scan; the downloaded binary cannot execute on macOS. The diff adds no secrets; CI must confirm this check.
  • git diff --check: passed.

Checklist

Testing

  • Boundary / edge-case coverage: I reviewed whether this change involves
    boundary conditions (e.g. empty input, single/zero element, min/max values,
    off-by-one, sequence-length limits, integer overflow). Where applicable, I
    added unit tests covering these edge cases in tests/ut/ or tests/e2e/.

  • Regression test: If this PR fixes a bug, I added a regression test
    that would fail without the fix.

  • Error / failure path coverage: I covered abnormal paths (exceptions,
    timeouts, out-of-range, division by zero) in addition to the happy path.

  • Meaningful & reliable tests: New tests assert real behavior and are
    not written merely to satisfy CI.

  • Performance impact: If this PR touches a performance-sensitive path,
    I attached benchmark results and added performance regression tests.

  • vLLM main: vllm-project/vllm@c410543

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request introduces a new doc-quality domain for the AI review process, which includes adding a checklist, updating CODEOWNERS, configuring domain paths in domains.yaml, and documenting the new process in ai-review.md. Feedback on the changes highlights that the glob pattern docs/*.md in domains.yaml only matches files in the root of the docs/ directory and should be updated to docs/**/*.md to recursively match all documentation files.

Comment thread .github/agent-review/domains.yaml Resolved
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Nov 26, 2026
@github-actions

Copy link
Copy Markdown
Contributor

👋 Hi! Thank you for contributing to the vLLM Ascend project. The following points will speed up your PR merge:‌‌

  • A PR should do only one thing, smaller PRs enable faster reviews.
  • Every PR should include unit tests and end-to-end tests ‌to ensure it works and is not broken by other future PRs.
  • Write the commit message by fulfilling the PR description to help reviewer and future developers understand.

If CI fails, you can run linting and testing checks locally according Contributing and Testing.

🤖 How to trigger CI

CI runs automatically when the PR is opened or reopened. Pushing a new commit no longer re-runs the E2E CI (to save NPU runner resources), so use the comment commands below when needed. They are available to the PR author and users with triage permission or above:

  • /run — run the full PR CI gate on the latest commit.
  • /rerun — re-run the failed CI jobs (e.g. after a flaky failure).
  • /e2e — run selected E2E tests instead of the full gate.
  • /nightly / /presmoke / /weekly — run the corresponding large-scale tests (triage permission or above; blocked during the nightly maintenance window).
  • /cancel — cancel a running CI on this PR.

Note

Until the CI gate has run on a commit, the required ci-gate check stays pending and the PR cannot merge — remember to comment /run after pushing.

@MrZ20 MrZ20 added the ai-review enable ai agent review for the pr label Nov 26, 2026
@vllm-ascend-ci

Copy link
Copy Markdown
Collaborator

@MrZ20 [AI review bot]: Permission denied. This action requires repository write access.

@github-actions

github-actions Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Last updated: 2026-11-26 19:54 UTC+8 for commit 9373dd1.

ci-gate failed Resolved: the ci-gate passed for commit 9373dd1. Keeping this comment so the history stays visible; it will be updated again if a later run on this commit fails.

@MrZ20 MrZ20 removed the ai-review enable ai agent review for the pr label Nov 26, 2026
@vllm-ascend-ci

Copy link
Copy Markdown
Collaborator

@MrZ20 [AI review bot]: Permission denied. This action requires repository write access.

@zhangxinyuehfad zhangxinyuehfad added the ai-review enable ai agent review for the pr label Nov 26, 2026
@vllm-ascend-ci

Copy link
Copy Markdown
Collaborator

@zhangxinyuehfad [AI review bot]: Review request accepted. The bot will check the round limit before starting.
View Actions run

wangxiyuan pushed a commit that referenced this pull request Nov 26, 2026
…ding statuses (#23318)

### What this PR does / why we need it?

AI review hit two problems on #23299. An allowlisted reviewer with the
`triage` role applied the `ai-review` label, but the bot rejected the
request because the reviewer lacked repository write access. A later
request passed authorization, but `git fetch` failed before the model
started. The Actions job ended while the commit’s `ai-review` status
still showed `pending`. [[Bot
response](https://github.com/vllm-project/vllm-ascend/pull/23299#issuecomment-7180374326)](https://github.com/vllm-project/vllm-ascend/pull/23299#issuecomment-7180374326)
· [[Failed Actions
job](https://github.com/vllm-project/vllm-ascend/actions/runs/45740541953/job/139644529048)](https://github.com/vllm-project/vllm-ascend/actions/runs/45740541953/job/139644529048)

This PR fixes three parts of that flow.

1. **Let allowlisted reviewers start a review by applying the label.**
GitHub already checks who can manage PR labels. The bot now checks
whether the person who applied `ai-review` is on the pilot allowlist. If
they are, the first review starts. If they are outside the pilot, the
bot explains why and removes the label. Removing `ai-review` directly
also stops the session and clears `ai-review-passed`. Comment
permissions stay the same. The PR author or someone with write access
can request a follow-up with `/ai-review`. The `/ai-review-stop` and
`/ai-review-waive` commands still require write access.

2. **Make the checkout usable by the review script.** `actions/checkout`
added the workspace to its temporary Git configuration. The next step
ran with a different configuration, so Git rejected the directory with
`detected dubious ownership`. All three fetch attempts failed for the
same reason. The prepare step now explicitly trusts `$GITHUB_WORKSPACE`
before fetching the commits and computing the PR diff.

3. **Set `pending` when the model review starts.** A failure during
preparation no longer leaves a pending status behind. If the model call
or result publication fails, the script attempts to mark the reviewed
commit as `error` and preserves the original exception in the Actions
log. It also clears `pending` on the reviewed commit if the review
stops, the PR closes, or the result is discarded after the code changes.
Round counting still follows the published summary. A failure before
publication costs no round, while a published discard notice counts as
one round for the reviewed version.

### Does this PR introduce _any_ user-facing change?

### How was this patch tested?

---

### Checklist

#### Testing

- [ ] **Boundary / edge-case coverage**: I reviewed whether this change
involves
boundary conditions (e.g. empty input, single/zero element, min/max
values,
off-by-one, sequence-length limits, integer overflow). Where applicable,
I
added unit tests covering these edge cases in `tests/ut/` or
`tests/e2e/`.
- [ ] **Regression test**: If this PR fixes a bug, I added a regression
test
  that would fail without the fix.
- [ ] **Error / failure path coverage**: I covered abnormal paths
(exceptions,
timeouts, out-of-range, division by zero) in addition to the happy path.
- [ ] **Meaningful & reliable tests**: New tests assert real behavior
and are
  not written merely to satisfy CI.
- [ ] **Performance impact**: If this PR touches a performance-sensitive
path,
  I attached benchmark results and added performance regression tests.

- vLLM main:
vllm-project/vllm@c410543

Signed-off-by: MrZ20 <2609716663@qq.com>
@MrZ20

MrZ20 commented Nov 26, 2026 •

Copy link
Copy Markdown
Collaborator Author

/ai-review


[AI review bot]: Review request accepted. The bot will check the round limit before starting.
View Actions run

zhangxinyuehfad pushed a commit that referenced this pull request Nov 26, 2026
Give the reviewer explicit snapshot paths, evidence requirements and a
stopping point after open findings have been checked. Mark accepted and
rejected bot replies so contributors can follow each stage of a request.

Validation: all 47 local AI review tests and the repository format
checks passed.

### What this PR does / why we need it?
On #23299, the review agent kept revisiting questions about Git and
Python path matching until the run reached its 600-second timeout. The
prompt also left room for confusion about which checkout contained the
proposed changes. Separately, accepted and rejected commands looked
almost identical in the PR conversation. [Review
run](https://github.com/vllm-project/vllm-ascend/actions/runs/45745785712/job/139661631568)

This PR updates the review instructions and the feedback contributors
see when they use the bot.

- **Make the review inputs clear.** The prompt identifies the trusted
workflow checkout, the proposed code under `head/`, and the merge base
under `base/`. It also makes clear that review checklists take
precedence when project guidance conflicts.
- **Give the reviewer a clear stopping point.** Report applicable
checklist violations and correctness bugs supported by the change. Once
the evidence rules out a concern, move on. If important information is
missing, explain the gap in the summary. After reviewing the diff and
rechecking open findings, return the result, including an empty findings
list when appropriate.
- **Make findings easier to verify.** Point to the exact line in the
proposed code when possible. Reuse the existing finding ID when a
problem moves or is partially fixed. When marking it resolved, cite the
code that fixed it or the diff that removed it. If a design choice needs
a maintainer, explain the options and their trade-offs.
- **Make command replies easier to scan.** Bot replies now start with 🤖.
A green circle marks an accepted request or a completed operation. A red
circle marks a rejection and is followed by the reason.

### Does this PR introduce _any_ user-facing change?

PR contributors will see feedback like this:

> 🤖 [AI review bot]: 🟢 Review request accepted. The bot will check the
round limit before starting.

> 🤖 [AI review bot]: 🔴 Permission denied. This action requires
repository write access.

The green reply confirms that the command was accepted. If the
subsequent check finds that the round limit has been reached, the bot
appends a red reply to the same comment. The review verdict still
appears in the review summary. This change affects the repository bot
only.

### How was this patch tested?

- `.venv/bin/pytest -q .github/workflows/scripts/test_ai_review.py` —
all 47 tests passed on the new branch. Coverage includes accepted and
rejected commands, waiver results, and a request that is accepted before
the round-limit check rejects it.
- `bash format.sh ci` — passed.
- Review duration with the updated prompt has not been measured in a
live model run.

---

### Checklist

#### Testing

- [ ] **Boundary / edge-case coverage**: I reviewed whether this change
involves
boundary conditions (e.g. empty input, single/zero element, min/max
values,
off-by-one, sequence-length limits, integer overflow). Where applicable,
I
added unit tests covering these edge cases in `tests/ut/` or
`tests/e2e/`.
- [ ] **Regression test**: If this PR fixes a bug, I added a regression
test
  that would fail without the fix.
- [ ] **Error / failure path coverage**: I covered abnormal paths
(exceptions,
timeouts, out-of-range, division by zero) in addition to the happy path.
- [ ] **Meaningful & reliable tests**: New tests assert real behavior
and are
  not written merely to satisfy CI.
- [ ] **Performance impact**: If this PR touches a performance-sensitive
path,
  I attached benchmark results and added performance regression tests.

- vLLM main:
vllm-project/vllm@c410543

Signed-off-by: MrZ20 <2609716663@qq.com>
@MrZ20

MrZ20 commented Nov 26, 2026 •

Copy link
Copy Markdown
Collaborator Author

/ai-review


🤖 [AI review bot]: 🟢 Review request accepted. The bot will check the round limit before starting.
View Actions run

@MrZ20

MrZ20 commented Nov 26, 2026 •

Copy link
Copy Markdown
Collaborator Author

/ai-review


🤖 [AI review bot]: 🟢 Review request accepted. The bot will check the round limit before starting.
View Actions run

@MrZ20

MrZ20 commented Nov 26, 2026 •

Copy link
Copy Markdown
Collaborator Author

/ai-review


🤖 [AI review bot]: 🟢 Review request accepted. The bot will check the round limit before starting.
View Actions run

@zhangxinyuehfad

zhangxinyuehfad commented Nov 26, 2026 •

Copy link
Copy Markdown
Collaborator

/ignore-owner docs/source/community/ai-review.md
[Bot]: ignore-owner command accepted. The CODEOWNERS approval gate will skip the ignored paths on every CI run of this PR from now on (a bare /ignore-owner ignores the whole PR; /ignore-owner-clear revokes). The CODEOWNERS coverage health check is never waived.

The ci-gate job is being re-run so it re-judges the latest command. Only the gate is re-run, not the NPU UT/E2E jobs; failures caused by code or tests stay red.

@zhangxinyuehfad

zhangxinyuehfad commented Nov 26, 2026 •

Copy link
Copy Markdown
Collaborator

/ignore-owner-clear
[Bot]: ignore-owner-clear command accepted. The CODEOWNERS approval gate will require owner approval for all paths again on every CI run of this PR from now on. The CODEOWNERS coverage health check is never waived.

The ci-gate job is being re-run so it re-judges the latest command. Only the gate is re-run, not the NPU UT/E2E jobs; failures caused by code or tests stay red.

Signed-off-by: MrZ20 <2609716663@qq.com>
Signed-off-by: MrZ20 <2609716663@qq.com>
@MrZ20 MrZ20 changed the title [CI] Integrate doc-quality standards into AI Review [CI] Add documentation checks to AI Review Nov 26, 2026
Signed-off-by: Mrz20 <2609716663@qq.com>
Comment thread .github/agent-review/domains.yaml Resolved
@zhangxinyuehfad
zhangxinyuehfad enabled auto-merge (squash) November 26, 2026 11:42
@zhangxinyuehfad
zhangxinyuehfad enabled auto-merge (squash) November 26, 2026 11:42
@MrZ20

MrZ20 commented Nov 26, 2026 •

Copy link
Copy Markdown
Collaborator Author

/run
[Bot]: run command accepted. E2E has been queued on the latest commit 9373dd1a9608af007bef8b020ad0d59fc8cd01f0 of this PR, with whatever test-scope labels the PR currently carries. Track progress in PR checks.

@vllm-ascend-ci vllm-ascend-ci added the ci-run E2E requested manually on the latest commit label Nov 26, 2026
@zhangxinyuehfad
zhangxinyuehfad merged commit 30c2991 into vllm-project:main Nov 26, 2026
34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-review enable ai agent review for the pr ci-run E2E requested manually on the latest commit documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants