Repository navigation
refactor: deslop small cross-cutting cleanups - #166427
Conversation
Combine the l422 schema-mirror, l425 derivable-state, l419 async-callback, and l420 SDK-helper cleanups. Preserve runtime behavior and existing public contracts.
Drop the Buzz sleep-helper substitution after its queue test failed on the bundle and passed on clean main. Keep the test unchanged. Regenerate the exact shrink-only Matrix assertion baseline after removing the redundant cast.
|
🦞👀 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: needs maintainer review before merge. Reviewed October 7, 2026, 12:30 AM ET / 04:30 UTC (Revision 3). ClawSweeper reviewWhat this changesThe PR replaces repeated types, parsing helpers, callbacks, and redundant lifecycle values with existing schema and SDK owners across plugins, Gateway services, skills, and the Control UI. Merge readiness✅ Ready for maintainer review Keep open: the cleanup remains useful and distinct from current main, and no actionable introduced defect was found. This maintainer-authored PR is outside automatic cleanup eligibility; failed CI remains subject to the normal landing workflow. Priority: P3 Review scores
Verification
How this fits togetherThese shared contracts and lifecycle helpers connect channel messages, configuration, and UI requests to Gateway execution and delivery. The cleanup consolidates their implementation while preserving existing inputs and outputs. flowchart LR
A[Channel messages] --> C[Shared SDK helpers]
B[Configuration and UI requests] --> D[Protocol schemas]
C --> E[Gateway and lifecycle owners]
D --> E
E --> F[Process execution]
E --> G[Message delivery and session updates]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource -227, Tests -1, Other -1. Total -229 across 59 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Consolidate the repeated implementation around existing schema, SDK, and lifecycle owners while retaining the established public and runtime contracts. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR proposes behavior-preserving cleanup, and source inspection found no concrete introduced failure to reproduce. Is this the best way to solve the issue? Yes: reusing existing schemas and SDK helpers removes competing implementations while preserving the inspected contracts. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against a2330c046e56. LabelsLabel changes: No label changes. Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
|
|
Exact-head CI attribution for CI run 37567186223 tested merge
The failing tests, fixture writer, config watcher, session projection mutation, user-turn recorder, and transcript persistence are unchanged by this PR. The affected history owners are unchanged too. The callback simplifications preserve their existing async/await scheduling, and the changed plugin imports introduce no database owner or configuration subscription. Main's later #166253 changes schema-preparation reuse without removing the retirement/capture mechanism. All ten initially cancelled Full changed checks, touched graph types, focused proof, the SDK API compatibility assessment, Knip, runtime/Madge cycles, and lint-suppression proof are recorded in the PR body. Independent exact-head review and the hosted review found no actionable defects. No tests, timeouts, retries, skips, suppressions, or baselines were weakened. The broader local clean-main replay at Every remaining failure is attributed above. Proceeding with the operator-authorized inherited-failure exception, pinned to this exact head. This is not a claim that hosted CI is green; the two main-owned failure families remain follow-ups for their owners. |
214 upstream commits. On the Feishu side, openclaw#166610 moves the streaming preview queue into a new streaming-update.ts helper, openclaw#166427 replaces a local JSON parse helper in dedupe-key.ts with the SDK's safeParseJson and drops an unused import in monitor.transport.ts, and openclaw#166457 updates fs-safe to 0.24.2 in extensions/feishu/package.json. extensions/feishu/src/reply-dispatcher.ts conflicted only on the imports: openclaw#166610 added queueFeishuStreamingUpdate next to this branch's createFeishuTableRouting import. The merge keeps both. The rest of openclaw#166610 merged on its own, and the streaming path still hands the table- routed text to the new helper. 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: 102 files and 1523 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: deslop small cross-cutting cleanups Combine the l422 schema-mirror, l425 derivable-state, l419 async-callback, and l420 SDK-helper cleanups. Preserve runtime behavior and existing public contracts. * refactor: retain Buzz polling and prune Matrix assertion ratchet Drop the Buzz sleep-helper substitution after its queue test failed on the bundle and passed on clean main. Keep the test unchanged. Regenerate the exact shrink-only Matrix assertion baseline after removing the redundant cast.
What Problem This Solves
Several small cross-cutting cleanups independently repeated schema types, SDK helpers, callback bodies, and values already held by their owning inputs.
User Impact
No intended user-visible behavior change. This bundle keeps the existing protocol, configuration, persistence, public SDK, cancellation, and delivery contracts. It has no visual changes.
Why This Change Was Made
Combines four reviewed cleanup lanes into one PR and one hosted CI head, in this order:
deslop/l422-schema-mirrors-20261006at13f23a458f5a877e8feacea90b4fe18692ed1a7a: derive Gateway, plugin metadata, and Control UI types from existing schemas; move field comments to their owner without changing schemas.deslop/l425-derivable-infra-20261006atc792d24fd189413a40def736d8fcbbb74d18040c(four commits): derive process and worker lifecycle facts, forward existing inputs, and remove unused values in outbound delivery, package updates, secrets, and skills.deslop/l419-gateway-async-20261006atbcdcd44f9f64367ad291335cfd59f24f30c24d0c: simplify async forwarding and share identical pending-operation settlement callbacks.deslop/l420-sdkdupe-channels-20261006ate3d9b28644aa18836d3fa2ce43bce520f378b03c: reuse existing public SDK parsing, normalization, sleep, and bounded-map helpers in bundled plugins.Measured production reduction: 227 net lines removed (217 additions, 444 deletions across 56 production files), excluding tests, test support, fixtures, generated files, and declarations. The bundle has the requested campaign size exemption. Applied against
c3c55eadb1c8dd201b4370e637f22ab8595a5230without conflicts. Dropped the Buzz sleep-helper hunk: the bundled queue test failed while the same full file passed 19/19 on clean main. The test is unchanged. The Matrix assertion-safety baseline was regenerated with its sole now-unused entry removed (7201 to 7200 total).Evidence
c3c55eadb1c8dd201b4370e637f22ab8595a5230(17 pass/1 fail each). Its FIFO hunk is retained. Feishu webhook E2E hit the unchanged import-hook deadline locally twice; clean main passed 20/20. The same frozen bundle then passed all 20 cases on isolated Linux without test or timeout changes. The initial local import timeouts remain recorded; no main-red or code-fix claim is made for them.c3c55eadb1c8→be0748b7c5db; later fixups only restore private Buzz polling and shrink the assertion baseline) completed: no added/removed entrypoints or exports; 150 reachable-declaration changes and three printed signature changes trace to the schema derivations. Exact-optional checks prove all four public aliases retain their old shapes and all nine optional fields reject explicitundefined. Inferred internal implementation declarations widen, while explicit public Gateway/WorkerProvider contracts preserve the aliases; no public widening was found.node scripts/check-changed.mjs --base c3c55eadb1c8dd201b4370e637f22ab8595a5230passed on headc4640e7ada84908f0b64c79f3afd4aa05ab0ce1c, tree00788086872d90be6d5924b21558a53170ff51ca, in 1,055.92 seconds on isolated Linux/Node 24.19.0. This includes core/plugin/UI and selected test-graph types, file lint, all three bounded export scans, guards, and zero runtime cycles. Hosted CI run 37567186223 completed on this exact head with two failing test jobs (small-16 and small-22) and their downstream gates. Both jobs are inherited: unrelated hosted PR runs reproduce the same database-admission fixture failure and the exact chat-history replay assertion; the inspected causal paths are unchanged by this bundle. The four lifecycle failures share the reproduced fixture path, without a separate exact-title replay. The per-job evidence comment records the qualification and the inconclusive local baseline attempts. All ten concurrency-cancelled automation jobs have successful replacement runs; no source changed.No cases, assertions, retries, skips, timeouts, or process boots were added. The changed writer-fence test only supplies its full typed fixture; its existing three cases and all assertions are retained.
Test cost:
pnpm test src/infra/outbound/deliver-transcript.writer-fence.test.ts --maxWorkers=1passed all three existing cases in 29.84s wall on isolated Linux withCI=true; no CI cases or per-test process boots were added.