Stop counting harness chrome as agent progress, and shorten the lease
F41, live on run 5: the review agent produced nothing after 02:12 and the 02:46 renewal was granted anyway. The progress digest covered Claude Code's status footer, and one of its fields ticked inside the window. Reproduced the worker's stored progress_sha byte for byte from the live pane, so the branch taken was progress != ProgressSHA, not IsBusy and not an empty baseline. PaneProgress now cuts from the editor's lower rule and trims the spinner summary and version notice above it. AgentStatus still reads the raw capture, so the busy markers living in the footer are unaffected. Lease TTL moves to 5 minutes, from domain.LeaseTTL, with renewal at half of it. Reclaiming a stalled pane happens only at expiry, and 30 minutes per window made run 5's stall unbounded in practice. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CVbaKucEYBjMqVeUgJUsc1
This commit is contained in:
@@ -491,3 +491,42 @@ exit 0
|
||||
t.Fatalf("err=%v, want ErrPromptNotSubmitted", err)
|
||||
}
|
||||
}
|
||||
|
||||
// F41, live on run 5: the review agent produced nothing after 02:12 and the
|
||||
// 02:46 renewal was granted, because the digest covered the harness footer and
|
||||
// one of its fields ticked. The layout below is the real pane, with the usage
|
||||
// percentage and the version banner moved on.
|
||||
func TestPaneProgressIgnoresHarnessFooter(t *testing.T) {
|
||||
body := "────\n reviewed the diff, no blocking findings\n────\n❯ \n"
|
||||
footer := func(pct, banner string) string {
|
||||
return body +
|
||||
" [Opus 5] 📁 06G4A4F0TFXKZHJE48N05XN1HG | 7d: " + pct + "\n" +
|
||||
" cf474986 - Orchestra launch instructions | 57.9…\n" +
|
||||
" ⏵⏵ auto mode on (shift+tab to cycle) · " + banner + "\n"
|
||||
}
|
||||
before := paneTmux(t, footer("51%", "current: 2.1.247 · latest: 2.1.248"), 3)
|
||||
after := paneTmux(t, footer("52%", "✔ Update installed · Restart to update"), 3)
|
||||
a, err := before.PaneProgress(context.Background(), Session{PaneID: "s:1.0"})
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
b, err := after.PaneProgress(context.Background(), Session{PaneID: "s:1.0"})
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if a != b {
|
||||
t.Fatalf("footer churn changed the progress digest:\n%q\n%q", a, b)
|
||||
}
|
||||
if !strings.Contains(a, "reviewed the diff") {
|
||||
t.Fatalf("progress digest dropped harness output: %q", a)
|
||||
}
|
||||
worked := paneTmux(t, "────\n reviewed the diff, wrote .orchestra/done\n────\n❯ \n"+
|
||||
" [Opus 5] 📁 06G4A4F0TFXKZHJE48N05XN1HG | 7d: 51%\n", 3)
|
||||
c, err := worked.PaneProgress(context.Background(), Session{PaneID: "s:1.0"})
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if c == a {
|
||||
t.Fatal("real agent output left the progress digest unchanged")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user