Repository navigation
refactor(types): deslop UI, package, and plugin contracts - #165804
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 October 6, 2026, 1:07 AM ET / 05:07 UTC (Revision 5). ClawSweeper reviewWhat this changesThe branch derives private UI, package, and plugin types from existing producers, removes redundant checks, and routes Copilot auth tests through the existing isolated database-worker project. Merge readiness⛔ Blocked before merge - 2 items remain Keep open: the cleanup remains useful and is not already implemented on current main. No actionable introduced defect was found; the previous compatibility warning is unsupported by the changed contracts. Likely related people: steipete, qingminglong, and vincentkoc are routing candidates. Priority: P3 Review scores
Verification
How this fits togetherThese contracts connect provider responses, plugin operations, and Gateway state to their consumers, including the Control UI. Deriving private types from their owners reduces duplicate definitions while preserving runtime outputs. flowchart LR
A[Provider responses] --> C[Parsers and runtime owners]
B[Gateway and plugin state] --> C
C --> D[Derived private contracts]
D --> E[Package and plugin consumers]
D --> F[Control UI]
E --> G[Existing runtime outputs]
Before merge
Agent review detailsSecurityNone. PR surfacePR surface statistics unavailable: the file list is incomplete. Review metricsNone. Stored data modelPersistent data-model change detected: Technical reviewBest possible solution: Keep private contracts derived from their authoritative producers while preserving published APIs, runtime validation, and existing persisted bytes. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR primarily removes duplicate private type definitions, and source inspection found no introduced failure to reproduce. Is this the best way to solve the issue? Yes: deriving private contracts from existing owners is a focused way to prevent drift, and the inspected runtime edits preserve already-validated behavior. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 2983dfcfb319. 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
HistoryReview history (4 earlier review cycles)
|
7c04bfc to
64dc19f
Compare
Derive private parser, projection and factory results from their existing owners. Preserve wire, config, persistence and rendered behavior while removing redundant checks on admitted internal values.
64dc19f to
61cf595
Compare
…65804) ## What Problem This Solves Private UI, package, and plugin types repeat contracts already owned by parsers, factories, schemas, and runtime APIs, creating extra definitions that can drift apart. ## User Impact No intended user-visible change. Configuration, persisted data, wire payloads, tool descriptions, plugin manifests, and rendered UI are preserved. No migration is needed. ## Why This Change Was Made This accumulated cleanup removes **1,193 net production lines** (476 added / 1,669 removed across 128 production files), excluding tests, fixtures, documentation, generated files, and the shrink-only size baseline. No code moved outside the monorepo. - Derive UI controller, parser, navigation, and projection types from their owners. Preserve receiver-free callbacks and leaf contracts needed to avoid cycles. - Reuse AI stream-function signatures and infer private transport, scanner, truncation, and summarization results. Derive Markdown format keys from the capability table. Retain the published streaming-helper types. - Derive provider catalog, OAuth parser, realtime factory, and embedding-client types, while retaining the allocation-friendly Ollama projection. - Derive memory/REM/wiki reports and import results from their producers. Remove the unavailable-Intl fallback for the supported Node runtime. - Carry Policy's admitted finding and deny-rule types through consumers instead of rechecking states excluded by validation. - Reuse meeting, Diff, ONNX worker, Logbook, and migration-parser contracts; infer private QA lifecycle, scenario, parity, and transcript results. Preserve intentionally partial Google Meet and Beam contracts. - Reuse device-pair and Canvas runtime contracts, infer filesystem error classifications, and inline the single-use notification-key serialization helper with unchanged key bytes. - Keep Firecrawl wire and SSRF validation at their boundaries; reuse the parsed URL and normalized scrape result. Derive private voice-call command, TTS, exposure, and replay types. Remove two exports made unnecessary by inference and one obsolete max-lines suppression; shrink its baseline entry. Two existing Firecrawl assertions now check that the fresh response omits `cached`, and the Slack scenario test derives its input type from the existing `buildRun` contract. Assertions and behavior coverage are retained; no tests, suppressions, dependencies, manifests, or configuration keys were added. ## Fixes found along the way GitHub Copilot's onboarding tests still used Vitest threads after auth-profile writes moved behind the application-main-thread database owner. Route the existing suite through the existing isolated fork project. All 57 cases and their assertions remain unchanged; the native selector still runs the suite once. The QA routing and awaited-cleanup fixes from main (`6ee87b63457`) are included through the rebase. ## Evidence The final branch is based on `62d077729fa637b0358fb92d429252cb8130945b`, including the SIGKILL replay fix `930b86b8fb3` and the subsequent QA fixture repair. Both rebases were conflict-free; the final rebase preserved all eight existing commits as identical patches. Independent Codex review of the batch, portable Slack declaration correction, and test routing found no actionable P0–P2 issues. On final head `61cf595fd78cf5890e875a7bd7fb43326ba5c7c7`, isolated Linux proof passed core/UI/extension production types, extension test types, affected QA/Copilot tests and routing checks, lint, Knip, plugin contracts, and `test/scripts/lint-suppressions.test.ts`. Runtime import cycles: **0**. Madge cycles: **0**. Earlier focused package, provider, memory, policy, tool, and UI suites remain valid for the patch-identical production changes. A clean native `qaRuntime` build completed, its recorded commit was verified, and `extensions/qa-lab/src/gateway-kill-restart-send.e2e.test.ts` passed **three consecutive times** through the supported prebuilt-runtime route. Complete replay invocations took **94.88, 97.64, and 95.95 seconds**. The final-head hosted replay also passed in [job 112116749298](https://github.com/openclaw/openclaw/actions/runs/37416526063/job/112116749298): the SIGKILL case took 31.77 seconds, with the file completing successfully in 38.57 seconds. Matched-metadata base/head UI builds both produced **33,985,648 raw JavaScript bytes and 1,349,539 CSS bytes: delta 0 bytes**. Gzip totals also matched: 9,467,801 JavaScript and 239,607 CSS bytes. The UI changes erase to unchanged JavaScript; no executable rendering code changed. SDK comparison found no added/removed entrypoints, export-name changes, or top-level signature changes. Reachable declaration differences come from deriving private types. The Slack factory retains its explicit portable contract, and its declaration build passed. Configuration, manifests, wire data, persisted shapes, and tool descriptions remain unchanged. The changed Firecrawl assertions remain in the existing 59-case suite (9 seconds wall time); its 26-case parser suite also passed. The existing Slack scenario suite passed in 28 seconds wall time, predominantly compilation. No cases, waits, retries, thresholds, or fixture work were added to those tests. Infrastructure observations are retained separately from passing proof: two earlier Mac runs passed and two timed out before the initial Gateway listener; a Linux worker build exhausted temporary-filesystem quota before running any case. A later QA build declined success because a child process group outlived its leader; its owner completed cleanup, and a clean rebuild plus the three replay passes above followed. No test or production guard was weakened to obtain these results. The earlier hosted round found the same production dependency advisory and Doctor fixture type errors as contemporaneous main CI. It also exposed the QA auth routing/lifetime issues now fixed on main and the Copilot routing issue corrected here. The complete paginated final-head inventory contains **154 terminal checks: 107 successful, 46 skipped, one neutral, and zero failures**. [CI run 37416526063](https://github.com/openclaw/openclaw/actions/runs/37416526063) completed successfully on `61cf595fd78cf5890e875a7bd7fb43326ba5c7c7`; the CI, dependency-review, and security-sensitive-review status gates all passed. No inherited-failure exception is needed.
What Problem This Solves
Private UI, package, and plugin types repeat contracts already owned by parsers, factories, schemas, and runtime APIs, creating extra definitions that can drift apart.
User Impact
No intended user-visible change. Configuration, persisted data, wire payloads, tool descriptions, plugin manifests, and rendered UI are preserved. No migration is needed.
Why This Change Was Made
This accumulated cleanup removes 1,193 net production lines (476 added / 1,669 removed across 128 production files), excluding tests, fixtures, documentation, generated files, and the shrink-only size baseline. No code moved outside the monorepo.
Remove two exports made unnecessary by inference and one obsolete max-lines suppression; shrink its baseline entry. Two existing Firecrawl assertions now check that the fresh response omits
cached, and the Slack scenario test derives its input type from the existingbuildRuncontract. Assertions and behavior coverage are retained; no tests, suppressions, dependencies, manifests, or configuration keys were added.Fixes found along the way
GitHub Copilot's onboarding tests still used Vitest threads after auth-profile writes moved behind the application-main-thread database owner. Route the existing suite through the existing isolated fork project. All 57 cases and their assertions remain unchanged; the native selector still runs the suite once. The QA routing and awaited-cleanup fixes from main (
ad99343036f) are included through the rebase.Evidence
The final branch is based on
70d7e3cf90ebe1d8b1eb4f6609d7606685677990, including the SIGKILL replay fix8e3c6beb8f6and the subsequent QA fixture repair. Both rebases were conflict-free; the final rebase preserved all eight existing commits as identical patches. Independent Codex review of the batch, portable Slack declaration correction, and test routing found no actionable P0–P2 issues.On final head
61cf595fd78cf5890e875a7bd7fb43326ba5c7c7, isolated Linux proof passed core/UI/extension production types, extension test types, affected QA/Copilot tests and routing checks, lint, Knip, plugin contracts, andtest/scripts/lint-suppressions.test.ts. Runtime import cycles: 0. Madge cycles: 0. Earlier focused package, provider, memory, policy, tool, and UI suites remain valid for the patch-identical production changes.A clean native
qaRuntimebuild completed, its recorded commit was verified, andextensions/qa-lab/src/gateway-kill-restart-send.e2e.test.tspassed three consecutive times through the supported prebuilt-runtime route. Complete replay invocations took 94.88, 97.64, and 95.95 seconds. The final-head hosted replay also passed in job 112116749298: the SIGKILL case took 31.77 seconds, with the file completing successfully in 38.57 seconds.Matched-metadata base/head UI builds both produced 33,985,648 raw JavaScript bytes and 1,349,539 CSS bytes: delta 0 bytes. Gzip totals also matched: 9,467,801 JavaScript and 239,607 CSS bytes. The UI changes erase to unchanged JavaScript; no executable rendering code changed.
SDK comparison found no added/removed entrypoints, export-name changes, or top-level signature changes. Reachable declaration differences come from deriving private types. The Slack factory retains its explicit portable contract, and its declaration build passed. Configuration, manifests, wire data, persisted shapes, and tool descriptions remain unchanged.
The changed Firecrawl assertions remain in the existing 59-case suite (9 seconds wall time); its 26-case parser suite also passed. The existing Slack scenario suite passed in 28 seconds wall time, predominantly compilation. No cases, waits, retries, thresholds, or fixture work were added to those tests.
Infrastructure observations are retained separately from passing proof: two earlier Mac runs passed and two timed out before the initial Gateway listener; a Linux worker build exhausted temporary-filesystem quota before running any case. A later QA build declined success because a child process group outlived its leader; its owner completed cleanup, and a clean rebuild plus the three replay passes above followed. No test or production guard was weakened to obtain these results.
The earlier hosted round found the same production dependency advisory and Doctor fixture type errors as contemporaneous main CI. It also exposed the QA auth routing/lifetime issues now fixed on main and the Copilot routing issue corrected here. The complete paginated final-head inventory contains 154 terminal checks: 107 successful, 46 skipped, one neutral, and zero failures. CI run 37416526063 completed successfully on
61cf595fd78cf5890e875a7bd7fb43326ba5c7c7; the CI, dependency-review, and security-sensitive-review status gates all passed. No inherited-failure exception is needed.