Skip to content

docs: stop telling contributors to register a device in master.yml - #134

Merged
openipc-ai merged 2 commits into
masterfrom
docs/claude-md-device-registration
Aug 27, 2026
Merged

docs: stop telling contributors to register a device in master.yml#134
openipc-ai merged 2 commits into
masterfrom
docs/claude-md-device-registration

Conversation

@openipc-ai

@openipc-ai openipc-ai commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

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:

$ grep -cE '^\s+- [a-z0-9]+_[a-z0-9]+' .github/workflows/master.yml
0

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:

  • the master.yml bullet described a cron-and-dispatch workflow with no pull_request trigger;
  • 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.

Docs only — no device can change, so this narrows to nothing.

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

PR Summary by Qodo

Correct automatic device CI registration guidance

📝 Documentation 🕐 Less than 10 minutes

Grey Divider

AI Description

• Replaces obsolete manual device registration with tree-derived CI matrix guidance.
• Documents pull request narrowing and selector self-test behavior.
• Clarifies local builds are optional alongside automatic PR builds.
Diagram

graph TD
  A["Device files"] --> B["Device defconfig"] --> C["CI selector"] --> D["PR matrix"] --> E["Firmware build"]
  C --> F["Self test"]
Loading
High-Level Assessment

Updating the contributor guide is the appropriate approach because CI already derives registration from defconfigs. Retaining manual registry instructions or duplicating the generated matrix would recreate stale documentation and unnecessary merge conflicts.

Files changed (1) +23 / -8

Documentation (1) +23 / -8
CLAUDE.mdDocument automatic device registration and PR CI selection +23/-8

Document automatic device registration and PR CI selection

• Replaces obsolete instructions to edit master.yml with the defconfig-based registration model and explains NOT_BUILT as an explicit opt-out. It also documents pull request matrix narrowing, selector self-tests, and the relationship between local and CI builds.

CLAUDE.md

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (1) 📘 Rule violations (0) 📜 Skill insights (0)

Grey Divider


Remediation recommended

1. Draft PR builds overstated 🐞 Bug ≡ Correctness
Description
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.
Code

CLAUDE.md[125]

+   opt out. Opening the PR is therefore what gets the device built, narrowed to just it.
Evidence
The workflow listens for ready_for_review specifically because drafts are skipped, and the
selector returns an empty matrix with needs_build=false whenever the pull request is draft.

.github/workflows/master.yml[3-12]
.github/scripts/ci-matrix.py[190-203]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## 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


Grey Divider

Tip of the day
💡 Did you know, you can ask Qodo to dismiss a finding you disagree with, with your reason on record

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

Comment thread CLAUDE.md Outdated
`.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.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remediation recommended

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
@openipc-ai
openipc-ai force-pushed the docs/claude-md-device-registration branch from 2db8903 to afb69ce Compare August 27, 2026 17:40
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.
@openipc-ai
openipc-ai merged commit 82ab2e7 into master Aug 27, 2026
6 checks passed
@openipc-ai
openipc-ai deleted the docs/claude-md-device-registration branch August 27, 2026 17:54
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.

1 participant