fix: let target:none heartbeats recover from stale pending delivery#84679
fix: let target:none heartbeats recover from stale pending delivery#84679extrasmall0 wants to merge 1 commit into
Conversation
|
Thanks for the context here. I did a careful shell check against current Current main already fixes the central heartbeat failure by no longer replaying non-ack pending-final-delivery text on heartbeat runs, with regression coverage; the remaining branch-specific clear path is stale against main and carries session/message-delivery risk. So I’m closing this as already implemented rather than keeping a duplicate issue open. Review detailsBest possible solution: Close this branch, keep the current-main no-replay implementation, and let broader bounded cleanup continue through #85770 if maintainers want additional stale-state clearing. Do we have a high-confidence way to reproduce the issue? Yes. The v2026.5.27 source still returned stale pending heartbeat replay text, the discussion includes a field repro of the shipped Is this the best way to solve the issue? Yes for current main, not for this PR branch. Current main solves the recovery path by suppressing heartbeat replay while preserving non-ack pending state; any additional cleanup should be scoped to heartbeat-owned stale state or handled by the bounded replay follow-up. Security review: Security review cleared: No dependency, workflow, secret, permission, or external code-execution surface changes were found; the remaining concern is functional session/message delivery risk. AGENTS.md: found and applied where relevant. What I checked:
Likely related people:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 76130fd98873; fix evidence: commit 492105db5a36, main fix timestamp 2026-05-28T10:57:03-07:00. |
|
ClawSweeper PR egg 🎁 Pass real behavior proof to wake the egg and unlock a hatchable treat. Where did the egg go?
|
|
The overlap with #83187 is real, but I don't think they're duplicates. #83187 clears That is why this patch touches both:
So the split is:
I added the reproduction and before/after behavior notes to the PR body for this exact branch because the bug shows up before the broader send-success cleanup in #83187 would help. |
Field repro of the
|
|
The new field repro above changes the proof picture enough that this should get another pass. It confirms the exact shipped On the scope concern: for this path, the pending state lives on the heartbeat session key rather than the user chat session, so the clear is not crossing into unrelated user-visible final-delivery state in the reproduced setup. @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
ClawSweeper applied the proposed close for this PR.
|
Fixes #84672.
This keeps internal-only heartbeats from replaying stale pending-final-delivery text forever.
What changed
noneReal behavior proof
Reproduced the stale replay flow with a heartbeat run whose resolved delivery target is
nonewhilependingFinalDelivery*fields are still populated from an earlier pass.Before this patch:
pendingFinalDeliveryText/ metadata populatedtarget:noneheartbeat re-enters the fast pathWith this patch:
target:nonepath explicitly skips stale pending replayThat keeps
target:noneheartbeats recoverable after a stale pending-delivery state while leaving non-nonedelivery targets on the existing path.Validation
pnpm vitest src/auto-reply/reply/get-reply.fast-path.test.ts src/infra/heartbeat-runner.returns-default-unset.test.ts