Repository navigation
refactor: remove routine channel callsite diagnostics - #174402
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. |
441c731 to
d09ae11
Compare
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. |
|
Codex review: needs changes before merge. What this changesThis PR removes routine Slack, Telegram, and WhatsApp diagnostics and their private callback, timing, and count plumbing. Example: Telegram accepts a group image message containing a 13-character body.
Review scores
ProductKind: Refactor · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Needs changes before merge - 1 item remains Keep this PR open: the maintainer-approved cleanup is coherent, but an introduced Telegram test-mock defect blocks validation. Priority: P3 Before merge
Findings
Tests
Agent review detailsHow this fits togetherChannel plugins prepare inbound messages and deliver agent replies through shared lifecycle owners; this change removes callsite diagnostics while retaining transport operations, receipts, and failure handling. flowchart LR
A[Channel updates] --> B[Plugin context and routing]
B --> C[Shared inbound lifecycle]
C --> D[Plugin reply delivery]
D --> E[Channel transport]
E --> F[Receipts and final outcomes]
Technical reviewBest possible solution: Keep the approved diagnostic cleanup and repair the Telegram runtime mock without restoring production trace plumbing. Do we have a high-confidence way to reproduce the issue? Exact-head CI reports the missing createSubsystemLogger export, and source traces it from the changed mock through bot-message.ts and bot-message-avatar.ts to accounts.ts; no target code was executed during this review. Is this the best way to solve the issue? Removing private diagnostic projections is consistent with the approved direction, and the inspected mention, attachment, streaming, and failure paths retain their operational decisions. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 96b36ca09a5d. Provenance checked
TestingProof path: unit tests only. SecurityNone. EvidenceAcceptance criteria:
What I checked:
Likely related people:
PR surfaceSource -280, Tests -17, Other 0. Total -297 across 48 files. Added test files: 0. View PR surface stats
Review metrics
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed October 16, 2026, 1:02 PM ET / 17:02 UTC. |
|
Exact-head landing evidence:59ccee8b3f529bbce9f01a14de36e1b2711ceb83. CI38936836099 completed with all selected suites passing, including the repaired Earlier failures were ours, not inherited: retired log expectations/unused bindings The native maintainer path previously failed twice before intent/lock creation on |
…158510 * commit 'cff3c307ba6d0ce273abcdaf5cade848d9746d30': feat(decisions): preserve native catalog capabilities and accounting (#157492) fix(ui): avoid reactive read warnings in picker scrolling (#174436) refactor(test): remove unused Nextcloud fixture signing (#174470) refactor(browser): share managed tab eviction fixtures (#174474) fix(update): preserve Windows inspection path identities (#174471) perf: reduce large-session compaction and indexing allocations (#174433) perf(codex): reduce allocations while reading app-server output (#174468) fix(gateway): skip startup publication checks without a target (#174453) refactor: deslop agent harnesses, channel plugins and packages (wave-6 bundle A) (#173531) perf(state): reduce shared SQLite worker heap retention (#174420) refactor: remove routine channel callsite diagnostics (#174402)
…esafe-decision-native * commit 'cff3c307ba6d0ce273abcdaf5cade848d9746d30': feat(decisions): preserve native catalog capabilities and accounting (#157492) fix(ui): avoid reactive read warnings in picker scrolling (#174436) refactor(test): remove unused Nextcloud fixture signing (#174470) refactor(browser): share managed tab eviction fixtures (#174474) fix(update): preserve Windows inspection path identities (#174471) perf: reduce large-session compaction and indexing allocations (#174433) perf(codex): reduce allocations while reading app-server output (#174468) fix(gateway): skip startup publication checks without a target (#174453) refactor: deslop agent harnesses, channel plugins and packages (wave-6 bundle A) (#173531) perf(state): reduce shared SQLite worker heap retention (#174420) refactor: remove routine channel callsite diagnostics (#174402) # Conflicts: # src/agents/decision-inference.integration.test.ts
…/decision-tool-v2-proof-20261016 * commit 'cff3c307ba6d0ce273abcdaf5cade848d9746d30': feat(decisions): preserve native catalog capabilities and accounting (#157492) fix(ui): avoid reactive read warnings in picker scrolling (#174436) refactor(test): remove unused Nextcloud fixture signing (#174470) refactor(browser): share managed tab eviction fixtures (#174474) fix(update): preserve Windows inspection path identities (#174471) perf: reduce large-session compaction and indexing allocations (#174433) perf(codex): reduce allocations while reading app-server output (#174468) fix(gateway): skip startup publication checks without a target (#174453) refactor: deslop agent harnesses, channel plugins and packages (wave-6 bundle A) (#173531) perf(state): reduce shared SQLite worker heap retention (#174420) refactor: remove routine channel callsite diagnostics (#174402) # Conflicts: # docs/plugins/sdk-overview/capabilities.md
* refactor(channels): remove private success trace plumbing * test(channels): preserve delivery checks after trace removal * test(telegram): preserve runtime exports in message mock
Main removed routine delivery success lines from default logs (openclaw#174260, openclaw#174402). Write the final delivery outcome line through logVerbose so it lands in the Gateway log at debug level and stays out of default INFO output. The lifecycle tests now read the Gateway log records at info and debug level, and cover the early channel_transform skip, where the recovered transcript final leaves nothing to send.
Upstream head: e90dd3e. The fork carried this PR in the 10.x follow-up batch (160e333, from bf8380a23058), and an earlier sync added the early channel_transform skip line. Every production line of the current head is already on this branch (bot-message-dispatch-final-delivery-log.ts and its two call sites in bot-message-dispatch-delivery.ts) except one. Carried from e90dd3e: - the test "logs a final whose recovered transcript text has nothing to send as skipped", which covers the early channel_transform skip. It is adapted to this branch's harness (setupObservedProgressTransport and dispatchWithContext in place of main's observeTransport and dispatchTurn) and reads the outcome lines from runtime.log, like the branch's other outcome tests. - the allocation record, as is. Not carried: the switch of the outcome line from runtime.log (INFO) to logVerbose (debug), and the tests that read it at debug level only. The commit says why: main removed routine delivery success lines from default logs (openclaw#174260 e2bdc7a, openclaw#174402 dcd28a0). Neither is on this branch (not ancestors, no backport by subject), and here logTelegramOutboundSendOk still logs every sent message at INFO (send-context.ts). Moving only this line to debug would hide finals edited into the preview at INFO again, the gap the 2026-10-12 carry closed (RatBot logged 3 of 8 delivered replies). Not carried either: e633886's restructuring of main's lifecycle tests. The branch's own versions of those tests already assert the outcome lines. Proof (M4, Node 26.12.1, pnpm test <file> --maxWorkers=1): bot-message-dispatch.final-delivery-lifecycle.test.ts 18/18 passed. Red-before: with the early skip's logFinalDeliveryOutcome call removed (throwaway commit), the new test fails (1 failed | 17 passed; "expected [] to deeply equal [ Array(1) ]").
What Problem This Solves
Channel hot paths retain routine per-step trace formatting, duplicate success
summaries and private callback/count/timing plumbing alongside their real delivery
and failure owners. These add noise and work without controlling operations.
User Impact
Slack, Telegram and WhatsApp logs become quieter. Failure/non-outcome notices,
canonical lifecycle/final outcomes, real events, routing, authorization, message
delivery, attachment settlement and streaming behavior stay. No user-facing
feature, public SDK flag, protocol, configuration or persisted shape changes.
Why This Change Was Made
Complete the channel-callsite AREA of the logging cleanup family: remove private
draft success callbacks; routine routing/context/send/cache/stream summaries;
Telegram ingress-only clocks and duplicate inbound builder; WhatsApp debug-only
mention details, per-chunk timing/skipLog, media-flush summary/duplicate counter,
delivered-payload wrapper and local heartbeat-strip log state. Migrate exact
private production/test callers and delete the newly orphaned logging import.
280 net production lines removed (+26/-306,35files); 16 net test lines
removed (+45/-61,12files), plus two shrink-only baseline files(+1/-2).
49files total. This is a linked AREA under the wide-family split rule, not an
additional tiny final-residue branch. Fresh main's newer draft transport, Slack
root/history assembly and WhatsApp nullish normalization remain intact.
Best-effort tradeoffs accepted
projections disappear. Their owners still report real failures, omissions and
final outcomes; no operation guard is removed.
accepted-media custody, unmatched attachments and finalization remain exactly
as established by fix(whatsapp): retain unmatched attachments across captioned replacement #131672. Settlement still uses its real delivered count.
identity details. Native group mention, reverse-LID identity, explicit self-chat,
routing and authorization behavior remain. The regression named [Bug]: WhatsApp group @mentions not detected when LID mentions are present (wasMentioned=false even though normalizedMentionedJids matches selfE164) #49317 stays.
failure warnings, draft lifecycle/debounce and public core silentReplyContext/
onHeartbeatStrip contracts stay. No inherited functional callback is exposed.
write-settlement guard is removed. Provenance is feature/move history, not an
invented claim that a human-reported incident was speculative.
Provenance
WhatsApp wrapper survives through #45725; attachment summary arrived with #131672,
whose actual correctness machinery remains. Telegram ingress clocks trace to
805aaa4 and verbose gate #165330; Slack trace ownership through #45621.
Current normalization from #173688 stays. No Phase E, audit, cron, in-flight
foundation, public SDK or dependency owner is changed.
Evidence
Conflict-repaired base head d09ae11,
parent exactly bb642e1. Rebase was authorized
only after GitHub reported CONFLICTING. Signing/global hooks retained, no bypass;
committed source exactly matches the independently reviewed staged hashes.
Fresh pinned base bb642e1. Exact donor45path
slice applied only as reviewable hunks, not source replacement; fresh functional
drift explicitly preserved. Author simplify/test-audit and private caller closure
completed. Tests remove only retired positive trace metadata/private options, or
replace debug-field formatting checks with actual mention outcomes. Kept send,
payload/privacy, quote, timeout, recovery and group-policy assertions remain.
Two Telegram import-adjacency conflicts preserve main's direct runtime-config
and routing owners from #174256; only obsolete logging imports disappear.
Main's dependency-bag removal, security and session owner calls stay intact.
Passed on the repaired candidate: isolated qualified-primary repository
formatting45files717ms; git diff --check; serial isolated changed-source
assertion syntax scan35files. Its sole proven allowance shrink2→1 is included.
The scan is not a typecheck/full ratchet. Fresh full-base independent direct-provider
P0-P2 review finished scoped-clean/no findings(.95), with final source verification.
Full reviewed hash bfa9c4d533882bee79669fa44620e1c2d8593bf1634eed07e10f846dc522abaa;
pure production 37a250ea56df9c2c66d9f392ff790733e459e897e7f67f31016e930d4c260352.
Not run by preparation worker: runtime tests/types/build/E2E/live/platform or
dependency preparation. No runtime passing claim, test wall time or CI seconds
measured. Lead owns serial isolated focused tests(maxWorkers1), targeted package
proof and hosted CI on the exact submitted head; no retries/skips/timeout raises,
new suppressions or weakened kept-behavior budgets.
Exact-head CI repair
Run38931869249 on d09 completed with six failed leaves, all caused by retired
trace consumers: bundle4-2/117078417498 (Telegram media-summary and WhatsApp
delivery-log assertions; removed group debug logger mock), lint3/117080262097
(unused Slack routing alias and terminal return), lint2/117080262005 (unused
Telegram menu import), typecore5/117079103999 and prodtypes117079104018 (same
unused bindings), and testtypes117079104044 (same removed debug mock). The
aggregate gate117082958860 adds no separate failure. No inherited exception.
Signed repair head5bb9f27ba0b2659189e1ba57d7cfb80a4f39928f removes those
orphans and replaces only obsolete positive log expectations. Actual media/context
dispatch, visible-delivery/finalize, warn-once/account/group/history/guidance and
private-content exclusion assertions stay. No trace logger or testing seam was
restored; no skip, retry, timeout, cast or suppression was added.
Fresh six-file P0-P2 review finished scoped-clean/no findings(.96) with final
source verification. Repair hashda574834d09538758e2bd7f535d9ba98741e4bc0e74d4b46fbaf382b49715aff
is unchanged by normal hooks; formatter six files137ms and diff checks pass.
No local runtime/type pass is claimed. The replacement exact-head CI, not the
prior d09 run or source review, is the gate. One leased repair push; no CI reruns.
The 5bb replacement run38934327570 then exposed two related mock-contract
failures: ratchet117086649814 invalidated the changed closed factory fingerprint;
bundle4-2/117086651665 showed the still-live accounts.ts→bot-message-avatar
dependency on createSubsystemLogger. The earlier characterization of that mock
export as orphaned was incorrect. Aggregate gate117090644407 adds no other
failure; all jobs completed and no failures are waived.
The follow-up preserves real runtime-env exports through importOriginal while
retaining the existing deterministic overrides, then deletes the single obsolete
legacy allowance. This fixes the actual missing export instead of adding an
exception or restoring the retired summary sink. The same-owner one-target AST
scan discriminates old closed factory1→new0; this is not a full ratchet/typecheck.
Qualified isolated formatting39ms and diff checks pass. Fresh independent P0-P2
review completed scoped-clean/no findings(.99), with final source verification.
Signed follow-up head59ccee8b3f preserves the reviewed two-file hash
7c2fb704f14096ef8f0ec0cdd44ee866bb6093457f4014000cd325f89363839b.
Normal hooks passed using the supported existing tooling owner (98ms formatting)
after the default owner failed version qualification; no hooks or dependency
checks were bypassed. Replacement-head CI remains required; no local runtime
pass is claimed.