From a1b947aa1048e28e68893677a781aa523517ed9b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 26 Jun 2025 05:11:19 +0000 Subject: [PATCH 1/4] Initial plan From b467e7ff971351fccd2ae4ea50d4e48f25ef7984 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 26 Jun 2025 05:15:38 +0000 Subject: [PATCH 2/4] Add prominent MANDATORY STEPS section and strengthen language for critical build commands Co-authored-by: RyanCavanaugh <6685088+RyanCavanaugh@users.noreply.github.com> --- .github/copilot-instructions.md | 37 +++++++++++++++++++++++++-------- 1 file changed, 28 insertions(+), 9 deletions(-) diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 47229f1f7c791..f2277bb614587 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -2,6 +2,23 @@ This document provides a concise guide for writing TypeScript fourslash tests and compiler tests, along with build instructions. +## ⚠️ MANDATORY STEPS - DO NOT SKIP! ⚠️ + +**ALWAYS follow these three mandatory steps in this exact order:** + +1. **🚨 ALWAYS START HERE:** `npx hereby lint` + - Run linting FIRST before making any changes + - Fix all linting issues before proceeding + +2. **🚨 MANDATORY:** `npx hereby runtests-parallel` + - This is REQUIRED, not optional! + - Takes up to 15 minutes - patience is a virtue + - Must pass before submitting any changes + +3. **🚨 FINAL STEP:** `npx hereby format` + - ALWAYS run as your very last step + - Ensures consistent line endings and formatting + ## Build Instructions Summary ### Setup @@ -15,13 +32,13 @@ npx hereby local # Build the compiler into built/local npx hereby clean # Delete the built compiler npx hereby tests # Build the test infrastructure npx hereby runtests # Run all tests -npx hereby runtests-parallel # Run tests in parallel (recommended) +npx hereby runtests-parallel # Run tests in parallel (MANDATORY FOR ALL CHANGES!) npx hereby runtests --runner=fourslash # Run only fourslash tests npx hereby runtests --runner=compiler # Run only compiler tests npx hereby runtests --tests= # Run specific test npx hereby baseline-accept # Accept new test baselines -npx hereby lint # Run eslint -npx hereby format # Run code formatting +npx hereby lint # Run eslint (MANDATORY - ALWAYS START HERE!) +npx hereby format # Run code formatting (MANDATORY - ALWAYS END HERE!) ``` ## Fourslash Test Syntax Guide @@ -260,8 +277,8 @@ npx hereby runtests --tests=tests/cases/fourslash/completion*.ts ### Keeping Things Tidy -- Once you think you're done, run `npx hereby lint` and fix any issues -- Then always run `npx hereby format` as your last step +- **MANDATORY:** You MUST run `npx hereby lint` and fix ALL issues +- **MANDATORY:** You MUST run `npx hereby format` as your absolute final step ### Test Locations @@ -317,11 +334,13 @@ When fixing bugs or implementing features, follow this workflow: - Once you've got the basics figured out, enhance your test to cover edge cases and other variations - Run the test again and commit the baseline diff along with the test edit -5. **Run all other tests to ensure you didn't break anything** - - Run `npx hereby runtests-parallel` and wait for it to finish (10-15 minutes is normal!) +5. **MANDATORY: Run all other tests to ensure you didn't break anything** + - **REQUIRED:** Run `npx hereby runtests-parallel` and wait for it to finish (10-15 minutes is normal!) + - This step is MANDATORY, not optional - patience is essential! - Some collateral baseline changes are normal, but review for correctness - Put these diffs in another commit -6. **Always format and lint** - - Don't forget to run `npx hereby lint` and `npx hereby format` before you're done +6. **MANDATORY: Always format and lint** + - **REQUIRED:** Run `npx hereby lint` and fix ALL issues + - **REQUIRED:** Run `npx hereby format` before you're done - Double-check your line endings. Source files in this repo typically use CRLF line endings. Fix all line endings to be consistent before you wrap up From 2a19062ff7354636302d941005ad3bd23ca52b3c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 26 Jun 2025 05:34:01 +0000 Subject: [PATCH 3/4] Fix Copilot instructions per maintainer feedback - only run lint/test/format after changes Co-authored-by: RyanCavanaugh <6685088+RyanCavanaugh@users.noreply.github.com> --- .github/copilot-instructions.md | 41 +++++++++++---------------------- 1 file changed, 13 insertions(+), 28 deletions(-) diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index f2277bb614587..e734a2be9248d 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -2,23 +2,6 @@ This document provides a concise guide for writing TypeScript fourslash tests and compiler tests, along with build instructions. -## ⚠️ MANDATORY STEPS - DO NOT SKIP! ⚠️ - -**ALWAYS follow these three mandatory steps in this exact order:** - -1. **🚨 ALWAYS START HERE:** `npx hereby lint` - - Run linting FIRST before making any changes - - Fix all linting issues before proceeding - -2. **🚨 MANDATORY:** `npx hereby runtests-parallel` - - This is REQUIRED, not optional! - - Takes up to 15 minutes - patience is a virtue - - Must pass before submitting any changes - -3. **🚨 FINAL STEP:** `npx hereby format` - - ALWAYS run as your very last step - - Ensures consistent line endings and formatting - ## Build Instructions Summary ### Setup @@ -32,13 +15,13 @@ npx hereby local # Build the compiler into built/local npx hereby clean # Delete the built compiler npx hereby tests # Build the test infrastructure npx hereby runtests # Run all tests -npx hereby runtests-parallel # Run tests in parallel (MANDATORY FOR ALL CHANGES!) +npx hereby runtests-parallel # Run tests in parallel npx hereby runtests --runner=fourslash # Run only fourslash tests npx hereby runtests --runner=compiler # Run only compiler tests npx hereby runtests --tests= # Run specific test npx hereby baseline-accept # Accept new test baselines -npx hereby lint # Run eslint (MANDATORY - ALWAYS START HERE!) -npx hereby format # Run code formatting (MANDATORY - ALWAYS END HERE!) +npx hereby lint # Run eslint +npx hereby format # Run code formatting ``` ## Fourslash Test Syntax Guide @@ -277,8 +260,10 @@ npx hereby runtests --tests=tests/cases/fourslash/completion*.ts ### Keeping Things Tidy -- **MANDATORY:** You MUST run `npx hereby lint` and fix ALL issues -- **MANDATORY:** You MUST run `npx hereby format` as your absolute final step +- You can assume lint, tests, and formatting are clean on a fresh clone +- Only run these verification steps AFTER making changes to code +- Run `npx hereby lint` and fix ALL issues after making changes +- Run `npx hereby format` as your final step after making changes ### Test Locations @@ -334,13 +319,13 @@ When fixing bugs or implementing features, follow this workflow: - Once you've got the basics figured out, enhance your test to cover edge cases and other variations - Run the test again and commit the baseline diff along with the test edit -5. **MANDATORY: Run all other tests to ensure you didn't break anything** - - **REQUIRED:** Run `npx hereby runtests-parallel` and wait for it to finish (10-15 minutes is normal!) - - This step is MANDATORY, not optional - patience is essential! +5. **Run all other tests to ensure you didn't break anything** + - Run `npx hereby runtests-parallel` and wait for it to finish (10-15 minutes is normal!) + - This step is mandatory after making changes - patience is essential! - Some collateral baseline changes are normal, but review for correctness - Put these diffs in another commit -6. **MANDATORY: Always format and lint** - - **REQUIRED:** Run `npx hereby lint` and fix ALL issues - - **REQUIRED:** Run `npx hereby format` before you're done +6. **Lint and format your changes** + - Run `npx hereby lint` and fix ALL issues + - Run `npx hereby format` before you're done - Double-check your line endings. Source files in this repo typically use CRLF line endings. Fix all line endings to be consistent before you wrap up From 645efcb0cb324e5ff0606921951e12952ab85a11 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 26 Jun 2025 05:44:28 +0000 Subject: [PATCH 4/4] Emphasize mandatory lint/test/format steps before finishing work - address maintainer feedback about agents skipping critical verification steps Co-authored-by: RyanCavanaugh <6685088+RyanCavanaugh@users.noreply.github.com> --- .github/copilot-instructions.md | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index e734a2be9248d..7a2fd0898a454 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -15,13 +15,13 @@ npx hereby local # Build the compiler into built/local npx hereby clean # Delete the built compiler npx hereby tests # Build the test infrastructure npx hereby runtests # Run all tests -npx hereby runtests-parallel # Run tests in parallel +npx hereby runtests-parallel # Run tests in parallel 🚨 MANDATORY BEFORE FINISHING! npx hereby runtests --runner=fourslash # Run only fourslash tests npx hereby runtests --runner=compiler # Run only compiler tests npx hereby runtests --tests= # Run specific test npx hereby baseline-accept # Accept new test baselines -npx hereby lint # Run eslint -npx hereby format # Run code formatting +npx hereby lint # Run eslint 🚨 MANDATORY BEFORE FINISHING! +npx hereby format # Run code formatting 🚨 MANDATORY BEFORE FINISHING! ``` ## Fourslash Test Syntax Guide @@ -258,6 +258,16 @@ npx hereby runtests --tests=tests/cases/fourslash/completion*.ts ## Important Guidelines +### 🚨 CRITICAL: Before Finishing Your Work 🚨 + +**THESE STEPS ARE MANDATORY BEFORE COMMITTING/PUSHING ANY CHANGES:** + +1. **MUST RUN:** `npx hereby runtests-parallel` (even though it takes 10-15 minutes) +2. **MUST RUN:** `npx hereby lint` and fix ALL lint issues +3. **MUST RUN:** `npx hereby format` as the final step + +**❌ PRs that fail these checks will be rejected without review.** + ### Keeping Things Tidy - You can assume lint, tests, and formatting are clean on a fresh clone @@ -319,13 +329,14 @@ When fixing bugs or implementing features, follow this workflow: - Once you've got the basics figured out, enhance your test to cover edge cases and other variations - Run the test again and commit the baseline diff along with the test edit -5. **Run all other tests to ensure you didn't break anything** - - Run `npx hereby runtests-parallel` and wait for it to finish (10-15 minutes is normal!) - - This step is mandatory after making changes - patience is essential! +5. **🚨 MANDATORY: Run all other tests to ensure you didn't break anything** + - **REQUIRED:** Run `npx hereby runtests-parallel` and wait for it to finish (10-15 minutes is normal!) + - **THIS STEP CANNOT BE SKIPPED** - patience is essential! - Some collateral baseline changes are normal, but review for correctness - Put these diffs in another commit -6. **Lint and format your changes** - - Run `npx hereby lint` and fix ALL issues - - Run `npx hereby format` before you're done +6. **🚨 MANDATORY: Lint and format your changes** + - **REQUIRED:** Run `npx hereby lint` and fix ALL issues + - **REQUIRED:** Run `npx hereby format` before you're done + - **YOU CANNOT FINISH WITHOUT THESE STEPS** - Double-check your line endings. Source files in this repo typically use CRLF line endings. Fix all line endings to be consistent before you wrap up