Hotfix a release
Treat as a hotfix builds one fix on your latest release and ports it to the default branch when it needs it, with a port report per repository.
A bug in a released version needs a fix on that release and the same fix on the default branch. Treat as a hotfix, at Implement’s start, does both in one sandbox: the agent fixes the release first, then ports the fix to the default branch and runs the tests again.
#When it is offered
- Both suffixes are set in Settings → Releases.
- At least one repository released from this workspace (ticked in Settings → Releases) has a latest release: its newest release or hotfix tag. See Release safe version tags.
Ticked, the start lists each repository’s base, for example:
- acme/api from v2.4.0-rc (12 Nov) → PRs into hotfix/v2.4.0-rc and main
- acme/worker no release yet — read only
- acme/docs not released from this workspace — read only
A repository with no release, or not ticked as released from this workspace, is read only: the agent can read it, and Ensemble keeps none of its changes.
#The flow
- On the story view, press Implement. In the build tab, tick Treat as a hotfix and press Start.
- Settle the plan as usual. See Plan the work.
- Approve and start. The agent fixes each release checkout and runs its tests. Then it reads the default branch: when it still needs the fix, the agent ports it, resolves the differences and runs the tests again.
- Each repository shows two diffs, Release fix and Main fix, and the port report (below).
- Press Push both as drafts (or untick drafts first).
#The port report
The default branch can be far from the release. The fix may not be needed there, for example when the code was removed, or it may need to be different. At the end of the build the agent says, for each repository:
- Applied to both: the same fix on the release and on the default branch.
- Applied to both, adapted for main, and what is different.
- Not applied to main, and why, for example the export code was removed in src/export/.
This is the agent’s own report, not a test result. Ensemble checks it against the two diffs. When they disagree, the tab says so beside Push: Says main does not need it, but changed main. or Says it was ported, but main is unchanged. You can still push. With no report, the tab says No report from the agent.
#What Push opens
- hotfix/<tag>, made at the release commit if it is not there yet.
- A pull request from the ticket key into hotfix/<tag>, with the release fix.
- A pull request from the ticket key plus -main into the default branch, with the main fix. When the default branch does not need the fix and is unchanged, there is no second pull request.
Both are titled with the ticket key and title, and each description links the other and carries the port report’s line, for example Not applied to main: the export code was removed in src/export/. Both are yours, as with any Implement push. After they open, Ensemble writes nothing more for the build.
If hotfix/<tag> already has commits past the release, for example from an earlier hotfix, the release pull request still targets it, and the tab names the pull requests already open on it.