Repository navigation
refactor: deslop provider and Discord leftovers - #167917
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: needs maintainer review before merge. What this changesThis PR consolidates repeated provider, Discord, Policy, and Workboard logic at existing owners without intending to change user behavior. Review scores
ProductKind: Refactor · Worth it: Yes Merge readiness✅ Ready for maintainer review Keep open: this owner-directed cleanup remains distinct from current main, and the reviewed changes reveal no concrete introduced defect. Exact-head checks are still pending. Priority: P3 Before mergeNone. FindingsNone. Provenance
Tests
Agent review detailsHow this fits togetherProvider plugins turn model requests into streamed responses, while Discord handles channel messages and interactions. Policy produces configuration diagnostics, and Workboard stores cards and presents board actions in the browser. flowchart TD
A[Model requests] --> B[Provider routing and streams]
B --> C[Model responses]
D[Discord events] --> E[Channel authorization and delivery]
E --> F[Chat replies and interactions]
G[Configuration and approval rules] --> E
G --> H[Policy diagnostics and Workboard actions]
Technical reviewBest possible solution: Keep the consolidation at existing owners while preserving public contracts, authorization, and stored formats. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR proposes behavior-preserving consolidation rather than a reported user-facing defect. Is this the best way to solve the issue? Yes: the reviewed changes remove private indirection and consolidate repeated logic without introducing a competing owner or new configuration surface. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 590a0257d137. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfacePR surface statistics unavailable: the file list is incomplete. LabelsLabel changes: No label 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 HistoryReview history (1 earlier review cycle)
Reviewed October 9, 2026, 3:18 PM ET / 19:18 UTC (Revision 2). |
|
Pinned landing evidence for reviewed head The exhaustive
Independent main run The owned OpenGrep findings were corrected by restoring two explicit Discord The trusted Security Review publisher completed successfully for this exact PR/head. Local changed checks, types, focused tests, lint, cycles, sequential Knip, and SDK API comparison are complete. Full-diff and repair reviews have no actionable P0–P2 findings. Merge-tree verification against the recorded current main is conflict-free. Landing will use a squash pinned to the reviewed head under the inherited-main-failure exception. |
Refresh the immutable JS and CSS generation pointers after the browser refactor in #167917. Generated on Linux with pnpm plugins:assets:build and the frozen dependency lockfile.
Pin the consolidated declarations from #167917. All 170 exported symbols, source modules, and type-only classifications are preserved; only the declaration count shrank from 27 to 25.
* refactor: deslop provider and Discord leftovers * fix(discord): retain explicit component group policy
Refresh the immutable JS and CSS generation pointers after the browser refactor in openclaw#167917. Generated on Linux with pnpm plugins:assets:build and the frozen dependency lockfile.
Pin the consolidated declarations from openclaw#167917. All 170 exported symbols, source modules, and type-only classifications are preserved; only the declaration count shrank from 27 to 25.
What Problem This Solves
Provider, Policy, Workboard, and Discord implementations retain duplicate routing, normalization, and action-handling paths after earlier cleanup passes.
User Impact
There is no intended user-visible change. Provider selection, streaming, approval authority, Discord permissions, thread bindings, and Workboard data/actions retain their behavior. Configuration, schemas, protocols, dependencies, and the public SDK remain unchanged.
Why This Change Was Made
Consolidate the remaining duplicate paths at their existing owners and remove private facades and redundant types. The Discord third pass (
f2d4253df4b) was applied before the provider third pass (96e4a359eaf).The landed change removes 871 net production lines across 166 files (+1,791/−2,662), excluding tests, test support, and the shrink-only assertion baseline. Overall reduction is 853 lines across 174 files.
Application was conflict-free. Two removal hunks were dropped to retain explicit
groupPolicyforwarding required by the existing Discord component security regression guard; there were no conflict-related drops. Knip also identified a leftover Policy export after its consumers moved into the same module; that constant is now private.Evidence
Merged as
bd1a35b7114fcd4abf3d3f5100d69e264e8ece06from reviewed head22ca73d7fa9ddbd5444dc5741a506454b4709a50. The squash is verified onorigin/main, and its tree exactly matches the reviewed head merged into its actual landed parent.check:changedstage completed successfully, including all 27 core test-type groups, extension production/test types, ratchets, formatting, plugin boundaries, Knip, core/extension/script lint, and architecture/storage/media/pairing guards. Extension lint completed in 309.30 s, including its previously stalled declaration prerequisite.ff7b090f; both input-integrity seals passed. The subsequent repair restores two private call-site properties and changes no imports or public signatures.Hosted CI and inherited-main exception
Final-head CI completed 94 jobs: 68 successful, 22 configured skips, and the four failures below. The exhaustive head census contained 148 terminal check runs; there were no cancelled or missing pending checks at admission. Dependency and security-sensitive review passed. All four zero-step cancelled automation jobs on the initial head were rerun serially to success.
The pinned admin squash used the posted per-job evidence:
chat-session-prefetch-gating.e2e.test.ts:73, background history count 0 instead of 1. Same failure in independent main job.chat-flow.history-recovery.e2e.test.ts:348, timeout waiting for session B history. Same failure in independent main job.session-prefetch.e2e.test.ts:51, background history count 0 instead of 1. Same failure in independent main job.openclaw/ci-gatecommit status mirrors this result.Main's
b0fb3ac3321(#167906) intentionally requires pointer or keyboard intent before warming unopened sessions; these three E2E tests still expect automatic prefetch. Their owner and test files are byte-identical on independently failing main9ef071e98e2f53e18deddfdb629d76f84eca19dfand the actual landed parente19bcd6bd11e9c24608aadcc9cfc4b9b670351bd. This bundle changes none of those UI/harness paths, and the mocked Gateway failures occur before provider, Discord, or Workboard actions. Updating those three stale UI expectations remains a separate follow-up.Existing local OpenAI timing failures
The two full test files reproduced the same six failures on the candidate and clean main
22e485657b286b6a740eb7083c8c70063c813374: two oversized-error cases returned the fixture'sAbortError, and four ordinary/telephony speech headers/body cases exceeded their existing 2-second limits. Both runs passed the other 35 tests. No timeout or assertion changed. The touched realtime wire cases were not used for an inherited-red waiver; final hosted failures were confined to the unrelated UI tests above.