Universal Tuya docsHomeSupported devicesRequest a deviceFAQChangelogArchitectureKnowledge baseCreditsSourcesContributing

Branch map and worktree hygiene (P3062, 2026-10-26)

Branch map

BranchPublishes asWho pushesRule
mastercom.dlnraja.tuya.zigbee (test channel)automation + manualBehaviour changes land here first.
stable-v5com.dlnraja.tuya.zigbee.stableport after soakData, CI and safety fixes immediately; behaviour after soak on master.
bastien-homecom.dlnraja.tuya.zigbee.bastienpromote workflowSame as stable. While config/promote-publish-hold.json is active, promote only brings CI/test/docs.
wip/*neveranyoneOnly node22-tests and shadow-policy-check run. Not merged blindly: wip/p3055-parasites and wip/p3057-headroom stay separate.
wip/rescue/*neverP3062 rescueFrozen snapshots of worktrees that had uncommitted/unpushed work (74 refs). Do not delete; they are the safety net for the triage in P3062_WORKTREE_TRIAGE.md.
int/*nevershort-livedIntegration branch for a batch; fast-forwarded into its target, then dropped locally.

Publishing workflows are filtered to the three publishing branches. A head commit containing [skip ci] suppresses push-triggered workflows; when that is used during a hold, dispatch node22-tests by hand.

Worktree hygiene

  1. One worktree per task, under /tmp/<task> (or /workspace/<task> only if it must outlive a reboot).
  2. Commit as you go. Before leaving a worktree, push its branch (a wip/* ref is fine).
  3. Remove it when done: git worktree remove <path> (never rm -rf, which leaves stale admin entries).
  4. Delete the local branch only when it is merged or pushed. Never delete remote branches as part of clean-up.
  5. Automated runs call the guard before exiting: node tools/ci/worktree-hygiene.js --repo <main checkout> (dry run), then add --apply. It only removes worktrees under the temp root that are clean, pushed, older than 6 h, at most 20 per run, and it never touches branches.
  6. Do not leave generated output in the main checkout: reports/**, data/status/ and checkpoints are regenerated by their scripts.

Why

On 2026-10-26 the box had 76 worktrees (disk 50 % used). Several held work that existed nowhere else. The rescue pushed it all to wip/rescue/* first, then triaged, integrated, and removed the worktrees.

← Knowledge base index · source