fix(tools/git): ci-queue-wait.sh crashes (JSONDecodeError) on 404 for not-yet-pushed branch #872
Reference in New Issue
Block a user
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?
The mandatory pre-push CI queue guard ci-queue-wait.sh crashes on --purpose push for any branch not yet on the remote: gitea_get_branch_head_sha() does curl -fsSL .../branches/, Gitea returns 404, curl -f fails then empty stdin then python json.load raises JSONDecodeError. The guard runs BEFORE the first push, so every new feature branch first push is blocked. Fix: treat 404 branch-absent as queue-clear (exit 0); genuine API errors still fail-closed. Upstreams Mos host-local tooling-patch kit (2026-07-23) Patch 3.