Repository navigation
refactor(testing): deslop test-only production seams - #165371
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 5, 2026, 7:53 AM ET / 11:53 UTC (Revision 6). ClawSweeper reviewWhat this changesThe branch removes test-only overrides from production code, moves fixtures to existing boundaries, and routes several provider requests through guarded HTTP transport. Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readiness⛔ Blocked before merge - 5 items remain Keep open: the previously reported P1 proxy-routing regression remains in both catalog paths and survives the verified test merge. The cleanup remains useful and is not superseded by the earlier merged batch. Priority: P2 Review scores
Verification
How this fits togetherOpenClaw’s CLI, Gateway, and provider plugins turn configuration and credentials into runtime operations. Provider catalog discovery feeds available models and onboarding’s starter-model selection. flowchart TD
A[Configuration and credentials] --> B[CLI and Gateway]
B --> C[Provider catalog discovery]
C --> D[Guarded HTTP transport]
D --> E{Proxy or direct routing}
E --> F[Provider endpoint]
F --> G[Available models and setup selection]
Before merge
Findings
Agent review detailsSecurityNone. PR surfacePR surface statistics unavailable: the file list is incomplete. Review metricsNone. Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Copy recommended automerge instructionTechnical reviewBest possible solution: Keep the seam cleanup while preserving environment-proxy routing and NO_PROXY bypass through the existing guarded transport contract. Do we have a high-confidence way to reproduce the issue? Yes, from source: configure HTTPS_PROXY, leave OPENCLAW_PROXY_ACTIVE unset, and invoke either catalog on a network requiring the proxy; the new guard selects direct transport. This review did not execute that scenario. Is this the best way to solve the issue? No, as submitted: removing test-only overrides fits the existing owners, but replacing ambient fetch must preserve the supported proxy contract. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 5449de6efa13. LabelsLabel changes: No label changes. Label justifications:
EvidenceAcceptance criteria:
What I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (5 earlier review cycles)
|
|
The Gateway type error in round-two CI is inherited from main. The earlier hourly-main job, at The failing test and startup-observer owner are byte-identical between that main run, the PR's tested merge base, and the tested merge. This PR changes neither. Main now contains e78e965a55e, which supplies both fixture dependencies. The two cancellation-fixture lint failures in round two are attributable to this PR and are being repaired separately. Auto-merge is paused during that repair; the inherited-error qualification does not excuse those failures. |
Remove internal dependency tables, mutable overrides, alternate test paths, and test-only exports. Keep real production injection, authority and lifecycle checks, lazy loading, and documented SDK test helpers. Tests use the existing module, OS, HTTP, clock, and browser owners. No intended user-visible behavior change.
d82a11e to
159ca39
Compare
|
The final pre-push cycle comparison is bound to candidate
The final local plugin-contract invocation also retains an inherited host-hook failure: the admitted-registry session-patch case throws After the final import-only conflict rebase to Hosted pre-existence is now confirmed: hourly-main run 37303621445 / architecture job 111742258843, head |
52 upstream commits. Upstream's X guest helpers (openclaw#165543) change channel schema content without changing any count. In Feishu, openclaw#165371 removes the test-only fetchImpl and lookupFn options from FeishuStreamingSession and app registration, and openclaw#165374 updates fs-safe. This branch's reply-dispatcher already builds the streaming session with three arguments, and none of its Feishu tests used the removed options. Two generated files conflicted, docs/.generated/config-baseline.sha256 and src/config/bundled-channel-config-metadata.generated.ts. Both were regenerated from this merge rather than hand-merged. build:docker ran in a separate detached checkout of this commit. Counts stay core 2505, channel 3874 and plugin 4490. The core and plugin hashes match upstream/main and the channel hash is new, as predicted. The three generated-file checks pass there. Feishu: 101 files and 1520 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(testing): deslop test-only production seams Remove internal dependency tables, mutable overrides, alternate test paths, and test-only exports. Keep real production injection, authority and lifecycle checks, lazy loading, and documented SDK test helpers. Tests use the existing module, OS, HTTP, clock, and browser owners. No intended user-visible behavior change. * fix(testing): preserve production-boundary coverage after seam cleanup * test: exercise dashboard readiness through the fetch boundary * test: align readiness fixtures with native callback types * fix(testing): repair fixture consumers and guarded transports * test(providers): preserve typed cancellation reasons
What Problem This Solves
Production paths still carry dependency tables, alternate branches, mutable setters, and exports that only tests use. This continues the cleanup in #164320.
User Impact
Configuration, persisted data, protocols, CLI help, tool descriptions, and visible UI remain unchanged. Real production dependency injection, authority checks, cleanup ordering, and documented SDK test helpers remain. Provider discovery and OAuth requests now use the existing shared guarded HTTP transport; supported Copilot enterprise origins, deadlines, and caller cancellation are retained.
Why This Change Was Made
Tests now arrange fixtures through the existing module, process, filesystem, HTTP, clock, and browser boundaries. Production calls its actual owners directly.
The conversation-list, Google Meet calendar, and sidebar clock opportunities are excluded because concurrent deslop PRs own those files. No production implementation was moved to another production directory.
Fixes found along the way
Mantle discovery, Chutes OAuth, and Copilot catalog requests now use the shared HTTP guard and release the transport on success, HTTP errors, parse errors, and cancellation. This removes the raw-fetch boundary violations without new configuration, scanner suppressions, or allowlist growth. Tests cover guarded destinations, deadline/caller aborts, cleanup, unchanged delivery traces, and auth-order rollback through the actual persistence owner.
Evidence
Production scope removes 953 net lines (598 added / 1,551 removed), excluding tests, test support, fixtures, documentation, and generated paths. The implemented batch originally removed 1,005; concurrent main changes independently absorbed sixteen lines, and the required shared-transport repairs add 36 production lines.
6b4e887c39a06b7682e9c9b8f8a63979feb2b655reproduces the candidate's 17-file Madge cycle through the state database and startup migration modules. Both command outputs are byte-identical, and this PR changes none of those cycle participants.scripts/check-import-cycles.tsreports zero runtime value cycles on both. The clean-base runtime-API inventory passes all seven cases. Earlier mainfe493b83337passes both cycle checks and the inventory; the newer startup optimization in perf(gateway): reuse admitted state during process bootstrap #165498 is incorporated in this base. Earlier terminal-outcome, skill-refresh, and runtime-API inventory failures were fixed upstream.fec07ec0fb3f61fe84370cf6c2b1eafc94aef4c2also passed all 1,140 plugin contracts after the last baseline-only rebase.Round-one CI failures were repaired together: missed test consumers, native/module mock typing, lint, and guarded provider transport. The transport/fixture repair passes 269 focused tests in 188.77 seconds, the extension test type graph, the raw-fetch guard, and all 1,140 plugin contracts on Linux. The final cancellation-fixture correction passes 91 focused tests in 33.21 seconds, typed lint with zero warnings/errors, and the unchanged line cap. Its independent review is clean. Round-two Gateway fixture typing was independently reproduced on hourly main and fixed upstream in e78e965; evidence.
Final Google Meet conflict integration passes all 145 tests across six files (679.62 seconds summed Vitest duration on the overloaded Mac). The subsequent conflict-only rebase preserves that implementation; its only manual resolution keeps lower assertion-baseline counts. Independent review of the complete integration is scoped-clean. Remote reacquisition did not produce usable compute within ten minutes, so these final commands ran serially at
nice -n 15. The optional targeted lint invocation could not reach lint because its SDK declaration prerequisite timed out after 300 seconds; exact-head hosted CI remains the lint/type gate.The final local plugin-contract run completed with 1,138 passed, one failed, and one skipped across 48 files (2,087.36 seconds). The host-hook admitted-registry session-patch failure reproduces identically on clean exact base
6b4e887c39a: the unchanged fixture crosses the owner's existing five-second retirement deadline under host load, then reportsPlugin scoped-owner was reloaded or disabled. The full clean-base host-hook file has 51 passes and that same failure. This is retained as an inherited local failure, with no assertion or deadline change. The other failure was a 180-second setup timeout in the deprecated-config scanner; clean base passes the complete file in 75.91 seconds, and latest hourly-main CI also passes it. A passing replay is not claimed as a fix for the timing failure.Final published candidate
159ca39d194d7f9e9a7393a82cf8c777457f0c32incorporates only import conflicts with newer upstream test cleanup on base906eb2d2a9648b4e12bda61c7285d4f05fc5e1f5. Chrome MCP/cleanup and Google Meet integration pass all 140 cases in 216.56 seconds. Both cycle checks were rerun: zero runtime value cycles; Madge output remains byte-identical to the clean-main reproduction above. The conflict delta received independent narrow review with no findings, preserving the broader scoped-clean review. The focused candidate deprecated-config guard also passes (133.02 seconds); its earlier full-suite setup timeout remains recorded, not represented as a fixed defect.Third hosted CI on exact head
159ca39d194d7f9e9a7393a82cf8c777457f0c32completed: 76 jobs passed, 21 skipped, none cancelled. The sole root failure is check-guards / Madge; the CI gate fails downstream. Independent hourly-main architecture job, head78e406060b56bac2d09810161ac7b483861e9879, reports the identical ordered 17-file cycle at 11:35:55 UTC, before the PR's 11:54:18 failure. Both runtime-value checks report zero. None of the 17 cycle participants is changed by this PR. This qualifies the maintainer-authorized inherited-failure squash merge; no PR-caused test, type, lint, dependency, or security failure is waived.