re-implement-fix

Re-implement: fix-supervisor-restart-backoff (original task evaluator-passed with 0.04 score, no implementation artifacts)

Metadata

Statusdone
Assignedagent-1863
Agent identity3184716484e6f0ea08bb13539daf07686ee79d440505f1fdf2de0357707034c3
Created2026-05-03T04:33:06.494762897+00:00
Started2026-05-03T04:44:41.254887422+00:00
Completed2026-05-03T05:00:56.881295210+00:00
Tagseval-scheduled
Eval score0.91
└ blocking impact0.90
└ completeness0.92
└ constraint fidelity0.55
└ coordination overhead0.92
└ correctness0.92
└ downstream usability0.90
└ efficiency0.88
└ intent fidelity0.89
└ style adherence0.90

Description

Description

fix-supervisor-restart-backoff was marked Done by the evaluator at 0.04 (constraint_fidelity=0.70, intent_fidelity=0.01) with the explicit finding "no implementation artifacts found in assigned worktree; branch has 0 commits ahead of main and no diffs in scoped files". The intended backoff for session-lock contention was never landed.

Symptom (surfaced by integrate-nex-chat-end-to-end): the existing rate-limit at coordinator_agent.rs:645-659 increments restart_timestamps on EVERY spawn (clean exits included, line 892), so 3 normal TUI handoff cycles (write sentinel → cooperative release → respawn) trigger a 10-minute pause. The intended fix was to detect "exit status=1 within ~1s of spawn AND live session-lock holder present" → back off ≥10s, increment a SEPARATE counter, and only exit-supervisor after N consecutive contentions.

File scope

  • src/commands/service/coordinator_agent.rs (restart loop around lines 630-895)
  • tests/ (unit test that simulates exit-status-1 + recent live lock holder)

Validation

  • Failing test written first: simulates exit-status-1 + live-session-lock holder → assert ≥10s sleep recorded, NOT 600s rate-limit
  • Implementation distinguishes session-lock contention exits from clean exits
  • Clean exits do NOT push restart_timestamps (or use a separate counter)
  • Three TUI handoff cycles in <1 minute do not trip the rate-limit
  • cargo build + cargo test pass with no regressions

Depends on

Required by

Log