FN-6850: refresh auto-claim candidates before heartbeat claims
Auto-claim heartbeats now validate cached todo candidates against current task rows before displaying or claiming them.
- Share the auto-claim runnability predicate between snapshot generation and canonical freshness checks.
- Rebuild cached candidates from fresh slim task rows before role filtering, prompt rendering, and claim selection.
- Cover stale triage, assigned, checked-out, deleted, dependency-blocked, and retitled candidate cases in snapshot and heartbeat tests.
Files changed:
.../src/__tests__/auto-claim-snapshot.test.ts | 65 +++++++++++++++-
.../src/__tests__/heartbeat-executor.test.ts | 85 +++++++++++++++++++-
packages/engine/src/agent-heartbeat.ts | 15 ++--
packages/engine/src/auto-claim-snapshot.ts | 91 +++++++++++++++-------
4 files changed, 220 insertions(+), 36 deletions(-)
Fusion-Task-Id: FN-6850
Fusion-Task-Lineage: 5af79319-46f4-4ee7-b6dc-d846f45abaa4