Skip to content

docs(review-rules): note that include also overrides the extension allowlist - #1913

Merged
lizhengfeng101 merged 4 commits into
alibaba:mainfrom
Walternater:docs/include-covers-unsupported-ext
Nov 24, 2026
Merged

lizhengfeng101 merged 4 commits into
alibaba:mainfrom
Walternater:docs/include-covers-unsupported-ext

Conversation

@Walternater

@Walternater Walternater commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Description

include in .opencodereview/rule.json already overrides the built-in extension allowlist for matching paths: internal/agent/selection.go returns from the user-include gate before the unsupported_ext check, and internal/agent/preview_test.go asserts it (include check overrides extension exclusion, using a fake .supportedext file). The docs described include only as a bypass for default exclude patterns, so #1869 reasonably concluded there was no way to review a Markdown contract.

This documents the existing behavior in en, zh, ja, ko, and ru, with a Markdown example, and calls out that rules[].path selects rule text rather than files.

Related issues

Refs #1869 — this documents the existing answer; it does not change behavior.

Type of Change

  • Documentation update

How Has This Been Tested?

Documentation only. Verified against main (1d7cc44, darwin/arm64) with a scratch repo:

  • before: crates/model/README.md → excluded, exclude_reason: unsupported_ext
  • after .opencodereview/rule.json = {"include": ["**/*.md"]}:
    reviewable: [".opencodereview/rule.json", "crates/model/README.md", "crates/model/lib.rs"], excluded: []

Checklist

  • My code follows the project's coding style (go fmt, go vet) — docs-only, no Go changes
  • I have performed a self-review of my code
  • I have added tests that prove my fix is effective or my feature works — docs-only, no behavior change
  • New and existing unit tests pass locally with my changes — no Go changes
  • I have updated the documentation accordingly
  • I have signed the CLA (existing Alibaba CLA; license/cla passes)
  • I did not use AI/LLM to create this PR, or I disclosed the tool/model below and reviewed its output; I did not attribute commits to AI and will answer maintainer questions and review comments myself without AI/LLM.

AI disclosure

The wording was drafted with AI assistance (DeepSeek Harness, deepseek-v4.1-flash). The behavior it documents and the reproduction above were executed against main at 1d7cc44; no commit attributes the change to AI.

…lowlist

The rule-file format documented include only as a bypass for the built-in
default exclude patterns. In selection.go a matching include returns before
the unsupported_ext gate, and preview_test.go already asserts that behavior
(the fake .supportedext case). Say so in all five locales, with a Markdown
example and a note that rules[].path selects rule text rather than files.
@github-actions

Copy link
Copy Markdown
Contributor

✅ OpenCodeReview: Review skipped: no items were selected.

…erride

The same include list already brings back an unsupported extension; say it
where the page first tells readers how to recover an excluded file.

@Walternater Walternater left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Friendly ping — this has been open since Nov 12 (5 days) with all checks green (Pages CI, plugin-contract, CodeQL, translation-sync) and CLA signed. It's docs-only: five locale review-rules.md files noting that include also overrides the extension allowlist (which is what #1869 was actually asking for — the behavior already exists in selection.go), plus a Markdown example and a note that rules[].path selects rule text, not files.

@lizhengfeng101 any chance to take a look? Happy to adjust wording or split it if that makes review easier. No urgency beyond avoiding bitrot — the branch was rebased on Nov 14 and is still mergeable.

AI-assisted (DeepSeek Harness, deepseek-v4.1-flash).

@Walternater Walternater left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Friendly ping — open since Nov 12 (5 days), all checks green (Pages CI, plugin-contract, CodeQL, translation-sync) and CLA signed. Docs-only: five locale review-rules.md files noting that include also overrides the extension allowlist (what #1869 was asking for — the behavior already exists in selection.go), plus a Markdown example and a note that rules[].path selects rule text, not files. Happy to adjust wording or split it if that helps. Branch was rebased on Nov 14 and is still mergeable. AI-assisted (DeepSeek Harness, deepseek-v4.1-flash).

@Walternater Walternater left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Reviewing my own understanding of the current state to keep the record straight:

  • include already overrides the extension allowlist today (internal/agent/selection.go returns ExcludeNone for user includes before the unsupported_ext check), which is what #1869 reported as missing. This PR adds no behavior — it documents the existing path in all five locales, plus a Markdown example and the distinction between include (files) and rules[].path (rule text).
  • Rebased on Nov 14; still mergeable.
  • All CI green, CLA signed.

@lizhengfeng101 whenever you have a minute. If you would rather fold this into a broader review-rules docs pass, say so and I will close it.

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

@lizhengfeng101
lizhengfeng101 merged commit 0325f5b into alibaba:main Nov 24, 2026
1 check passed
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