Repository navigation
fix(heartbeat): monitor wakes honor configured session - #127153
Conversation
Sessionless interval heartbeat monitor and task wakes now defer to the configured heartbeat session, while explicit user sessions and ordinary cron event queue ownership remain unchanged. Maintainer replacement for #116373 because the external fork cannot satisfy the strict Clownfish landing transaction. The replacement preserves the accepted patch exactly on current main. Fixes #116205. Thanks @sloptop-the-terrible for the original patch and @QQSHI13 for the report.
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Codex review: needs maintainer review before merge. Reviewed August 21, 2026, 8:04 AM ET / 12:04 UTC. ClawSweeper reviewWhat this changesThe PR changes Gateway cron wake routing so monitor and migrated heartbeat-task wakes without a caller session use the configured heartbeat session. Regression provenancePossible regression — probable (reproduction; reviewed change). No predecessor PR is attributed. Merge readinessKeep open for maintainer review: current main still forces keyless interval wakes into the agent’s main session, and this PR restores configured heartbeat-session routing at the producer boundary. Priority: P1 Review scores
Verification
Live VerificationCommand: Result: FAIL (partial) — step 2 Assertions:
How this fits togetherGateway cron executes scheduled monitor and heartbeat-task jobs by placing heartbeat wakes onto the shared runner queue. The selected session controls pending events, transcripts, and delivery routing. flowchart LR
A[Heartbeat monitor or task] --> B[Sessionless interval wake]
B --> C[Gateway cron adapter]
C --> D{Caller provided a session?}
D -- No --> E[Configured heartbeat session]
D -- Yes --> F[Explicit caller session]
E --> G[Queue transcript and delivery]
F --> G
Decision needed
Why: The change intentionally alters persisted-session execution and delivery behavior for existing configurations, and the PR has a protected maintainer label. Before merge
Agent review detailsSecurityNone. PR surfaceSource +3, Tests +694. Total +697 across 3 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the conditional adapter routing and land it once exact-head validation confirms configured-session execution while explicit and ordinary cron-event paths remain unchanged. Do we have a high-confidence way to reproduce the issue? Yes—current main’s keyless interval producer, synthesized main key, and forced-session precedence establish the failure path; the added regression would fail on that pre-fix route. Is this the best way to solve the issue? Yes—the adapter is the narrowest owner boundary because it converts a keyless interval request into an unintended forced main session; changing the runner would weaken legitimate explicit callers. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 1dbcbb2fb074. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
|
Merged via squash.
|
…127153) Sessionless interval heartbeat monitor and task wakes now defer to the configured heartbeat session, while explicit user sessions and ordinary cron event queue ownership remain unchanged. Maintainer replacement for openclaw#116373 because the external fork cannot satisfy the strict Clownfish landing transaction. The replacement preserves the accepted patch exactly on current main. Fixes openclaw#116205. Thanks @sloptop-the-terrible for the original patch and @QQSHI13 for the report. Co-authored-by: sloptop-the-terrible <[email protected]>
Closes #116205.
Related: #116373.
Additional instructions
MUST: Keep Allow edits from maintainers enabled for this PR so maintainers
can help update the branch when needed.
What Problem This Solves
Fixes an issue where users configuring
agents.*.heartbeat.sessionwould still have recurring monitor and migrated heartbeat-task runs execute in the agent's main session. That selected the wrong pending-event queue, transcript, session identity, and delivery route.Why This Change Was Made
The Gateway cron adapter now omits only the synthetic session key for sessionless
source: "interval"wakes, allowing the heartbeat runner to apply the configured session. Explicit user sessions, ordinary cron-event queue ownership, monitor scheduling metadata, andrunHeartbeatOnceremain unchanged.This is a workflow-only same-repository maintainer replacement for external-source PR #116373. The accepted external head cannot satisfy the strict Clownfish external landing transaction. The production and test patch is exactly equivalent to accepted head
46626554072f948759ab44635b718819d1e6af77, rebased as one canonical child of currentmain; no behavior or proof was changed for the replacement.Original contribution and commit authorship: @sloptop-the-terrible in #116373. Original report: @QQSHI13 in #116205.
User Impact
Recurring heartbeat monitor/task runs honor the configured non-main heartbeat session. Explicit user-targeted wakes still use their requested session, while normal cron events continue to consume the same main/session queue where their event was enqueued.
Evidence
+4/-1; tests:+694/-0.3b68023c0cee004478eacfa28348747bf28d8b16.6c211938c2555a2ffc71de625d3d5374ce1ca427.Native review artifacts are complete and validated.
OPENCLAW_TESTBOX=1 scripts/pr prepare-runandscripts/pr merge-runremain the only landing path and must pass before merge.