Skip to content

fix: the bug reproduced from #720 - #723

Open
dilux-bot[bot] wants to merge 3 commits into
mainfrom
fix/721-the-bug-reproduced-from-720
Open

dilux-bot[bot] wants to merge 3 commits into
mainfrom
fix/721-the-bug-reproduced-from-720

Conversation

@dilux-bot

@dilux-bot dilux-bot Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

📝 What changes

The review labels a pull request type:docs (and the "Correct the title's type" step writes docs: into its title) from the model's reading alone, while scripts/conventions.sh rejects a docs title as soon as one changed file is outside scripts/surface.py --docs-paths <kind>. A diff with a doc and a test is therefore labelled docs by one and refused by the other. The fix bounds the review's type by the same paths, in the one place both workflow steps already call, scripts/review-type.sh.

  • scripts/review-type.sh gains an optional trailing --diff KIND BASE HEAD: when the review's TYPE is docs and git diff --no-renames --name-only BASE...HEAD has a file that matches none of the globs python3 surface.py --docs-paths KIND prints (matched with the same shell case as conventions.sh), the review's type becomes chore. A type:* label a person set still wins, as today (it is theirs; the conventions check then tells them). If the docs paths cannot be read, the script fails, like an unreadable timeline. Without --diff it behaves exactly as now, so older callers keep working.
  • .github/workflows/claude-review.yml: the Verdict step and the "Correct the title's type" step pass --diff "$KIND" "$BASE" "$SHA" (KIND from steps.policy.outputs.kind, BASE the pull request's base SHA, the checkout already has full history); the review prompt's line on type says docs only when every file is documentation.
  • Self-tests in review-type.sh --test for: docs with a doc and a test → chore; docs with docs only → docs; a kind's own docs path (wordpress-plugin readme.txt) → docs; a non-docs type untouched; a person's type:docs label still stands; unreadable kind fails.
  • The reproduction test is added to the default branch exactly as written.

Option to decide: what the review's docs becomes when the diff has more than documentation.

  • (a) chore (recommended): closes any accepted issue, never claims new behaviour, and the reviewer cannot be second-guessed into feat/fix by a script.
  • (b) test when every other file is a test, else chore: closer to the Conventional Commits meaning, but needs a notion of "test path" per kind that the packs do not have yet.

Nothing widens a permission, secret, lane or limit.

💡 Why

Closes #721. The autopilot works it here in the open: one commit per criterion, each box ticked once its commit is pushed.

🎯 Acceptance criteria

  • C1 Given the reproduction test tests/repro/test_issue_720.py exactly as written, when it runs on the fix, then it passes, where it failed on b25a3cf.
    Test: tests/repro/test_issue_720.py

🧭 Decisions

  • 2026-11-11: The review's docs on a diff with files outside the docs paths becomes chore (the Spec's recommended option a): it c​loses any accepted issue and needs no per-kind notion of a test path.

🙌 Credits

🧪 How I tested it

  • The reproduction test, run in the sandbox at HEAD (repro-run.sh run-ref HEAD tests/repro/test_issue_720.py): outcome=passed. It failed on b25a3cf.
  • bash scripts/review-type.sh --test: every check passes, including the new ones for fix: a docs pull request that carries its test never passes conventions #720. They cover a doc plus a test becoming chore, docs only staying docs, wordpress-plugin's readme.txt counting as docs (and not counting without that kind), a non-docs type left as it was, a person's type:docs label still winning, an unreadable kind failing, and --diff without HEAD being refused. shellcheck is clean.
  • Every self-test the pull-request workflow's scripts job runs, plus pytest on tests/. Five self-tests fail here, and all five fail the same way on the base: plugin-i18n and design-lint need gettext and stylelint, which this runner lacks, and review-brief, autopilot.py and runner-vm/dx-runner-slot fail because of this runner's environment. The one pytest failure is in autopilot.py, which this change does not touch. actionlint is not installed here, so claude-review.yml was only checked to parse as YAML.
  • This repository has no make pre-pr.

The reproduction test tests/repro/test_issue_720.py at f35229f, the pull request's head, is the one that failed on the default branch (its SHA-256 is the sealed PRD's). The agent ran it in the sandbox (a clean copy of its commit; no network, no secrets) before finishing, and gate G7 runs it again the workflow way it was written, at the head, before it merges.

🤖 AI-generated · Claude Opus 5.5 (Anthropic)

Written by the reproduction job from the report in #720; it fails on main, which confirms the bug. The fix goes in on top of it.

🤖 AI-generated · claude-sonnet-5-5 (Anthropic)
@dilux-bot dilux-bot Bot added autopilot Opened by the autopilot from an accepted issue autopilot:run-1 The autopilot's runs on this pull request labels Nov 11, 2026
@dilux-bot

dilux-bot Bot commented Nov 11, 2026

Copy link
Copy Markdown
Contributor Author

@soydiloreto: accept it (the accepted label) or say why not #723

🤖 AI-generated · Claude Opus 5.5 (Anthropic)

@dilux-bot

dilux-bot Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor Author

The pull request's board

State
Waits on soydiloreto: accept it (the accepted label) or say why not (link)

🤖 AI-generated · Claude Opus 5.5 (Anthropic)

@dilux-bot dilux-bot Bot mentioned this pull request Nov 11, 2026
The review labelled a pull request type:docs, and wrote docs into its title, from the model's reading alone, while scripts/conventions.sh rejects a docs title as soon as a file is outside surface.py --docs-paths. scripts/review-type.sh now takes an optional --diff KIND BASE HEAD: the review's docs becomes chore when a changed file matches none of those paths, with the same case match as the conventions check. A person's type:* label still wins. Both workflow steps pass it, and the review's prompt says docs only when every file is documentation.

Assisted-by: Claude Opus 5.5 (Anthropic)
@dilux-bot

dilux-bot Bot commented Nov 11, 2026

Copy link
Copy Markdown
Contributor Author

@soydiloreto: accept it (the accepted label) or say why not #723

🤖 AI-generated · Claude Opus 5.5 (Anthropic)

@dilux-bot
dilux-bot Bot marked this pull request as ready for review November 11, 2026 21:39
@dilux-bot
dilux-bot Bot requested a review from soydiloreto as a code owner November 11, 2026 21:39
@dilux-bot

dilux-bot Bot commented Nov 11, 2026

Copy link
Copy Markdown
Contributor Author

@soydiloreto: accept it (the accepted label) or say why not #723

🤖 AI-generated · Claude Opus 5.5 (Anthropic)

This branch has not been deployed

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

Labels

autopilot:run-1 The autopilot's runs on this pull request autopilot Opened by the autopilot from an accepted issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The bug reproduced from #720

0 participants