docs: stop telling contributors to register a device in master.yml - #134
Conversation
PR Summary by QodoCorrect automatic device CI registration guidance
AI Description
Diagram
High-Level Assessment
Files changed (1)
|
Code Review by Qodo
1. Draft PR builds overstated
|
| `.github/workflows/master.yml` — it holds no device list, and a PR that adds one is just a | ||
| merge conflict. The only written-down list is `NOT_BUILT` in `ci-matrix.py`, the opt-out | ||
| for devices that exist but are deliberately not built; leave it alone unless you mean to | ||
| opt out. Opening the PR is therefore what gets the device built, narrowed to just it. |
There was a problem hiding this comment.
1. Draft pr builds overstated 🐞 Bug ≡ Correctness
The guide says opening the PR gets the new device built, but ci-matrix.py returns needs_build=false for draft pull requests, so opening or pushing a draft produces no firmware build. This can leave contributors believing a device was CI-verified when it will not build until the PR is marked ready for review.
Agent Prompt
## Issue description
The new guidance claims that opening or pushing a PR builds the device, but draft PRs are deliberately excluded from builds.
## Issue Context
Clarify that CI builds begin only for a non-draft PR or after a draft is marked ready for review.
## Fix Focus Areas
- CLAUDE.md[125-131]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
There was a problem hiding this comment.
Correct, and fixed in c905f6e.
Verified against the code rather than taking it on trust — classify() short-circuits before any path matching:
if draft:
return _decision([], False, reason="draft pull request")and self_test() asserts it ("a draft pull request must not build"). master.yml carries the other half: ready_for_review is in its trigger types precisely because a PR opened as a draft would otherwise never build once marked ready.
The failure mode you describe is the one that mattered — a contributor opens a draft, sees no build, and reads that as the device being fine. Step 6 now says a draft builds nothing and to mark it ready when you want the build, and step 8 says "a non-draft PR" rather than "pushing the PR".
While in there I also documented the ci:full label, which overrides the narrowing and builds every device. It is the other contributor-facing lever over the matrix and was equally undocumented.
Step 6 of "Adding a new device" still says to add `- <device>` to the matrix in .github/workflows/master.yml, and calls that matrix "the *only* build registry". Neither has been true since #120 moved the matrix into .github/scripts/ci-matrix.py, where it is derived from the tree rather than listed. master.yml now has no device list at all. This is not a hypothetical staleness. Two of the pull requests open right now do exactly what step 6 says: #111 (Tapo TC70 v3) and #108 (KC110) each append a line to a block that no longer exists, so both are merge conflicts rather than the one-line changes they were written as. Their authors did the documented thing. So step 6 is now the opposite instruction -- there is nothing to add, and adding it is the mistake. It also names NOT_BUILT, since that is the one list a contributor could reasonably go looking for, and says to leave it alone. Two adjacent claims went stale with the same change and are fixed here: the master.yml bullet described a cron-and-dispatch workflow with no pull_request trigger, and nothing in the file mentioned ci-matrix.py at all -- including that --self-test runs in the Select devices job and will fail a PR that puts the tree and the selector out of step. Step 8 no longer says "locally" as though that were the only way a device gets built.
2db8903 to
afb69ce
Compare
Step 6 said opening the PR is what gets the device built. That is true
only for a non-draft one: classify() returns needs_build=False for a
draft, and self_test() asserts it ('a draft pull request must not
build'). master.yml carries the other half -- ready_for_review is in its
trigger types precisely because a PR opened as a draft would otherwise
never build once marked ready.
Left as written, a contributor could open a draft, see no build, and read
that as the device being fine. Also mentions the ci:full label, which is
the other contributor-facing lever over the matrix and was equally
undocumented.
Caught by Qodo on #134.
Step 6 of "Adding a new device" still says to add
- <device>to the matrix in.github/workflows/master.yml, and calls that matrix "the only build registry". Neither has been true since #120 moved the matrix into.github/scripts/ci-matrix.py, where it is derived from the tree rather than listed.master.ymlnow has no device list at all:This is not a hypothetical staleness. Two of the PRs open right now do exactly what step 6 says — #111 (Tapo TC70 v3) and #108 (KC110) each append a line to a block that no longer exists, so both are merge conflicts rather than the one-line changes they were written as. Their authors did the documented thing.
So step 6 becomes the opposite instruction: there is nothing to add, and adding it is the mistake. It also names
NOT_BUILT, since that is the one list a contributor could reasonably go looking for, and says to leave it alone.Two adjacent claims went stale with the same change and are fixed here:
pull_requesttrigger;--self-testruns in theSelect devicesjob and will fail a PR that puts the tree and the selector out of step.Step 8 no longer says "locally" as though that were the only way a device gets built.
Docs only — no device can change, so this narrows to nothing.