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:
@@ -26,6 +26,17 @@ var ErrDuplicate = errors.New("duplicate task ingestion")
|
||||
// authorizing Surface; schema 3 adds lease fencing epochs. Older events stay
|
||||
// readable so a deployment can recover its existing log before new writes
|
||||
// are emitted (the store derives a non-renewable legacy epoch on replay).
|
||||
// LeaseTTL is how long a lease survives without renewal, and LeaseRenewAt is
|
||||
// how much remaining time makes the worker renew. Both halves read these, so a
|
||||
// coordinator granting one TTL while a worker assumes another is not possible.
|
||||
// Short leases are the recovery mechanism for a stalled agent: a stalled pane
|
||||
// is only reclaimed when its lease runs out, and 30 minutes per window made
|
||||
// run 5's review stall unbounded in practice.
|
||||
const (
|
||||
LeaseTTL = 5 * time.Minute
|
||||
LeaseRenewAt = LeaseTTL / 2
|
||||
)
|
||||
|
||||
const CurrentEventSchema = 3
|
||||
|
||||
type TaskState string
|
||||
|
||||
Reference in New Issue
Block a user