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.
Branch model
Branch | Purpose | Created from | Merged into |
|---|---|---|---|
| The exact production history. Every production release is tagged here. | Not applicable |
|
| Broad integration and development-environment testing. It can contain features for different or unassigned releases. | Long-lived | Nowhere as a whole; never merge |
| The curated, deployable candidate for one release train, for example |
|
|
| One independently selectable feature, for example | Normally |
|
| A fix found while stabilising a release. | The affected release branch | The affected release branch; also apply it to |
| An urgent fix for the production version. |
|
|
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:
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.
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 fromdevelopintomainor a release is forbidden by this workflow.SYNC +N/-M: the local branch is N commits ahead of, and M behind, its configured upstream.GONEmeans that upstream ref is absent from the local cache; refreshing its remote confirms whether it was deleted.unmappedmeans the configured upstream is excluded by the remote's fetch mapping.unrelatedorUNKNOWN: 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, andrelease/**; 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
developand 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
developwholesale into a release branch ormain.Prefer forward merges from
mainover 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:
majorfor an incompatible change;minorfor backward-compatible functionality;patchfor 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 |
Git reference | Source tag or branch, such as |
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:
The fragment contains only the user-facing description, without a bullet or category prefix:
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:
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:
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:
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 |
|
|
|
|---|---|---|---|
Equipment-linking feature | Yes | Yes | Inherited through |
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:
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_HOSTprofiles;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
Confirm that
release-info.jsonand the generated release notes both identify5.15.0.Open a pull request from
release/5.15.0tomainand perform the final review.Merge with a merge commit after all required checks and acceptance steps pass.
Create an annotated semantic-version tag on the resulting
maincommit 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.0Deploy the tag, publish the release notes, and verify the production deployment.
Open forward-sync pull requests from
maintodevelopand to every later active release branch.Delete
release/5.15.0after the deployment is verified and no release-specific follow-up remains.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.
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:
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 |
|---|---|
| Is the feature complete enough for shared integration testing? |
| Is the feature explicitly in this release's scope and independently deployable? |
| Does this fix the candidate without expanding its scope? |
| Is the complete candidate accepted for production? |
| Is the production risk urgent, understood, tested, and reversible? |
| 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, andrelease/**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.