Source builds report a version instead of "dev" - #124
Merged
Conversation
The update check (#111) had source builds reporting "dev". Given the README's headline quickstart is `git clone` + `docker compose up --build`, that's most deployments — so the adoption data would have been one opaque bucket with no version granularity at all. Worse, "dev" doesn't parse, so is_newer() always returned False and a source build could *never* be told a new release existed. The majority of users would silently never see an update notice. The default is now the base release with a marker — "1.2.0-src". The suffix is already accepted by both the client regex and the endpoint's, parses to (1,2,0) for ordering, and stores as its own row. So a source build gets update notices, while staying distinguishable from a release image in the data — which is worth knowing when deciding how much effort packaging deserves. The marker isn't decoration. A clone of `main` genuinely isn't the release: main starts accumulating the next version's work the moment a tag is cut. "1.2.0-src" says "a source tree based on 1.2.0", which is true, where a bare "1.2.0" would not be. The weakness of a hand-maintained default is that forgetting it fails silently — every source deployment would report the previous release for as long as it took someone to notice the numbers looked wrong. So release-images.yml gains a version-check job that `build` needs: it compares the default against the tag and refuses to publish images if they disagree, and also refuses if the -src marker has been dropped (a well-meaning tidy-up would otherwise merge source builds into the image bucket). Verified: v1.2.0 passes, v1.3.0 blocks. There was no documented release process at all, so the bump would have been folklore. CONTRIBUTING.md gains a "Cutting a release" section covering it and why it matters. Also corrects comments that the change made wrong — frontend types described "dev" as the source-build value. "dev" is still handled for a deployment that sets APP_VERSION=dev explicitly. Co-Authored-By: Claude <noreply@anthropic.com>
6 tasks
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.
What & why
The update check (#111) had source builds reporting
dev. The README's headline quickstart isgit clone+docker compose up --build, so that's most deployments — the adoption data would have been one opaque bucket with no version granularity at all.Worse:
devdoesn't parse, sois_newer()always returnedFalseand a source build could never be told a new release existed. The majority of users would silently never see an update notice. That's arguably the bigger loss of the two.The default is now the base release plus a marker —
1.2.0-src.Why the marker, rather than a bare
1.2.0It's true. A clone of
maingenuinely isn't the release —mainstarts accumulating the next version's work the moment a tag is cut.1.2.0-srcsays "a source tree based on 1.2.0", which is accurate; a bare1.2.0would not be.It keeps information that's otherwise thrown away.
1.2.0: 40 / 1.2.0-src: 120tells you where to invest in packaging and docs; a merged1.2.0: 160doesn't. Splitting is trivially reversible in a query; merging loses it permanently.It costs nothing mechanically. The suffix is already accepted by both the client regex and the endpoint's, parses to
(1, 2, 0)for ordering, and stores as its own row. Verified on both sides:is_newer("1.3.0", "1.2.0-src")→True— a source build gets told about 1.3.0is_newer("1.2.0", "1.2.0-src")→False— no spurious notice at parityThe weakness this introduces, and the guard for it
A hand-maintained default fails silently. Forget the bump and every source deployment reports the previous release for as long as it takes someone to notice the numbers look wrong.
So
release-images.ymlgains aversion-checkjob thatbuildnowneeds. It refuses to publish images if:-srcmarker has been dropped — a well-meaning tidy-up would otherwise silently merge source builds into the image bucket.Verified by simulation:
v1.2.0→ allowed,v1.3.0→ blocked. YAML parse and job wiring checked too, since a syntax error there would only surface at release time.Documentation
There was no documented release process at all, so the bump would have been folklore.
CONTRIBUTING.mdgains a "Cutting a release (maintainers)" section: bump the default, tag, write the notes — with the reasoning for why step 1 matters and what to do if the guard fires.Comments the change made wrong
Also corrected —
frontend/src/lib/types.tsdescribeddevas the source-build value.devitself is still handled, for a deployment that setsAPP_VERSION=devexplicitly, so its test case stays with an adjusted comment.The endpoint side is a separate commit in the
flagpost-websiterepo (45202ef): its README's "how many are running from source" query filtered onversion = 'dev'and would now return nothing — anyone running it would reasonably conclude nobody builds from source.Checklist
cd backend && .venv/bin/pytest(567 passed, 1 new)npm run test(167),npx tsc --noEmit,npx eslint .,npm run build🤖 Generated with Claude Code