Files
roboco/tests
Renn FandRenzo F 69271f9e98 fix(task): push a pre-set branch_name when the ref is missing on origin
A branch_name set on a task was treated as proof the ref existed on origin,
so _finalize_claim skipped _ensure_branch_for_task and create_branch/push
never ran. A manual field write (or a prior failed create_branch whose
rollback didn't restore branch_name) left the field set while the branch was
never pushed; descendants then ls-remote'd the name, found it empty, and cut
from master via create_branch's silent fallback — breaking the cell->root
branch hierarchy (MegaTask f7d0a61a root-branch 404).

Defect A:
- _ensure_branch_for_task trust-but-verifies a pre-set branch_name: probe
  origin, and when the ref is confirmed missing run the full create to push
  it. An inconclusive probe (network error) fails soft so a transient glitch
  can't fail a normal resume claim. Gated on project_id so branchless
  coordination/umbrella tasks are untouched.
- _finalize_claim always runs _ensure_branch_for_task (the single chokepoint
  that ensures the branch exists) and snapshots+restores branch_name on
  rollback, so a failed first attempt can't leave the field half-set and
  short-circuit a retry.
- GitService.branch_exists_on_remote: ls-remote probe returning True (present)
  / False (absent) / None (probe errored, fail soft).
2026-07-13 13:57:14 +02:00
..