Final PR in the docs/plan.md split series. Updates every remaining docs/plan.md §N cross-reference (CLAUDE.md, README.md, TODO.md, tests/README.md, docs/dev/versioning.md, docker-compose.yml, and ~30 backend/test source files) to point at the five docs that now carry that content: docs/architecture.md, docs/api-reference.md, docs/push-to-guest.md, docs/archive/design-rationale.md, docs/archive/push-to-guest-findings.md. CLAUDE.md rewritten to list the three living docs plus the archive by name instead of a single docs/plan.md pointer. README gains a new "Persistence, and backing up the portal itself" section (ported from plan.md §10, updated to reflect current state - dir_cache.sqlite3 and job_history.sqlite both exist now, not "empty today" as the original said). A couple of stray "Design C" references (docker-compose.yml, README) and one stale function-name reference (_try_design_c, already renamed to _try_direct_network_transfer) caught along the way. docs/plan.md itself is deleted - every section's content now lives in one of the five new docs or has been folded into README, with nothing left referencing the old monolith. Co-authored-by: Trey Jones <treycentric@gmail.com> Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
9.7 KiB
Versioning and releases
This project uses Semantic Versioning (MAJOR.MINOR.PATCH),
Conventional Commits to derive
version bumps and changelog entries automatically, and
Keep a Changelog for CHANGELOG.md's
format. None of this is bespoke — it's the same three conventions most
tools in this space (standard-version, release-please, semantic-release)
implement; scripts/release.py is a small dependency-free version of the
same idea, kept in-repo per CLAUDE.md's "no extra services" preference.
Where the version lives
The VERSION file at the repo root is the single source of truth — a
bare 1.2.3, nothing else. backend/version.py reads it at import time
and exposes __version__, which the About dialog displays. Scripts read
the same file. Nothing else should hardcode a version number.
Commit message format
<type>[optional scope][!]: <description>
[optional body]
[optional footer(s)]
Types, and the CHANGELOG.md section they map to:
| Type | Changelog section | Counts toward a bump? |
|---|---|---|
feat |
Added | minor |
fix |
Fixed | patch |
perf |
Changed | patch |
refactor |
Changed | — |
revert |
Changed | patch |
security |
Security | — |
chore, docs, style, test, ci, build |
(excluded — not user-facing) | — |
anything else (type: present but not one of the above) |
Changed | — |
That last row is a deliberate fail-open default: an unrecognized-but-present
type still shows up under "Changed" rather than silently vanishing, so a
typo'd type (imporvement:) doesn't make a real change disappear from
the changelog. A subject with no type: prefix at all (most non-conventional
commits) is excluded entirely, same as the ignored types above.
Breaking changes — either put ! right after the type/scope
(feat!: or feat(auth)!:), or add a BREAKING CHANGE: <description>
footer to the commit body. Either always recommends a major bump and
adds a "Breaking Changes" section at the top of that release's changelog
entry, regardless of the commit's type.
Scope is optional and free-form (usually a subsystem: auth,
timeline, deploy, ...). When present it's rendered in the changelog
as **scope:** description.
Examples:
feat(timeline): add drag-to-pan on the ruler
fix: correct off-by-one in tick spacing
feat!: drop the shared PVE/PBS service token
BREAKING CHANGE: per-user PVE ticket login replaces PVE_TOKEN_*/PBS_*
env vars entirely; see docs/architecture.md for the migration.
A commit that doesn't match this format (or uses an excluded type) still
gets recorded in git history as normal — it just doesn't show up in
CHANGELOG.md or influence the recommended bump.
Cite the issue
Every commit must cite the GitHub issue it addresses — put (#N) at
the end of the subject line, so it stays inside the description
scripts/release.py copies into CHANGELOG.md and GitHub auto-links
it on the repo:
fix(auth): handle expired ticket refresh (#15)
feat(timeline): add drag-to-pan on the ruler (#13)
For a commit that closes the issue outright, add a Closes #N footer
too (GitHub closes the issue on merge; the subject-line (#N) alone
only links it). A commit with no corresponding issue (a typo fix, a
one-line doc tweak) is the rare exception — open an issue first for
anything more than that.
Bump precedence
Exactly one rule applies, in this order, across all commits since the
last tag: any breaking change → major; else any feat → minor;
else any fix/perf/revert → patch; else no bump recommended
(the changes aren't user-facing — e.g. only docs/chore/test).
New functionality needs tests
Every commit that adds backend logic needs a pytest test; every commit
that adds app.js component logic needs a node --test test. This
isn't just a suggestion — .github/workflows/ci.yml runs the full suite
(run-tests.sh) on every push/PR, and .github/workflows/release.yml
runs it again as a gate before a tagged release is allowed to publish.
See tests/README.md for the suite layout.
Day-to-day: scripts/release.py
python scripts/release.py suggest
Read-only. Prints the commits since the last tag, the recommended bump,
and a preview of the CHANGELOG.md entry it would generate. Run this
any time to see where things stand — it changes nothing.
python scripts/release.py bump auto --pr # or: major | minor | patch
Computes the bump, then — because main is protected (see the box
below) — creates a release/vX.Y.Z branch off origin/main, writes
VERSION + the new CHANGELOG.md section + the chore(release): vX.Y.Z
commit on that branch, pushes it, and opens the PR via gh (with the
changelog section as the body). Leaves you back on the branch you
started from. Add --dry-run to print the plan without touching
anything. auto uses the same bump-precedence rule as suggest; pick
major/minor/patch explicitly to override (e.g. a deliberate major
bump for a docs-driven breaking change no commit flagged with !).
Squash-merge that PR, then:
python scripts/release.py tag
Fast-forwards your local main from origin, checks that its HEAD is
the chore(release): vX.Y.Z commit, then git tag -a vX.Y.Z + pushes
the tag — which fires .github/workflows/release.yml (test suite →
publish the GitHub release from CHANGELOG.md). Refuses if HEAD isn't
the release commit or the tag already exists. --dry-run prints the
plan.
Why the two-step dance.
mainrejects direct pushes; everything lands via a squash-merged PR, which rewrites the commit's hash. The version tag has to sit on the commit that actually ends up onmain, sotagruns after the merge, againstmain's real HEAD. The next release then finds it viagit describe --tags— a tag left on an orphaned pre-merge commit would make that release double-count every commit since the previous version. (choreis an excluded type, so the release commit never lands in a changelog or affects a bump regardless.)
Doing it without the helpers
Plain bump (no --pr) still works — it commits on the current branch
and makes a local tag — but on this repo that tag is a dead end
(git tag -d vX.Y.Z it). The manual equivalent of --pr + tag:
python scripts/release.py bump auto
V=v$(cat VERSION)
git branch "release/$V" && git reset --hard origin/main && git tag -d "$V"
git switch "release/$V" && git push -u origin "release/$V"
gh pr create --fill --base main # squash-merge it
git switch main && git pull
git tag "$V" && git push origin "$V"
To publish the GitHub release by hand instead of via the tag-push
workflow (the tag must already be on main):
python scripts/release.py release # tag defaults to v<VERSION>
python scripts/release.py release --draft # create as a draft first
python scripts/release.py release --dry-run # print what would be run
This reads the matching ## [X.Y.Z] section out of CHANGELOG.md and
passes it straight to gh release create as the release notes — the
same code path the GitHub Actions workflow uses, so local and CI
releases are always generated the same way.
Full walkthrough
python scripts/release.py suggest # sanity check first
python scripts/release.py bump auto --pr # opens the release PR
# ... review + squash-merge the PR on GitHub ...
python scripts/release.py tag # tags the merged commit -> release workflow
The tag push triggers .github/workflows/release.yml, which runs the
full test suite (a hard gate) and then publishes the GitHub release
from the matching CHANGELOG.md section. python scripts/release.py release does that publish step by hand — see the section above.
CI
.github/workflows/ci.yml— runsrun-tests.sh(ruff, pytest,node --test, stylelint) on every push and pull request. This is the general correctness gate, independent of releases..github/workflows/release.yml— triggers on pushing a tag matchingv*.*.*. Runs the full test suite first (needs:gate — a release cannot publish if tests fail), then runspython scripts/release.py release --tag <the pushed tag>to publish the GitHub release fromCHANGELOG.md.
Dependabot
.github/dependabot.yml sets commit-message.prefix: "chore" (and
prefix-development: "chore" for npm's devDependencies) with
include: "scope", so every Dependabot PR/commit already looks like
chore(deps): bump fastapi from 0.141.0 to 0.141.1 — valid Conventional
Commits syntax, no manual retitling needed for the common case. Without
this config Dependabot's default messages (Bump fastapi from ...,
no type prefix) don't match CONVENTIONAL_COMMIT_RE at all, so
scripts/release.py would silently drop every dependency bump instead
of filing it under chore on purpose.
chore is one of the intentionally-excluded types (see the table
above) — routine dependency bumps don't show up in CHANGELOG.md and
don't influence the recommended bump. That's deliberate, not a gap: if
a specific bump actually matters to users (patches a real
vulnerability, for instance), retitle the PR before merging — e.g.
fix(deps): bump fastapi to 0.141.1 (CVE-2026-xxxxx) — so it lands
under "Fixed" and recommends a patch bump like any other fix. Dependabot
can't know which bumps are user-relevant on its own; a human still
makes that call at merge time.
This works with either merge strategy: squash-merge uses the PR title
(generated from the same commit-message config) as the commit on
main; a regular merge/rebase preserves Dependabot's own commits,
which already carry the prefix.