Render a pending manual gate as stale when the tree has moved

f4dbcf7 taught the verified branch about staleness and left the pending one.
Run 10 showed a successor "automated checks passed at 94bd45c3b5d6" while HEAD
was 7d04aef: the automated half of that phase was established against code
that had since changed, and nothing said so.

A human about to confirm the manual steps of a phase deserves to know the
automated half no longer describes the tree.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CVbaKucEYBjMqVeUgJUsc1
This commit is contained in:
2026-08-28 15:55:29 +04:00
parent fda78cf6e6
commit d7e75e9e31
2 changed files with 33 additions and 0 deletions
+6
View File
@@ -459,6 +459,12 @@ func renderPlanProgress(in Input) string {
fmt.Fprintf(&b, "- %s (%s): verified at %s, stale because the tree is now at %s\n", phase.ID, collapse(phase.Name), short(rec.AtSHA), short(in.Git.HeadSHA))
case rec.Status == domain.PlanPhaseVerified:
fmt.Fprintf(&b, "- %s (%s): verified at %s\n", phase.ID, collapse(phase.Name), short(rec.AtSHA))
case rec.Status == domain.PlanPhaseAwaitingManual && rec.Stale(in.Git.HeadSHA):
// A pending manual gate goes stale for the same reason a verified
// phase does. Run 10 rendered "automated checks passed at
// 94bd45c3b5d6" against a tree that had moved to 7d04aef, because
// only the verified branch consulted Stale.
fmt.Fprintf(&b, "- %s (%s): automated checks passed at %s, stale because the tree is now at %s, waiting for the human to confirm the manual steps\n", phase.ID, collapse(phase.Name), short(rec.AtSHA), short(in.Git.HeadSHA))
case rec.Status == domain.PlanPhaseAwaitingManual:
fmt.Fprintf(&b, "- %s (%s): automated checks passed at %s, waiting for the human to confirm the manual steps\n", phase.ID, collapse(phase.Name), short(rec.AtSHA))
default: