SoloDB Documentation Help

Git release workflow

SoloDB uses curated release branches. The develop branch is the shared integration branch, but it is not the source from which a release is cut. A release/<major>.<minor>.<patch> branch contains only the changes selected for that exact release. This allows completed work to be tested on develop without committing it to the next production release.

Download Cheat sheet (PDF).

Branch model

Branch

Purpose

Created from

Merged into

main

The exact production history. Every production release is tagged here.

Not applicable

develop and every active release branch, to forward-sync production changes

develop

Broad integration and development-environment testing. It can contain features for different or unassigned releases.

Long-lived

Nowhere as a whole; never merge develop into main or a release branch

release/<major>.<minor>.<patch>

The curated, deployable candidate for one release train, for example release/5.15.0.

main

main after acceptance

feature/<ticket>-<description>

One independently selectable feature, for example feature/83972-link-storage-equipment.

Normally main

develop for integration and one selected release branch for delivery

bugfix/<ticket>-<description>

A fix found while stabilising a release.

The affected release branch

The affected release branch; also apply it to develop when relevant

hotfix/<version>-<description>

An urgent fix for the production version.

main

main, followed by a forward-sync to develop and active release branches

The key rule is that develop answers “does this work with other ongoing development?”, while a release branch answers “will this ship in this version?”. A merge into develop is not a promise to release the feature.

Inspect branch status

bin/git-branch-status is a standalone Bash command requiring only Git and standard shell utilities. It works with macOS's bundled Bash, Linux, and Git Bash. Install it from the repository root into a directory on your PATH:

mkdir -p "$HOME/.local/bin" install -m 0755 bin/git-branch-status "$HOME/.local/bin/git-branch-status" export PATH="$HOME/.local/bin:$PATH"

Keep the PATH setting in your shell profile if that directory is not already available. Run the install command again after updating the script. The installed copy has no dependency on this checkout or PHP.

# Refresh remote branches and show the complete matrix from any repository directory. git branch-status --fetch # Inspect SoloDB while working elsewhere. git branch-status -C /path/to/solodb --fetch # Focus on features, or inspect the exact commits missing from one release. git branch-status --branch 'feature/*' git branch-status --branch feature/83972-link-storage-equipment --pending release/5.15.0 # Add another feature branch as a comparison target. git branch-status --target feature/83973-reserve-a-location

The report lists local branches and branches on one selected remote. It defaults to origin, or the sole configured remote; use --remote github to select another. Identical local and remote tips share one row. Differing tips have separate rows, so both unpublished work and newer remote commits remain visible. Branch roles follow the names in the branch model above; dependency bot branches have the role dependency, and unmatched names have the role other.

