Contributing: a branch per issue is asked for, but nothing says how to work on a second one beside the first #1146
Labels
No labels
accessibility
authentication
breaking change
bug
documentation
enhancement
interface
internationalisation
observability
performance
security
tier
1
tier
2
tier
3
tier/4
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Postulo/postulo#1146
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What exists today
CONTRIBUTING.mdlines 54-80 (How a change reaches main) asks for a branch per issue and a pull request per branch, merged when CI is green. Nothing inCONTRIBUTING.md,scripts/or the workflows mentionsgit worktree. With one checkout, a contributor waiting on CI for one branch (the browser job alone is around half an hour) has to stash and switch to start the next issue, which also invalidates the compiled.mofiles and the static build for the branch left behind.A worktree works but has traps nothing writes down:
.venv(gitignored, line 4), no.env(line 17) and no compiled catalogues (*.mo, line 30):uv sync(fast from uv's shared cache) andscripts/messages.py compile(about 27 s, see W3) are needed before the first test.src/postulo/jobs/dataare downloaded in place and gitignored (ESCO 11 MB, GeoNames 62 MB plus the derived 30 MBgeonames-cities1000.sqlite): a worktree has none. The suite runs without them, as CI does, but the running app then has no place lookup unlessPOSTULO_GEOLOCATIONS_DIR(src/postulo/jobs/places.py:44-45) points at the main checkout's copy ormanage.py fetch_geonamesdownloads them again.Honest weight: for an occasional contributor working one issue at a time, branch switching is enough and the rule does not need worktrees. The win is for whoever runs several issues at once, which is how the maintainer works.
No duplicate: searches for "worktree", "git worktree" and "parallel branches" find only #940, which set the branch-per-issue rule without a recipe.
What would change
A short subsection under How a change reaches main, "Two issues at once", with the commands:
git worktree add ../postulo-<N> -b <N>-<slug> origin/main,uv sync, copy.env,POSTULO_GEOLOCATIONS_DIR=<main checkout>/src/postulo/jobs/datain the worktree's.env,uv run python scripts/messages.py compile, andgit worktree removeonce merged; plus the two warnings (shared stash, one heavy suite at a time). Optionally a smallscripts/worktree.py <issue> <slug>doing the same steps; the house rule (a library before own code) has nothing to offer here beyond git itself.What it saves or protects
small: a documented worktree recipe that shares the 70 MB of downloaded datasets and the uv cache instead of re-downloading them, and avoids the known pitfalls; a convenience, not a saving on every run
Accessibility
none
Decided by the maintainer (2026-10-31)
CONTRIBUTING section only, no script
Decisions
Found by the efficiency and reliability audit of 2026-10-30 (finding W4; index postulo/postulo#1108). Checked against
mainatdaee30b15(2026-10-30).