I3153 — Task start says how far its base is behind the remote's master as last fetched, and stops only on a diverged local master, with the next step
Have start report how far merge-base(HEAD, refs/remotes/origin/master) is behind, with the age of the last fetch from that ref's reflog, warn on a dirty tree, and refuse only when local master is both ahead of and behind refs/remotes/origin/master, naming the command that brings it current; start never fetches and never pushes.
BLOKOVÁNO vlna 0 · p2 · profil implementation · bezpečné souběžně
Blocked. This issue cannot start until milestone:entry-proves-what-it-handed is done. The status is derived from that, not declared.
Cíl
Have start report how far merge-base(HEAD, refs/remotes/origin/master) is behind, with the age of the last fetch from that ref's reflog, warn on a dirty tree, and refuse only when local master is both ahead of and behind refs/remotes/origin/master, naming the command that brings it current; start never fetches and never pushes.
Proč
The owner asked (2026-09-12) that master be updated at every session start; the safe reading is fetch, verify, stop on divergence, push only through the sanctioned path. The 2026-10-14 incident (worktree create started a remote branch from a stale local master) is fixed on master: worktree create fetches and starts from the remote's trunk (case 3131_a_new_worktree_starts_from_the_remote_trunk), so this issue is the start half. Sources: chatgpt-majordomus:c128#1, chatgpt-majordomus:c128#2.
Aktuální stav
environment/vcs.rs reads ahead/behind against the branch's own upstream without fetching; lib/start.sh records mj_git_dirty and reports neither distance nor fetch age; worktree create already starts from <remote>/<trunk> (case 3131).
Cílový stav
start's verdict names the fetch age, the local and remote heads and the distance of its base.
Rozsah
- lib/start.sh
- apps/majordomus-cli/src/environment/vcs.rs
- docs/WORKTREES.md
- apps/majordomus-cli/src/worktree/trunk.rs
- apps/majordomus-cli/src/worktree/git.rs
- apps/majordomus-cli/src/commands/worktree.rs
- apps/majordomus-cli/tests/worktree.rs
- test/cases/04_start_check.sh
Mimo rozsah
- Any network call at directory entry
- Pushing master
Závislosti
Žádné. Tento úkol je kořenem grafu.
Kritéria přijetí
- A base behind origin/master is named with the fetch age
- A diverged local master stops start with a next step; a dirty tree is a warning
- Cases use real git repositories with a remote
- Each new case named here takes its number from `scripts/case-numbers next` and is announced on the board before the file is written (ADR 0053); a case number written in this record before that is provisional
Validace
- bash test/run.sh 04_start_check 3131_a_new_worktree_starts_from_the_remote_trunk
Požadované důkazy
- case_start_reports_base_divergence
Důkazy
Nic nezaznamenáno. Za každým tokenem výše musí stát příkaz nebo artefakt, než lze tento úkol dokončit; vyprávění se odmítá.
Časová osa
- zahájeno
- —
- ověřeno
- —
- dokončeno
- —
Tato tři pole, důkazy výše a stav závislostí jsou vše, z čeho se stav skládá. Neexistuje žádné pole stavu, které by s nimi mohlo být v rozporu.
Canonical record: .ai/repo/project/issues/I3153.yaml. Read it back with majordomus plan show I3153.