A publish that builds what it ships - #856
Merged
sridharkalaibala merged 3 commits intoSep 17, 2026
Merged
Conversation
Promote develop to main: the kitchen can make a sound
Release: promote develop to main (the printed bill and the kitchen ticket)
frontend/public/ is gitignored build output, so whatever is on the packaging machine's disk when electron-builder runs is what goes into the exe. Every build variant guards that with a prebuild step that calls prepare:bundle, which runs the gulp build and then refuses to continue if the artifacts are older than the run. publish had no such step. One script out of eight, and it is the one that makes the installer customers receive. What that cost today: an exe carrying a current main process - the kitchen announcement, the tone, the preload bridge, all correct - and a dashboard bundle built before the renderer half of that feature existed. The main process sent posnic:kitchen-call to a page where nothing was listening, so the kitchen stayed silent. Every file was present on disk; one was simply older than the code that needed it. Nothing failed and nothing logged, and the feature looked shipped. The test asserts the rule rather than that one script, because the next variant somebody adds will be added the way the last one was.
Contributor
|
Merged to Try it at https://develop.posnic.io, or run it yourself: git fetch origin develop && git checkout develop
npm install && npm --prefix api install
npm run dev # then http://localhost:3000When you have tested it, say what you did and what happened, and set Reporting that something is broken is as useful as fixing it. It is |
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.
The root cause of tonight's silent installer, and it is one line.
frontend/public/is gitignored build output. Nothing in the repository holds it, so whatever is on the packaging machine's disk when electron-builder runs is what goes into the exe.Every build variant guards that with a
prebuild:*step, which npm runs automatically and which callsprepare:bundleand soprepare:frontend. That script runs the gulp build and then refuses to continue if the artifacts are older than the run, so a stale bundle cannot get past it.publishhad no such step. One script out of eight, and it is the one that makes the installer customers actually receive.What it cost
The exe on a customer machine carried a current main process:
src/kitchen-call.js,src/kitchen-announce.jswith both switches, theposnic:kitchen-callpreload bridge, the autoplay switch, all correct and all verifiable by reading the asar. And adashboard.20f9c50d.jsbuilt before the renderer half of that feature existed, containing nokitchenCalland nospeechSynthesis.So the main process sent its announcement to a page where nothing was listening. Every file was present on disk. One of them was simply older than the code that needed it. Nothing failed, nothing logged, and the feature looked shipped.
frontend/static/script/js/core/kitchen-call.jswas even in the package, as an unbuilt source file sitting beside the bundle that should have contained it.The change
publishnow mirrors every other variant:clear:brand-seed,check:mongodb,prepare:bundle, then electron-builder.Tests
tests/a-build-builds-what-it-ships.test.jsprescript npm runs for itVerified failing on the parent commit, where it names
publishexactly.The rule is asserted rather than the single script, because the next variant somebody adds will be added the way the last one was.