ci: rebuild the nightly when majestic-webui's dist asset changes - #2237
Merged
Conversation
The preflight gate skipped a scheduled build whenever this repo's HEAD already matched the published nightly. That assumes firmware HEAD alone determines what an image contains, which is not true for majestic-webui: it is consumed as a rolling `dist` release asset, so a WebUI fix changes the image without moving HEAD here. On a quiet firmware tree the nightly then skips night after night and the fix never reaches a build -- exactly what happened to the day/night and endpoint-URL fixes in OpenIPC/majestic-webui#129. Compare the dist asset's content digest alongside HEAD, and record it in the nightly notes as `webui=` for the next run to diff against. The digest is content-addressed, so re-uploading identical bytes does not force a pointless rebuild. Both unknown-value paths fall through to building rather than skipping blind: a failed lookup leaves the digest empty, and publish omits the `webui=` line entirely instead of writing an empty one that a later empty lookup would spuriously match. Note this only covers majestic-webui. Around twenty other packages track a moving ref (majestic itself, mspod, motors, yaml-cli, rubyfpv, ...) and are still invisible to the gate. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Problem
The preflight gate skips a scheduled build when this repo's HEAD already matches the published nightly:
That assumes firmware HEAD alone determines what an image contains. It doesn't for
majestic-webui, which is consumed as a rollingdistrelease asset — a WebUI fix changes the image without moving HEAD here.The result is a silent hole: on a quiet firmware tree the nightly skips night after night and the WebUI fix never reaches a build. This is live right now — OpenIPC/majestic-webui#129 fixed two bugs from #2235, the
distasset refreshed 26s after merge, and tonight's nightly would still have skipped because HEAD hasn't moved since0010f73.Change
Compare the dist asset's content digest alongside HEAD, and record it in the nightly notes as
webui=for the next run to diff against.The digest is content-addressed (
sha256:…), so re-uploading identical bytes doesn't force a pointless rebuild — only a genuine content change does.Both unknown-value paths fall through to building rather than skipping blind:
-n "$WEBUI"guard means an empty value never matches;webui=line entirely rather than writing an empty one that a later empty lookup would spuriously match.The first run after this merges will build once (no
webui=in the current notes), then settle.Testing
The gate body was extracted from the workflow and executed under
bash -eagainst the real GitHub API for the digest:should_build=falseshould_build=truewebui=(first run)should_build=trueshould_build=trueworkflow_dispatch, everything sameshould_build=trueshould_build=true, step survivesset -ePublish-side
NOTESconstruction was also run underbash -ewith and without a digest: thewebui=line appears when set and is omitted when empty, with noset -efailure. YAML parses andpreflight.outputsgainswebui_digest.Scope
This covers
majestic-webuionly. Around twenty other packages track a moving ref (majesticitself,mspod,motors,yaml-cli,rubyfpv, …) and remain invisible to the gate — the same staleness the "Refresh moving-ref package downloads" step was added to fight, one layer up. Worth a follow-up; deliberately not bundled here.🤖 Generated with Claude Code