Repository navigation
refactor: remove retired heartbeat and queue helpers - #180915
Merged
Merged
Conversation
The proactive heartbeat executor and old queue activation caller have already been retired. Remove their unused helpers and stale mock keys while keeping queue recovery assertions on scheduleFollowupDrain and retaining the public system-event shape.
Contributor
|
🦞👀 Pull request received. I will update this pull request when review starts. |
steipete
marked this pull request as ready for review
October 22, 2026 19:06
Contributor
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Oct 23, 2026
Remove unreachable helpers left by heartbeat executor retirement and the old queue activation path. Preserve the current heartbeat response handling, public system-event shape, and restart recovery through scheduleFollowupDrain. Delete the superseded implementations, obsolete unit cases, and stale mock exports. Net reduction: 183 lines. No schema, SQL, dependency, or public Plugin SDK change. Co-authored-by: Dave Lauer <dlauer@gmail.com> Co-authored-by: JustYannicc <52761674+JustYannicc@users.noreply.github.com> Co-authored-by: brokemac79 <255583030+brokemac79@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Problem This Solves
The retired heartbeat executor and queue activation path left unused helpers, obsolete unit cases, and stale mock exports in the auto-reply code.
User Impact
No user-visible behavior change. Current heartbeat response handling, queue recovery, system-event ownership, and the public system-event payload remain intact.
Why This Change Was Made
The last runtime callers disappeared in #180192 and #180563. Delete the superseded helpers and their obsolete tests. The queue recovery tests now enter through the existing
scheduleFollowupDrainowner. KeepSystemEvent.deliveryHeldand its delivery filter because that shape remains public.The change removes 183 net lines: production +2/-119, tests +6/-70, and two obsolete mock-baseline rows. It adds no state, cache, requests, SQL, schema changes, or dependencies.
Evidence
Acceptance rule: on the same source baseline, the canonical production and full-tree Knip export counts must fall, the scripts count must not increase, and the affected recovery/ownership tests and static checks must retain their contracts. This cleanup makes no wall-clock, CPU, or memory improvement claim: the deleted paths have no live callers. SQL/request/MAIN counts are expected to remain unchanged. The runtime check is one baseline-to-candidate pair of the frozen v3.1.4 real-Gateway workload, comparing causal warm-turn statements/requests/MAIN. Use --repetitions 1 --idle-seconds 0: the idle phase is omitted because this change removes unreachable code and makes no idle claim. Any added work attributed to a changed owner is a regression. This is count evidence, not a timing or CPU benchmark.
git diff --check: pass.df27c0c72d66→ candidate5f1ff14ae825: production 42 → 31 symbols (29 exports + 13 types → 19 exports + 12 types), full-tree 57 → 52, scripts 0 → 0. No added findings in any lane; all other full-tree categories are unchanged. These count individual symbols, not compact-reporter rows. The frozen v3.1.4 pair passed on both revisions: ten causal warm turns each remain 45 [45–48] SQL / 11 [11–12] requests / 0 [0–0] MAIN. Whole workload: 2,821/762/96 → 2,820/757/96; these small aggregate changes are background variation, not claimed savings. Both fixtures completed restart and shutdown with no surviving children. Causal means are 45.6/11.2/0 → 45.3/11.1/0. Two raw execution windows exceed a 20% SQL increase: turn 02 is 46 → 61 and turn 03 is 47 → 65, while each causal turn stays 45/11/0. Raw windows include non-turn work; these increases are disclosed, not treated as a performance win or dismissed as within spread. This patch deletes unreachable paths and has no active SQL owner change. Attribution has an unchanged unknown bucket of 19 SQL / 17 requests, so the comparison is not complete attribution of every operation. The initial tool-search-path failure executed no Gateway workload; the corrected pair uses the mandated internal dependency store.check:changedpassed changed-file lint, Madge (zero runtime cycles), T1/dialect ratchets and architecture guards. Three UI max-lines findings are byte-identical to the base. Local tsrs setup rejects the mandated external-to-checkout internal dependency store, so exact-head CI supplies type proof. The two stale mock fingerprint rows were pruned by the canonical checker. Exact-head CI run 39838431952 completed successfully, including production/test types, lint, source contracts, architecture checks, ratchets and the required CI gate. Required checks are successful.No SDK export removal or update/migration behavior change. Historical SDK removal records are retained.
Open-PR conflict comparisons
Freshness check (2026-10-22T19:39:03.696482+00:00): one open-main census covered 2,936 PRs. Reused unchanged-head file lists and inspected all 15 new + 18 moved heads from exact Git objects. None introduces a PR1 overlap (own #180915 excluded). Of the previous 86 compared PR heads, #180873 is no longer open against main; all remaining 85 overlap heads are unchanged, so their existing base
df27c0c72d668515f397c2251914c1e9c0fc8f46versus candidate5f1ff14ae82597a74c2b05fe61382adc260d8487comparisons remain applicable. No additional PR1 merge comparison was needed.Coverage limit: unchanged non-overlap discovery reuses the prior complete file-list census (770 exact-head verified, 2,168 cached-only before this delta); this check does not independently refetch every unchanged cached-only head or cover activity after the snapshot. Leaving open-main does not establish whether a PR merged, closed, or changed base.
Open-PR overlap proof for
5f1ff14ae82597a74c2b05fe61382adc260d8487against basedf27c0c72d668515f397c2251914c1e9c0fc8f46:A current-number census covered 2,938 open PRs targeting main. File discovery uses the repository-approved cache; 770 locally available heads were independently checked against Git. That check corrected one stale cached match. The remaining 2,168 discovery records were cached-only, so this is not a claim that every file list was independently verified.
All 86 discovered overlaps were then tested with exact commit objects (26 reused locally, 60 fetched and SHA-verified), recomputing their file paths before comparing base-only and candidate merge trees. Two cached matches (#158696 and #92649) no longer overlap the 15 changed files; their exact merge checks still add no conflicts. The other 84 are actual overlaps.
The only added conflict paths/blocks are these two accepted exceptions:
src/agents/failover/user-copy.test.ts. Resolution: fix: show recovery guidance for interrupted conversation startup #168211: keep your inserted tests, drop the removed heartbeat test.src/auto-reply/heartbeat.ts. Resolution: fix(auto-reply): skip heartbeat turns for legacy docs-link boilerplate scratch #158025: the helper it changes has been unreachable since refactor(automations): retire heartbeat executor and response tool #180192; if the docs-link boilerplate skip is still wanted, it belongs in the Automations path.Every other discovered PR adds no conflict path or block. Changed inherited blocks in #160405 and #152205 only shrink as dead exports/implementation disappear. In #127967, existing drain conflict blocks coalesce (27 → 26 blocks), and the existing import conflict loses the dead export. The remaining conflict block content is unchanged.
e156630e88ff8d49a9eaf2ea5d12999c598cb6d9c9c7fe7607464c0ec811c19837bc30772f4a743baa3dfb8543938c58813aa20c5879aa3861021eb6968b432080015cb29d92860b987687d2da2c4ba6e39ad497cbc70ad22e2448cc24b55d0721c0134183a27557f309ff5c5f9feb93c357ee0cedaa76a890991bffa64d5aed8180f8ba93cf8c377780723dca9853349c6a8924938bd9c110158faef6a9db4cd26a7d79655895e759322816725f672c1e5ecdd118aebb9e5af2daadcdfc8daaef89852e7e28c795518d5955ada9fd77acd7b4840cdc61d8834f58d1b5c9c4709eecdda7bcce26217e62404210e057cd20f0236c3d4650e9a9a268dc76a8560ec6f4e7cfae3f6cb00c500450cbacfef42420d6b3977335c7ce62ecf01c1519617b46e593f73f1215c55d8b069a12233c54f6efef44c343882b9ad24c33f35b5b64e5183469dc6bf27a1603968fb877d03ef0f9d0e60d9f80c66ddfa05120627c92e039df3ce2284f6dd236464bcc24ff19f9bda864fb787aa001cc51ef141742d72b1321b1878d72643069bacf24913fc0e97fc00dbca05449da58a3deb7590c6fe105a83cfefcf012ddaf7a65630e2f7184fe41ff268a3772bab3c9e0655575513aa463b3e143e7dbb2c552294fac101e3c89e6f4675cff003d4d3b1169f3f11c08b63c1b826d2ee6a237722407313ae051c0b565dab768026efed04ae3d679aa897825