Repository navigation
refactor: remove retired runtime code and duplicate helpers - #151973
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: blocked before merge. Reviewed September 18, 2026, 4:19 PM ET / 20:19 UTC (Revision 6). ClawSweeper reviewWhat this changesRemoves unused runtime and native code, consolidates provider credential handling and Telegram message measurement, and moves internal callers and tests onto existing owners. Merge readiness⛔ Blocked before merge - 2 items remain Useful maintainer-owned cleanup remains absent from current main. No blocking correctness defect was found, and the prior generic upgrade concern is not supported by the introduced changes. Priority: P3 Review scores
Verification
How this fits togetherOpenClaw’s Gateway and agent runtime coordinate provider credentials, session checkpoints, and channel delivery. This cleanup simplifies those internal paths while retaining their existing configuration, storage, and authorization behavior. flowchart TD
A[Client requests] --> B[Gateway and agent runtime]
B --> C[Session checkpoint owner]
C --> D[SQLite state]
E[Provider setup] --> F[Credential owner]
F --> D
B --> G[Telegram block measurement]
G --> H[Channel delivery]
Before merge
Agent review detailsSecurityNone. PR surfacePR surface statistics unavailable: the file list is incomplete. Review metrics
Stored data modelPersistent data-model change detected: Technical reviewBest possible solution: Retain the consolidated owners, documented additive SDK helpers, and existing compatibility and authority contracts. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR proposes internal cleanup rather than a specific broken user flow; no runtime tests were executed during the read-only review. Is this the best way to solve the issue? Yes: removing unused paths and sharing existing owners is maintainable, and the inspected changes preserve configuration, stored formats, and execution checks. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 47c4fbcb20d2. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (5 earlier review cycles)
|
28660f4 to
63a766c
Compare
51ef7b2 to
9b2ee03
Compare
|
Merged via squash.
|
…49075-c1-control-repair * commit 'dc5b321b5f89f9cf0e704ee202ea3059fb1ce63d': (79 commits) fix: start background context maintenance after durable turns (#151936) fix(models): avoid ambient state reads during prepared selection (#152119) feat: recover abandoned Crabbox source staging (#152006) chore(ui): refresh control ui locales (#152098) fix(ui): keep cloud startup prompts and progress in chat (#152024) fix: report completed subprocess cleanup after cancellation (#152107) perf(reply): reuse normalized inbound text (#152110) fix(cron): paused future one-shots disappear after Run now (#152126) perf(sessions): reuse rows and skip discarded terminal labels (#152109) fix(ui): keep keyboard-focused automation controls clear of sticky actions (#152135) fix(ui): load remote images in compact activity previews (#152045) refactor(health): skip unused verbose account projection (#152108) fix: restore dashboard test limits and SQLite test compilation (#152089) test(qa-lab): stabilize timeout recovery delivery proof (#152100) fix: probe SQLite when Node denies worker threads (#152075) perf(gateway): keep GitHub co-author trailer scans linear (#152115) fix(media): report CLI models with missing command or args (#151969) refactor: remove retired runtime code and duplicate helpers (#151973) perf(plugins): combine runtime and tool call scopes (#152101) test(memory): seed restart fixtures with the Gateway stopped (#152038) ...
…pr-149282-proof-20260918 * commit 'dfa48c256f0853268c6b42cbe09fc1338d7d24ea': test(qa-lab): stabilize timeout recovery delivery proof (#152100) fix: probe SQLite when Node denies worker threads (#152075) perf(gateway): keep GitHub co-author trailer scans linear (#152115) fix(media): report CLI models with missing command or args (#151969) refactor: remove retired runtime code and duplicate helpers (#151973) perf(plugins): combine runtime and tool call scopes (#152101) test(memory): seed restart fixtures with the Gateway stopped (#152038) perf(gateway): avoid session list stalls on broad updates (#152074) fix: preserve model failure causes and worker fallback runtime (#152028) perf(logging): reduce Gateway hot-path info log volume (#152080) improve(gateway): reduce duplicate worker data fetched from SQLite (#151878) improve: format messages with many links faster (#152112) perf(cron): avoid unused SQL binding in config projections (#152029) fix: explain cloud worker startup failures (#152043) refactor(discord): share Markdown edit projection (#149214) refactor(media): remove unreachable geometry metadata backfills (#149272) chore(autoreview): sync mirror to agent-skills a7e91e1 (#152039) fix(ui): restore sidebar and chat test collection (#152099)
…#151973) * refactor: remove retired runtime paths and duplicate helpers * perf(telegram): avoid repeated rich-block traversal setup * refactor: preserve SDK compatibility and finish runtime cleanup * test: parse library runtime import boundaries * test(ui): keep record fixtures independent of gateway state
What Problem This Solves
Retired runtime paths, duplicate implementations, and repeated type declarations increased the maintenance cost of agent execution, session checkpoints, provider setup, and native apps.
User Impact
Removes 2,032 net production lines, excluding tests/support, docs, and generated output. Existing behavior, stored-data formats, public SDK exports, and execution authority checks remain intact.
Why This Change Was Made
Removes the private agent event-stream facade, retired checkpoint mutation/factory paths, native code whose callers moved to the Dashboard or host worker, and unused internal wrappers. Provider credential capture/persistence and rich-message measurement share their existing owners. ACP, MCP, and tool factories reuse canonical types with unchanged expanded properties and emitted JavaScript. Redundant import/re-export bindings preserve exports and initialization order.
The compatibility audit retained three helpers still exposed through the deprecated public SDK and dropped two proposed public helper extractions. No SDK surface budget, storage schema, retention, or permission changes are required. Configuration names/defaults, original SecretRef values, checkpoint serialization, and legacy checkpoint reads stay unchanged. The memory-wiki edit consolidates Gateway registration; its data access and update owners are unchanged. Schema guards, provider/auth tests, checkpoint tests, and the five fault/recovery cases provide compatibility proof; no migration or operator action is needed.
Tests use the active owners. The library lazy-import guard now parses runtime module references after TypeScript erasure. UI record fixtures import their pure helper directly, keeping Gateway storage modules out of jsdom. The compaction crash fixture now intercepts the retained checkpoint function, waits for recovery of the exact interrupted cron occurrence, and disables unrelated Activity recap inference through its existing fixture configuration.
Evidence
Exact-head CI passed for
9b2ee030fc5485618d592a2feb85c505af4e210c. CI exposed the regex guard error and an upstream fixture-barrel regression; both repairs passed focused reproduction, typechecking, lint, and independent review. Production code and the measured implementation are unchanged by these test fixes.There is no end-to-end Telegram latency or memory-saving claim. Native runtime coverage runs in disposable CI, rather than on an operator desktop.