From 1cd81b347b9123a0db0934cd11856a75fb5d76b8 Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Fri, 30 Jan 2026 10:00:29 +0530 Subject: [PATCH] fix(copilot): eliminate verbose review summaries and restrict to staff (#65587) Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: raisedadead <1884376+raisedadead@users.noreply.github.com> --- .github/copilot-instructions.md | 101 ++++++++++++++----- .github/instructions/testing.instructions.md | 23 ++--- 2 files changed, 82 insertions(+), 42 deletions(-) diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 6aa22180cde..5dbe799f6b8 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -1,8 +1,57 @@ # GitHub Copilot Code Review Instructions -## Focus Areas +## Core Principles -This document guides Copilot code review on two key areas: +**CHECK REQUESTER AUTHORIZATION FIRST:** + +Before providing any review, verify if the person who requested the Copilot review is a member of the `@freecodecamp/staff` team. + +- If the requester is NOT part of `@freecodecamp/staff`, respond with ONLY this message: + ``` + Please use AI reviews in your local environment, and leave this feature to be used by fCC mods and Staff. + ``` + Do not provide any other feedback or review comments. + +- If the requester IS part of `@freecodecamp/staff`, proceed with the review following the guidelines below. + +--- + +**BE EXTREMELY MINIMAL.** Only provide actionable feedback. + +**Skip all non-essential content:** +- Do not generate "Pull request overview" sections +- Do not create "Changes:" lists describing what was changed +- Do not create "Reviewed changes" sections or tables +- Do not list files with change descriptions +- Do not count how many files were reviewed +- Do not summarize what the PR does (visible in the diff) + +**Focus only on problems:** +- Comment ONLY on actual issues that need fixing +- Keep each comment 1-3 sentences +- If everything is correct, provide no output + +**Bad example (from PR 65578):** +``` +## Pull request overview +This PR addresses issue 65331 by replacing em dash characters... + +### Reviewed changes +Copilot reviewed 4 out of 4 changed files... + +| File | Description | +| ---- | ----------- | +| file1.md | Updated em dash in seed content | +``` + +**Good example (actionable feedback only):** +``` +Line 46: Test will fail - `innerText` returns rendered `—`, not `—`. +``` + +--- + +## Focus Areas 1. **Test Coverage** - Ensuring adequate testing for code changes 2. **Pull Request Guidelines** - Compliance with contribution standards @@ -40,20 +89,15 @@ Do not comment if: ### Comment Style -If tests are missing, provide a brief, actionable nudge: +If tests are missing, provide ONE brief comment: ``` -Consider adding tests for the new/modified functionality in [specific file]. -For example: -- Test case for [specific scenario] -- Edge case handling for [specific condition] +Missing tests for [specific file]. Consider: +- [specific scenario] +- [edge case] ``` -If test coverage is sufficient: - -``` -LGTM -``` +If test coverage is sufficient, **DO NOT COMMENT**. No "LGTM" needed. --- @@ -117,39 +161,40 @@ Flag if: ### Comment Style -Keep feedback specific and reference the contribution guide: +Keep feedback minimal (one line when possible): ``` -Please update your PR title to follow conventional commits format: `(scope): description` +Update PR title to format: `(scope): description` See: https://contribute.freecodecamp.org/how-to-open-a-pull-request ``` ``` -Please link the related issue using `Closes #XXXXX` format in the PR description. +Link issue using: `Closes #XXXXX` ``` -If PR guidelines are followed: - -``` -LGTM -``` +If PR guidelines are followed, **DO NOT COMMENT**. No "LGTM" needed. --- ## General Guidelines -### Avoid +**Focus on Actionable Issues Only** -- Long explanations -- Generic comments without specific pointers -- Comments on non-functional changes -- Repeating information already in the PR discussion -- Commenting on the same issue multiple times +### Strict Rules + +- NO summaries, overviews, or descriptions of changes +- NO tables or file listings +- NO "LGTM" or affirmative comments when everything is fine +- Only comment when action is required +- Keep each comment brief and actionable ### Prioritization -When multiple issues exist, prioritize feedback in this order: +When multiple issues exist, address them in order of severity: -1. PR title/description compliance (most visible, easiest to fix) +1. Security vulnerabilities or critical bugs 2. Missing test coverage for new functionality 3. Outdated tests for modified functionality +4. PR title/description compliance + +Comment on all legitimate issues, but keep each comment concise. diff --git a/.github/instructions/testing.instructions.md b/.github/instructions/testing.instructions.md index 43ee5e106fb..45515b2723c 100644 --- a/.github/instructions/testing.instructions.md +++ b/.github/instructions/testing.instructions.md @@ -59,36 +59,31 @@ Flag if existing tests may be outdated: ### Example Comment for Outdated Tests ``` -The existing tests in `src/utils/validate.test.ts` may need updates to cover the new validation rules added in this PR. +Tests in `src/utils/validate.test.ts` need updates for new validation rules. ``` ## Comment Format ### Missing Tests -Keep feedback specific and actionable: +Brief, actionable feedback only: ``` -Consider adding tests for the changes in `src/utils/validate.ts`. -Suggested coverage: -- Valid input returns expected output -- Invalid input throws appropriate error -- Edge case: empty string handling +Missing tests for `src/utils/validate.ts`: +- Valid input case +- Invalid input error +- Empty string edge case ``` ### Sufficient Coverage -``` -LGTM -``` +**DO NOT COMMENT.** Silence means approval. ### Outdated Tests ``` -The tests in `[test file]` may need updates to reflect the changes to `[source file]`. -Specifically: -- [what behavior changed] -- [what test assertions may be affected] +Tests in `[test file]` need updates for `[source file]` changes: +- [specific change] ``` ## Test Quality Indicators