Skip to content

Allow configuring the reviewable extension allow-list (e.g. Markdown docs) #1869

Done

Description

@smittie2000

Version: open-code-review v1.13.6 (891df1b), windows/amd64

ocr delegate preview excludes any file whose extension isn't on the built-in list (internal/config/allowlist/allowed_ext.go), with exclude_reason: "unsupported_ext". There's no flag, rule-file field or env var to extend it. A --rule entry with "path": "**/*.md" is accepted, but the .md files are still excluded.

Repro

git init && git commit --allow-empty -m base
mkdir -p crates/model && echo "# model" > crates/model/README.md && echo "fn a(){}" > crates/model/lib.rs
git add -A && git commit -m c
ocr delegate preview -f json --from HEAD~1 --to HEAD
# lib.rs reviewable; crates/model/README.md excluded: unsupported_ext

Why it matters: in some repos READMEs and docs/** are contracts (for example, which callers use an API, or limits). A PR that changes code and its README together gets the README skipped, so a README that contradicts the code goes unreviewed. In delegation mode the host model can review Markdown fine; it just never sees the file.

Ask: a way to add extensions or globs to the reviewable set. That could be an include list in the rule JSON (mirroring the existing exclude), or an --include flag on delegate preview/rule. Per-path rules could then give docs their own checklist.

We currently work around it downstream by picking unsupported_ext docs out of excluded_files and reviewing them separately.

Activity

  1. Walternater commented on Nov 12, 2026

    @Walternater
    Contributor

    I reproduced this on main (1d7cc44, darwin/arm64): the extension allowlist is configurable today through the top-level include field of .opencodereview/rule.json. The rules[].path entry in the report selects rule text, not file inclusion, which is why the .md file stayed excluded.

    Baseline with no config (same shape as your repro):

    crates/model/README.md -> excluded, exclude_reason: unsupported_ext
    crates/model/lib.rs    -> reviewable
    

    With <repo>/.opencodereview/rule.json:

    { "include": ["**/*.md"] }

    and the same --from <root> --to HEAD range:

    reviewable: [.opencodereview/rule.json, crates/model/README.md, crates/model/lib.rs]
    excluded: []
    

    lib.rs is still reviewable — include is additive, not a whitelist. The ordering is in internal/agent/selection.go (user_include returns before the extension gate), and internal/agent/preview_test.go already has an explicit include check overrides extension exclusion case using a fake .supportedext file.

    So the gap is discoverability rather than capability: pages/src/content/docs/en/review-rules.md describes include as bypassing built-in default exclude patterns and does not say it also overrides unsupported_ext. I can open a docs PR that states this (with the Markdown example above) and calls out the rules[].path vs include distinction — unless you would rather expose it as a dedicated additional_extensions field.


    Reproduced with AI assistance (DeepSeek Harness); the commands and outputs above were run on the SHA named.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions