Pin the WLED sources a firmware image is built from - #14
Merged
Merged
Conversation
Both workflows resolved the upstream ref themselves -- "the latest published WLED release", read fresh on every run -- and took the list of upstream pull requests to apply from a workflow_dispatch input that defaults to empty. Two things followed from that. The compile-only build on a pull request never carried a patch, because nothing passes that input on a push. So it rehearsed a tree no release has ever shipped, and the one thing it is for -- proving the release build works -- it could not do. On the other side, a release carried wled/WLED#5521 only when whoever pressed the button remembered to type 5521. Miss it and nothing fails: the battery usermod exports no um_data, getUMData(USERMOD_ID_BATTERY) never succeeds, and the node ships reporting no battery state. The ref being unpinned is the larger one. Every build profile inherits its platform, toolchain and NeoPixelBus version from WLED's shared [esp32], [esp32s2], [esp32s3] and [esp32c3] sections, and on WLED's main those have already moved from ESP-IDF 4.4 to 5.5. Unpinned, that toolchain switch -- and whatever it means for the OTA images already in the field -- arrives the day the next WLED release is published, with no commit here to point at. So wled_source.json now names both, and the workflows read it. The inputs still override for a one-off run; what changed is that an empty input means "what the repository says" rather than "whatever upstream looks like right now", and asking for something else is explicit: "latest" for the newest published release, "none" for a stock tag. The pin's own tests reject an unknown key, since a misspelled one would otherwise be ignored in silence and build the default it was meant to change. Pinned to v16.0.1 + wled/WLED#5521 -- what v0.1.14 shipped. Verified that #5521 still applies cleanly to that tag. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CEr4gm1NX2GzmH13UYyMyN
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Both workflows resolved the upstream ref themselves — "the latest published WLED release", read fresh on every run — and took the list of upstream pull requests to apply from a
workflow_dispatchinput that defaults to empty. Two things followed from that.The rehearsal never rehearsed a release. Nothing passes
wled_patch_prson a push, so the compile-only build always ran unpatched: a tree no release has ever shipped. On the other side, a release carried wled/WLED#5521 only when whoever pressed the button remembered to type5521. Miss it and nothing fails — the battery usermod exports noum_data,getUMData(USERMOD_ID_BATTERY)never succeeds, and the node ships reporting no battery state, because the lookup is retried rather than failed.The unpinned ref is the larger one. Every build profile inherits its platform, toolchain and NeoPixelBus version from WLED's shared
[esp32],[esp32s2],[esp32s3]and[esp32c3]sections, and on WLED'smainthose have already moved from ESP-IDF 4.4 to 5.5 (706 commits past v16.0.1, codename now "Kagayaki"). Unpinned, that toolchain switch — and whatever it means for the OTA images already in the field — arrives the day the next WLED release is published, with no commit here to point at.What this changes
wled_source.jsonnow names both, and the workflows read it:{ "ref": "v16.0.1", "patch_prs": [5521] }Pinned to what v0.1.14 shipped, so the merge itself changes no firmware. The inputs still override for a one-off run; what changed is that an empty input means "what the repository says" rather than "whatever upstream looks like right now", and asking for something else is explicit:
latestfor the newest published release,nonefor a stock tag.scripts/wled_source.py(new) — loads and validates the pin. An unknown key is an error rather than an ignored field: a misspelled one would otherwise be dropped in silence and build the default it was meant to change.resolve_wled_release.py— empty input falls through to the pin;lateststill hits the releases API.--print repositoryno longer resolves a ref on the way to answering a constant, which saves an API call per run in thelatestcase.apply_wled_patches.py— same precedence, plus thenonesentinel. Blank and "no patches" were previously the same string, which is exactly how #5521 went missing without anything failing.Notes
patch_prscarries wled/WLED#5521, which is still open upstream. wled/WLED#5399 rewrites the same file, and once it merges this patch stops applying —git applyis strict on purpose, so that surfaces as a failed build rather than a silently unpatched one. Decoupling from it is separate work; the pin file'snotesrecords the dependency next to the number.Testing
tests/test_wled_source.pycovering validation and the input-over-pin precedence, plus guards that the committed ref is a tag (not a branch, notlatest), that both workflows document the pin in their input descriptions, and that the readme's clone command cannot drift from it.resolve_wled_release.pywith no input returnsv16.0.1without touching the network.v16.0.1(git apply --check).Generated by Claude Code