Add AncestryInvalid zero value for ancestry errors

Commit

Soph2mo ago

CheckAncestry returned the literal 0 alongside every error, which equals AncestryReachable. A caller that ignored the error would read a failure as a provable fast-forward. Make the zero value a distinct AncestryInvalid sentinel and return it explicitly on every error path.

Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com Entire-Checkpoint: 6229e797c9d4

Checkpoints

can you review the branch / PR, i wonder if cobra hasn't better handling build in?

Claude CodeOpus 4.8[1m]
View session
Checkpoint 1