diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 3a7fd203084..af9110a35ee 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -28,7 +28,7 @@ A companion guide `CLAUDE.md` at the repo root carries the shared rules for Clau - Updating documentation - Writing or improving unit tests - Code refactoring within established patterns -- Fixing linting/formatting issues +- Fixing linting/formatting issues — **proper lint fixes only**: fix the cause. Never use disable comments (`eslint-disable`, `noqa`, `type: ignore`, or similar) unless explicitly approved by the repository owner. - Updating dependencies (after checking security advisories) **Tasks requiring human review:** diff --git a/changelog.d/copilot-proper-lint-fixes.md b/changelog.d/copilot-proper-lint-fixes.md new file mode 100644 index 00000000000..1f71964d759 --- /dev/null +++ b/changelog.d/copilot-proper-lint-fixes.md @@ -0,0 +1,7 @@ +### Changed + +- **Copilot gets the "proper lint fixes only" rule.** The lint task line in + `.github/copilot-instructions.md` now says to fix the cause and never add + disable comments (`eslint-disable`, `noqa`, and similar) without the owner's + explicit approval, matching `CLAUDE.md`; the instruction tests pin the rule on + both sides. (#12190) diff --git a/tests/unit/test_agent_instructions.py b/tests/unit/test_agent_instructions.py index d1256af34b4..fcf4921c880 100644 --- a/tests/unit/test_agent_instructions.py +++ b/tests/unit/test_agent_instructions.py @@ -317,6 +317,13 @@ def test_every_named_skill_exists() -> None: ], # Owner decision 2026-10-15: no `pip` fallback for either audience. "python tooling is uv only": ["`uv` only", "never `pip`", "instead of falling back to `pip`"], + # Owner decision 2026-10-15. The pin carries the prohibition and its one + # exit (explicit approval), not just the topic "lint". + "proper lint fixes only, no disable comments": [ + "proper lint fixes only", + "never use disable comments", + "unless explicitly approved", + ], # The repository's most consequential rule, and the one an agent that opens # and edits PRs is most able to break: specs and implementations go through # the workflows, and their PRs are merged by `impl-merge`, never by hand.