Repository navigation
refactor(plugins): remove redundant native timer method probes - #193309
Merged
Merged
Conversation
Contributor
|
🦞👀 Pull request received. I will update this pull request when review starts. |
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. |
8 tasks
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Nov 6, 2026
…law#193309) Remove 25 redundant optional method probes on freshly allocated native timer handles across bundled voice and messaging plugins. Preserve callbacks, deadlines, cancellation, authority checks, and cleanup. Validation: 294 focused tests passed; two isolated reviews; exact-head CI passed. Production net -26 lines; no test changes.
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
Bundled realtime voice and messaging plugins still probe whether native Node/Bun timer handles provide
unref, immediately after allocating those handles.User Impact
No user-visible behavior change. Deadlines, cancellation, cleanup, authority checks, and timer handles remain unchanged.
Why This Change Was Made
Call the guaranteed native method at allocation and remove the redundant probes. This removes 25 optional method checks across 19 files, including three otherwise-unused local bindings. Production delta: +27/-53 (net -26); test delta: 0. No SQL, schema, worker routing, SDK type, provider request, or configuration changes.
Security-sensitive timers keep their existing checks: FaceTime still closes unauthenticated sockets; voice-call still limits pending connections and closes unstarted streams; realtime delegation still checks claim/active ownership; Synology still aborts timed-out requests and holds the response slot until completion. The timeout callbacks and their existing guards are byte-for-byte unchanged apart from the allocation expression.
Evidence
Acceptance rule, recorded before measurement: the 25 redundant method checks disappear; native timer identity, callbacks, cancellation and deadlines stay equivalent. Owning behavior suites and type-aware lint/format must pass; exact-head CI must introduce no static or behavioral regression. Test LOC must not increase.
SQL-inert census waiver applies. One frozen v3.1.5 baseline/candidate count pair is running on pinned commits; its warm statements, worker requests and runtime MAIN will be added after landing under the campaign post-merge measurement rule. No SQL or latency improvement is claimed. Any attributed regression requires correction. No wall-clock/CPU A/B measurement is planned.
Validation: pinned changed-file oxfmt and plain oxlint pass;
git diff --checkpasses. Two isolated Codex reviews of the complete 19-file patch are scoped-clean through P2. They reviewed the diff and native contract; repository-specific timer mocks are covered by 18 existing focused owner suites: all 294 tests passed in five Vitest groups. Type-aware wrapper preparation stops before analysis because the mandated external virtual-store location fails declaration containment; that guard is intact. Exact-head CI 41992143349 passed all selected checks, including typed/static proof and the required aggregate gate.Open-PR comparison at the indexed peer heads: #192698, #192343, #187432, #178262, #175940, #172448, #170000, #165147, #159147, #158392, #157860, #155491, #154498, #141237, #137895, #136506. Each base-only vs candidate
git merge-treecomparison has identical conflict-path counts and no changed conflict blocks in the touched files. Final discovery confirmed all 16 indexed peer heads unchanged before landing.The simplification pass kept only the native timer method changes; no new abstractions, types, tests, exports, or configuration. All sites predate October 25, so this is deferred cleanup rather than a claim of newly introduced code.
Post-merge count evidence
Frozen v3.1.5 same-platform baseline/candidate pair completed on the pinned PR base and head. Both full workloads, including restart, passed. Ten causal warm turns per side: statements median 49 / p95 52 [49–52] on both; requests median 14 / p95 15 [14–15] on both; runtime MAIN 0 on both.
Whole-workload SQL/requests/MAIN were 2996/798/105 → 3022/811/106. The additional MAIN statement is a cold-start
PRAGMA busy_timeout = 5000restoration: the candidate cold admission used 4999 ms instead of 5000 ms, so the unchangedrunWithSqliteBusyTimeoutowner restored it. No runtime MAIN increase. Other raw deltas belong to unchanged background/deletion/snapshot/cron work; the complete per-operation delta is retained with the campaign evidence. None of the 19 changed timer owners issues a changed SQL operation. No latency, SQL-saving, or whole-workload reduction claim is made.Whole-workload per-operation deltas (SQL / requests / MAIN)
AsyncLocalStorage.enterAsyncStoreNO_REQUEST / AsyncLocalStorage.enterAsyncStoreNO_REQUEST / native lifecycleagentDatabaseDeletion.snapshotindex-readlifecycle-artifact-planloadCronRowsloadMemorySourceFileStatepluginState.loadNamespaceprewarmscansession-entry-listsession-exact-entriessession-target-inventorysession-transcript-instancesusage-cost