Each row is compared against main, develop, and every existing release/* branch. Comparison targets use the selected remote's tip when available, falling back to the local branch. The report prints the exact target refs and commit IDs. Use --target refs/heads/release/5.15.0 to add an explicit local target, or --main and --develop for repositories with different production and integration branch names.

  • MERGED: every commit in the source tip is contained in the target's history.

  • N pending: the target lacks that many source commits, including merge commits and inherited work. A feature may already have been merged at an earlier tip and still have subsequent commits pending.

  • NEVER: promotion from develop into main or a release is forbidden by this workflow.

  • SYNC +N/-M: the local branch is N commits ahead of, and M behind, its configured upstream. GONE means that upstream ref is absent from the local cache; refreshing its remote confirms whether it was deleted. unmapped means the configured upstream is excluded by the remote's fetch mapping.

  • unrelated or UNKNOWN: the histories are unrelated, or shallow history prevents a reliable comparison.

Without --fetch, remote refs are cached and may be stale. Fetching refreshes and prunes only the selected remote's tracking refs; the command does not check out, merge, push, or delete local branches. Upstreams on other remotes remain cached. Use --tsv for a machine-readable matrix, and --help for all options.

This is a history report, not release-scope or pull-request tracking. A pending feature is not automatically selected for a release. Reverted merges still count as merged history, and equivalent cherry-picks or squash merges can still appear pending. Review those cases against the release decisions and pull requests.

Merge policy

  • Protect main, develop, and release/**; do not push or force-push to them directly.

  • Require a pull request, review, and successful automated checks for every merge.

  • Use merge commits for feature and release pull requests. Do not independently squash the same feature into develop and a release branch: preserving the feature commits lets Git recognise the work when histories meet again.

  • Do not rebase a branch after it has been shared or merged anywhere.

  • Never merge develop wholesale into a release branch or main.

  • Prefer forward merges from main over cherry-picks. Cherry-picks are a recovery tool, not the normal promotion mechanism.

  • Keep a feature branch available until it has either reached its assigned release or been formally cancelled.

Feature branches should stay independent. If feature B depends on feature A, record that dependency in both pull requests. A dependent feature cannot be scheduled earlier than its prerequisite. Prefer feature flags when incomplete work must coexist with released code.

Version and build identification

SoloDB follows <major>.<minor>.<patch> semantic versioning. Increment:

  • major for an incompatible change;

  • minor for backward-compatible functionality;

  • patch for a backward-compatible fix.

release-info.json is the repository source for the current release version, date, and release-note document. Do not edit version constants in PHP or add another version to composer.json. bin/prepare_release updates the release information when a candidate is prepared.

Container builds add the following immutable build information:

Value

Purpose

SoloDB version

Semantic release or candidate version, such as 5.15.0-rc.42

Git reference

Source tag or branch, such as v5.15.0 or release/5.15.0

Reference type

Whether the source reference is a tag or branch

Git commit

Exact source revision

Build date

UTC timestamp at which the image was built

Production builds use the version tag without a prerelease suffix. Builds from release/** receive an -rc.<run> suffix. The application exposes this information on the administrator dashboard, and the container stores the same values as environment variables and OCI image labels. Non-production environment badges also show the source reference and commit when a user points to them. The production build stops if the tag version differs from release-info.json.

Release-note fragments

Every feature and user-visible fix adds at least one uniquely named fragment to release-notes.d:

release-notes.d/83972.feature.md release-notes.d/83972-2.improvement.md

The fragment contains only the user-facing description, without a bullet or category prefix:

Equipment can now create and link its own root storage location.

Supported fragment types are feature, improvement, fix, change, ui, system, docs, and backend. The fragment travels with the feature into develop and into the selected release branch. Because each fragment has a unique filename, features do not compete to edit a shared future release document. Use the no-release-note pull request label only when a change has no user-visible or operational effect.

Release lifecycle

1. Create and scope the release

The release manager creates the branch from the latest production main, never from develop:

git switch main git pull --ff-only origin main git switch -c release/5.15.0 git push -u origin release/5.15.0

Create a milestone or release ticket with:

  • the target version and expected date;

  • the feature pull requests selected for the release;

  • known dependencies, database changes, and rollout work;

  • the person responsible for the release decision.

Multiple release branches may be open at the same time. Each starts from main and contains only its own selected features. Release trains reach main in version order. When an earlier release reaches main, merge main forward into every later release branch before that later release is accepted.

2. Develop an independently selectable feature

Start the feature from current main so that it does not inherit unrelated work from develop:

git switch main git pull --ff-only origin main git switch -c feature/83972-link-storage-equipment git push -u origin feature/83972-link-storage-equipment

Keep the feature current by merging main into it when necessary. Open a pull request from the feature branch to develop when the feature is ready for integration testing. Leave the feature branch available after that merge.

3. Assign the feature to a release

When the feature is scheduled, open a second pull request from the same feature branch to the chosen release branch. For example:

feature/83972-link-storage-equipment -> release/5.15.0

The pull request must identify the target version, dependencies, release notes, tests, and any deployment or schema steps. Merge it only after the release manager confirms the scope. A feature does not have to be merged into develop before it can enter a release, although integration testing there is normally useful.

This produces release selection such as:

Feature

develop

release/5.15.0

release/5.16.0

Equipment-linking feature

Yes

Yes

Inherited through main after 5.15.0 is released

New recipe workflow

Yes

No

Yes

Experimental dashboard

Yes

No

No, still unassigned

To reschedule a feature whose release pull request is still open, close that pull request and open one against the new release branch. If it has already been merged, revert its merge on the original release branch through a reviewed pull request. After the original release reaches main, forward-sync main into the later release and restore the feature there with a reviewed revert-of-revert or corrective pull request. Merging the original feature branch again is not enough because its commits are already in the shared history. Do not rewrite either release branch.

4. Stabilise the release candidate

At feature freeze, accept only fixes, documentation, release notes, and required deployment changes on the release branch. Create a bugfix/... branch from that release branch for every correction and merge it back through a pull request. Apply the same correction to develop when the affected code is present there.

Prepare the release page from the fragments that reached the release branch:

git switch release/5.15.0 bin/prepare_release 5.15.0 --date=2026-11-02

The command validates the three-part version and current branch, generates the Writerside release page, updates the release index and sd.tree, updates release-info.json, and removes the consumed fragments. Review and edit the generated page as part of the release pull request. Do not run the command on develop, because that branch can contain fragments for several future releases.

Deploy and test the release branch as a complete candidate. Acceptance should include, as applicable:

  • PHP linting, static analysis, and PHPUnit tests;

  • the TypeScript build and relevant user-flow tests;

  • Doctrine schema validation and review of database changes;

  • host-specific checks for the intended SOLODB_HOST profiles;

  • generated template maps, release notes, and rollback instructions.

Do not validate a release from develop: it may contain features that are outside the release scope.

5. Publish the release

  1. Confirm that release-info.json and the generated release notes both identify 5.15.0.

  2. Open a pull request from release/5.15.0 to main and perform the final review.

  3. Merge with a merge commit after all required checks and acceptance steps pass.

  4. Create an annotated semantic-version tag on the resulting main commit and push it:

    git switch main git pull --ff-only origin main git tag -a v5.15.0 -m "SoloDB 5.15.0" git push origin v5.15.0
  5. Deploy the tag, publish the release notes, and verify the production deployment.

  6. Open forward-sync pull requests from main to develop and to every later active release branch.

  7. Delete release/5.15.0 after the deployment is verified and no release-specific follow-up remains.

  8. Delete feature branches after their release has shipped and all target pull requests are closed.

Tags are immutable. If production needs another change, publish a new patch version rather than moving an existing tag.

Clean up merged branches

After verifying the production deployment, preview branches eligible for cleanup.

bin/git-branch-cleanup # Preview local branches bin/git-branch-cleanup --remote origin # Include branches on origin bin/git-branch-cleanup --remote origin --apply

The command refreshes the selected remote's tracking refs and checks each local or remote tip against its main and develop tips. It also checks every existing release/* branch by default. Use a repeatable --release release/5.15.0 option to name the releases relevant to this cleanup.

Candidates are limited to feature/*, bugfix/*, and hotfix/* branches. The command skips branches used by a worktree or an open PR. GitHub PR checks use an authenticated gh session for the selected repository and must succeed in apply mode. Each deletion has a separate [y/N] prompt and is conditional on the displayed tip.

Production hotfixes and patch releases

Create an urgent production fix from main:

git switch main git pull --ff-only origin main git switch -c hotfix/5.15.1-login-timeout git push -u origin hotfix/5.15.1-login-timeout

Open a pull request to main, run the normal checks and focused regression tests, and tag the merge commit as the next patch version, for example v5.15.1. The hotfix must include a release-note fragment; run bin/prepare_release 5.15.1 on the hotfix branch before merging it so that its release page and release-info.json are updated. Then merge main forward into develop and all active release branches. Never repair production by committing only to develop or by moving the previous tag.

For a planned patch release, create release/5.15.1 from main and use the normal release lifecycle. Reserve hotfix/* for urgent production work.

Pull request responsibilities

Pull request

Required decision

feature/* to develop

Is the feature complete enough for shared integration testing?

feature/* to release/*

Is the feature explicitly in this release's scope and independently deployable?

bugfix/* to release/*

Does this fix the candidate without expanding its scope?

release/* to main

Is the complete candidate accepted for production?

hotfix/* to main

Is the production risk urgent, understood, tested, and reversible?

main to develop or release/*

Are all production changes represented in future work?

The author owns implementation and test evidence. The reviewer owns code quality and risk review. The release manager owns release scope, acceptance, versioning, and the final merge to main.

Repository configuration required

For this process to be enforceable rather than conventional only:

  • configure branch rules for main, develop, and release/** with required reviews and status checks;

  • run the PHP and documentation checks for pull requests targeting all three branch classes, not only develop;

  • make release branches deployable to a release-candidate or staging environment;

  • reserve production deployments for version tags or accepted merges to main;

  • allow merge commits for promotion pull requests and disable automatic deletion of unshipped feature branches;

  • add “target release”, “dependencies”, “release notes”, and “rollout/rollback” fields to the pull request template.

Until CI and deployment triggers cover release/**, a release branch must not be treated as production-ready.

27 November 2026