Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Oct 5, 2025

✅ Fixed copilot-instructions.md to prevent PRs with failing builds

Problem Solved:
Copilot agents were marking PR sessions as complete without running hardware builds, causing CI failures like https://github.com/wled/WLED/actions/runs/18260044378

Root Cause:
The instruction "Always run a build for the common environment before finishing" was too vague:

  • Didn't specify which environment or exact command
  • Wasn't prominent enough in the document
  • Used weak language that could be interpreted as optional
  • Missing specific timeout guidance

Solution Implemented:

  • Added prominent "Before Finishing Work" section as 2nd major section
  • Made hardware build validation explicit and mandatory
  • Specified exact command: pio run -e esp32dev
  • Added clear timeout guidance (30+ minutes, 1800 seconds)
  • Enhanced multiple sections with stronger language
  • Created cross-references between sections
  • Verified all tests still pass (16/16)
  • Improved cross-references to canonical "common environments" list

Key Changes:

  1. New "Before Finishing Work" Section (lines 33-52)

    • Impossible to miss - placed as 2nd major section
    • Uses "CRITICAL" and "MUST" language throughout
    • Lists 3 mandatory validation steps with exact commands
    • Step 2 explicitly requires: pio run -e esp32dev with 30+ min timeout
    • References "Hardware Compilation" section for full list of common environments
  2. Updated "Code Validation" (line 68)

    • Changed vague text to: "MANDATORY: Always run a hardware build"
    • Added cross-reference to new section
  3. Enhanced "Build Timing and Timeouts" (lines 122-133)

    • Added specific timeout: 1800 seconds (30 minutes) minimum
    • Explained first vs. cached builds
    • Emphasized: "MUST wait for the hardware build to complete"
  4. Improved "CI/CD Pipeline" (lines 158-172)

    • Clarified what CI validates (tests + ALL hardware targets)
    • Added explicit local requirements before finishing
    • References "Hardware Compilation" section for environment list
    • Strong warning: "Do not mark work complete until validated locally"

Impact:
Future Copilot agents will:

  • See validation requirements in multiple prominent locations
  • Understand build validation is MANDATORY, not optional
  • Know the exact command to run with proper timeout
  • Find common environments list in one canonical location
  • Understand the connection between local validation and CI success

Testing:

  • All npm tests pass (16/16 tests ✓)
  • No code changes - documentation only
  • Changes are minimal and focused on clarity
Original prompt

This section details on the original issue you should resolve

<issue_title>Why does copilot keep producing PRs that do not build</issue_title>
<issue_description>What is wrong with .github/copilot-instructions.md that means copilot keeps marking PR sessions as complete, when running an actual build, as required for at least the common environments is specified in the instructions

For example #4984 vs https://github.com/wled/WLED/actions/runs/18260044378</issue_description>

Comments on the Issue (you are @copilot in this section)

Fixes #4986

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copy link
Contributor

coderabbitai bot commented Oct 5, 2025

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Note

Free review on us!

CodeRabbit is offering free reviews until Wed Oct 08 2025 to showcase some of the refinements we've made.

Comment @coderabbitai help to get the list of available commands and usage tips.

@netmindz
Copy link
Member

netmindz commented Oct 5, 2025

@copilot - "common environments" are listed under "Hardware Compilation" https://github.com/wled/WLED/blob/main/.github/copilot-instructions.md#build-process-details

@Copilot Copilot AI changed the title [WIP] Why does copilot keep producing PRs that do not build Fix copilot-instructions.md to require mandatory hardware build validation Oct 5, 2025
@Copilot Copilot AI requested a review from netmindz October 5, 2025 15:08
Copilot finished work on behalf of netmindz October 5, 2025 15:08
Copy link
Contributor Author

Copilot AI commented Oct 5, 2025

@copilot - "common environments" are listed under "Hardware Compilation" https://github.com/wled/WLED/blob/main/.github/copilot-instructions.md#build-process-details

Updated to reference the "Hardware Compilation" section for the common environments list instead of repeating them inline. Changes in commit 7b5f9d1.

Copilot finished work on behalf of netmindz October 5, 2025 15:13
@netmindz netmindz marked this pull request as ready for review October 5, 2025 15:22
@netmindz netmindz merged commit e4cabf8 into main Oct 5, 2025
5 checks passed
@netmindz netmindz deleted the copilot/fix-e93598cf-9ce2-4b3d-82dd-393eaf538463 branch October 5, 2025 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Why does copilot keep producing PRs that do not build

2 participants