Repository navigation
refactor(channels): deslop channels - #166106
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. |
Channel production coverage (1/3)Baseline: 2030657. All 636 listed production files over 200 lines were read in full. Tests, support, docs, and generated files are excluded. Rows are sorted largest first across the three parts.
|
Channel production coverage (2/3)Baseline: 2030657. All 636 listed production files over 200 lines were read in full. Tests, support, docs, and generated files are excluded. Rows are sorted largest first across the three parts.
|
Channel production coverage (3/3)Baseline: 2030657. All 636 listed production files over 200 lines were read in full. Tests, support, docs, and generated files are excluded. Rows are sorted largest first across the three parts.
|
Reuse canonical normalization and delivery facts, remove redundant forwarding and error layers, and delete narrating comments while preserving protocol, lifecycle and authority contracts. Full production coverage for lane l406 is recorded with the PR.
b20838b to
dca5c00
Compare
105 upstream commits. openclaw#166106 deletes narrating comments and simplifies small helpers across the channel plugins, including 39 Feishu files. openclaw#166189 updates fs-safe to 0.24.1, which only touches extensions/feishu/package.json on the Feishu side. extensions/feishu/src/outbound.ts conflicted. openclaw#166106 reworded the local image path comment inside the inline sendText handler, and this branch moved that handler into deliverFeishuOutboundText. The merge keeps the branch's handler and carries the new comment wording into it. The other files both sides touch (channel.ts, config-schema.ts, markdown.ts, reply-dispatcher.ts) took openclaw#166106's edits automatically. Those edits remove comments and simplify expressions without changing behavior. No upstream change touches a config schema, so the generated files were regenerated from this merge and came out identical to the previous branch head. build:docker ran in a separate detached checkout of this commit. Counts are core 2494, channel 3876 and plugin 4524. The core and plugin hashes match upstream/main. The generated metadata differs from upstream/main only by the two Feishu markdown.tables entries. The three generated-file checks pass there. Feishu: 101 files and 1521 tests in the extension project, 17 files and 218 tests in the database-workers project, all passing. The forwarder test and the routing guards pass, 503 tests. tsgo:core, tsgo:extensions, tsgo:extensions:test, tsgo:test:root, the line-cap, max-lines, assertion-safety, database-worker, test-timeout-race and test-mock- exports ratchets against upstream/main, oxlint and oxfmt on the 43 changed code files all pass.
* refactor(channels): deslop channels Reuse canonical normalization and delivery facts, remove redundant forwarding and error layers, and delete narrating comments while preserving protocol, lifecycle and authority contracts. Full production coverage for lane l406 is recorded with the PR. * refactor(channels): finish small-module deslop sweep * refactor(channels): preserve async snapshots and tighten fixtures * refactor(channels): finish owner and normalization cleanup * test(zalo): await polling image processing before assertions * refactor(channels): finish owner cleanup and repair lane checks
What problem this solves
Channel plugins repeat normalization after canonical owners, carry unnecessary forwarding layers, and retain comments that restate their code. This batch removes 1,010 net production lines (tests, fixtures, support, documentation, and generated files excluded).
What changed
Config keys, persisted data, wire payloads, model-facing descriptions, error text, and visible behavior remain unchanged. No dependency or public SDK additions.
Fixes found along the way
The original head incorrectly passed absent WhatsApp media through a generic string normalizer, creating the URL
"undefined". This recovery restores the canonical media resolver. The 16 existing failed cases cover the regression across ordinary sends, auto-replies, payload formatting, and delivery recovery.Three Zalo image fixtures raced database-worker startup. They now await the next-poll completion signal, which follows settled processing, while retaining the original assertions and cleanup. The conflict-only rebase preserves those completion gates instead of adopting main's longer polling waits. Zalo delivery-helper and Twitch formatting assertions now exercise their existing monitor/send boundaries; no regression coverage was dropped. Matrix has two additional escape-shaped account-name cases.
Evidence
Fresh Blacksmith Testbox validation passed on the recovery candidate: 587 focused tests across 26 files (256.72 seconds), production and test extension typechecks, the mock-export baseline owner, the suppression check, and 1,140 plugin-contract tests across 48 files (211.88 seconds). Candidate runtime and Madge cycle checks both report zero. Clean main
3b6b191fab7e637368e7606f1c5b18723f7f4a79also reports zero runtime and Madge cycles, so the candidate adds no cycle component. Independent review found no actionable P0–P2 findings. The full changed-file gate passed, including extension/script lint, all three Knip export scans, typechecks, ratchets, plugin boundaries, and runtime-cycle checks. The three repaired Zalo cases each passed 20 Linux executions (60 executions total; 52.68 seconds). No retries, timeout increases, or source-level skips were added. Hosted CI run 37553483673 passed on exact headdca5c00729fe770cb909748ba4d50559dabf2131, including the aggregate gate. The old head's failures were all PR-owned: WhatsApp media regression, two extension-lint stripes, the stale Teams mock-export baseline, and the aggregate gate. The recovery repairs each cause and removes the obsolete baseline row. The changed-file gate also identified two assertion-safety counts that could shrink after cast removal; both exact reductions are committed and the gate subsequently passed. The old run had no cancelled proof jobs; its cancelled jobs were comment automation.The original coverage sweep read all 636 production files over 200 lines. Coverage: part 1, part 2, part 3.
Remote proof used Blacksmith Testbox
tbx_01m49mn620eh7t2nazhv5zf1n9. Its session ended with exit 255 after the completed changed-file and repetition checks, while installing dependencies for an auxiliary clean-main comparison. A replacement lease completed before receiving that comparison; only the missing main cycle comparison uses the authorized low-priority local fallback. No failed or interrupted command is counted as a passing whole run.Signed candidate:
dca5c00729fe770cb909748ba4d50559dabf2131; its Git tree exactly matches the remote tree validated by the final changed-file gate. Both freshly fetched main and the newer local main reference merge cleanly with this candidate; no additional rebase is needed.All task-owned Testbox leases are stopped. The isolated local main comparison completed successfully at
nice -n 15and its temporary worktree was removed.