Repository navigation
refactor: deslop UI, MCP and config fixtures - #184815
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 SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex review: needs maintainer review before merge. What this changesThis PR replaces repeated test inputs and promise scaffolding with shared fixture helpers while preserving existing scenarios and assertions. Example: A collaborator browser connects through a test proxy as 192.0.2.11.
Review scores
ProductKind: Test only · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this maintainer-authored PR provides useful fixture consolidation without an identified regression; exact-head CI is still running. Priority: P3 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherTest suites construct synthetic configuration, registries, identities, proxy routes, and asynchronous gates, then exercise existing production owners and assert their results. flowchart LR
A[Test scenarios] --> B[Shared fixture helpers]
B --> C[Fresh configuration and identities]
B --> D[Proxy routes and promise gates]
C --> E[Existing production owners]
D --> E
E --> F[Unchanged assertions]
Technical reviewBest possible solution: Retain the focused fixture consolidation and complete the existing exact-head CI gates before landing. Do we have a high-confidence way to reproduce the issue? There is no reported runtime bug to reproduce; source inspection confirms repeated fixture inputs are replaced with equivalent constructors. Is this the best way to solve the issue? The change uses existing fixture owners wherever they fit, adds one small shared visitor-access fixture, and preserves independent expectations and lifecycle boundaries. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against c152c5976b21. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceTests -126. Total -126 across 32 files. Added test files: 1. View PR surface stats
Review metrics
LabelsLabel 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 Reviewed October 26, 2026, 1:06 PM ET / 17:06 UTC. |
Exact-head landing-tool recoveryReviewed head: Fresh complete check-run accounting: 220 checks, zero failures, zero pending. All 8 cancelled duplicate/advisory checks have an executed successful check with the same name on this exact head. CI 40362774116 completed successfully; all 84 jobs are accounted, with no successful zero-step job accepted as proof.
Current dependency review, security-sensitive review and CI-gate commit statuses are all successful. No change-requested review is present. Native review and preparation are complete; independent isolated P0–P2 review was scoped-clean. Local proof remains942passing/0failing/0skips plus16narrow compiler groups; hosted CI supplies Gateway/UI proof. Using the standing maintainer-authorized rule10 exact-SHA squash route after two confirmed landing-tool failures. This bypasses the broken watcher, not an unsuccessful security or test decision. |
What Problem This Solves
Repeated fixture literals, provider/registry construction and hand-held promises obscure independent scenarios. These thirteen self-contained cuts consolidate setup on fitting owners, with no deleted or merged assertion, case, registration or table.
126 net test/support lines removed across 32 paths; production net 0. Authorized 100+ residue under the campaign floor waiver, NOT LARGE. No config, schema, protocol, dependency or public API change. Broader finite inventory reconciliation remains open.
UI text, collaborator proxy and cold account inputs
Reuse existing text-content and cold-plugin config owners; collaborator proxy creation delegates to the existing Vite proxy owner with explicit per-person forwardedFor.
Best-effort tradeoffs accepted: One helper frame replaces each literal or constructor. Fresh content/config objects, real proxy headers and create → array-registration → listen order stay unchanged. The proxy default remains identical for existing callers. Three recent campaign-owned UI paths are wholly excluded.
Net 29 test/support lines. Broad expect calls 586 → 586; custom assertions 36 → 36; callback registrations 23 → 23; tables 3 → 3; hoists 0 → 0.
MCP registries and OAuth render gate
Reuse the existing registry factory and native deferred owner.
Best-effort tradeoffs accepted: Registry calls still create a fresh runtime placeholder/logger and disable global effects. OAuth rendering still resolves its original gate before manual input. No guard or scenario removed; only private constructor/stack frames change.
Net 7 test/support lines. Broad expect calls 57 → 57; custom assertions 0 → 0; callback registrations 11 → 11; tables 0 → 0; hoists 1 → 1.
Empty setup registries
Reuse the existing empty setup-registry factory in selection and status tests.
Best-effort tradeoffs accepted: All five arrays are fresh on each resolver call. Existing auth-route changes from main are retained. No production registry or selection policy changes.
Net 10 test/support lines. Broad expect calls 418 → 418; custom assertions 5 → 5; callback registrations 71 → 71; tables 11 → 11; hoists 7 → 7.
Plugin approval input
Reuse the same-file plugin replay request builder.
Best-effort tradeoffs accepted: Exact ID, request text and timestamps remain. A fresh request is constructed at its original call site; the independent delivery/resolution scenario and assertions remain.
Net 8 test/support lines. Broad expect calls 118 → 118; custom assertions 7 → 7; callback registrations 20 → 20; tables 1 → 1; hoists 6 → 6.
Visitor-access config
Share the identical plugin-only config block across three suites on one narrow type-only support leaf.
Best-effort tradeoffs accepted: Every invocation creates fresh arrays and nested objects with the original explicit synthetic account/app/token arguments. Existing memory:none is only disabled fixture input, not a session-memory implementation change. A new 13-line helper replaces three literal copies; no persisted shape or authority logic changes.
Net 15 test/support lines. Broad expect calls 146 → 146; custom assertions 8 → 8; callback registrations 12 → 12; tables 0 → 0; hoists 0 → 0.
Speech directive policies
The existing speech-policy fixture takes an explicit allowed boolean; all three prior enabled callers pass true and the summary caller passes false.
Best-effort tradeoffs accepted: Every policy flag retains its original value and each call returns a fresh object. The old private helper name is removed with a complete caller migration; no compatibility alias or production API is added.
Net 8 test/support lines. Broad expect calls 70 → 70; custom assertions 0 → 0; callback registrations 24 → 24; tables 7 → 7; hoists 1 → 1.
Gateway empty metadata owners
Reuse the existing empty owner-map factory through one async vi.hoisted import before the existing synchronous metadata snapshot hoist.
Best-effort tradeoffs accepted: Fresh maps/arrays and the snapshot callback timing remain; fixture module evaluation adds one awaited hoisted import. Its only runtime dependency is a pure index-fixture declaration. No registry, plugin reload or Gateway contract changes.
Net 8 test/support lines. Broad expect calls 160 → 160; custom assertions 0 → 0; callback registrations 22 → 22; tables 3 → 3; hoists 15 → 16.
Secret-reference input
Reuse the same-file envTokenRef literal builder.
Best-effort tradeoffs accepted: The existing synthetic variable name and source/provider/id values stay exact; no credential reads or secret-resolution policy changes.
Net 4 test/support lines. Broad expect calls 99 → 99; custom assertions 0 → 0; callback registrations 17 → 17; tables 4 → 4; hoists 0 → 0.
Scheduled-task spawn results
Reuse the existing local spawnSyncResult inside the mock implementation.
Best-effort tradeoffs accepted: Invocation stays lazy, not during vi.hoisted construction. Each call retains fresh output/result values and the original status, stdout, stderr, PID and signal; a transient default output allocation is accepted.
Net 7 test/support lines. Broad expect calls 6 → 6; custom assertions 0 → 0; callback registrations 0 → 0; tables 0 → 0; hoists 7 → 7.
Parent identity and passive provider models
Use an existing custody support owner for the repeated parent identity and an existing model fixture owner for two passive provider configs.
Best-effort tradeoffs accepted: Run/session identity arguments, custody scopes, awaits and parent refs remain exact; model URLs remain explicit and every provider/model array is fresh. No API key or fallback is added. The unrelated 2-net new-backend-export proposal was rejected for API cost.
Net 13 test/support lines. Broad expect calls 278 → 278; custom assertions 21 → 21; callback registrations 24 → 24; tables 7 → 7; hoists 2 → 2.
Pinned image-provider input
Reuse the existing provider config fixture only in the original pinned branch.
Best-effort tradeoffs accepted: The same OpenAI base URL, credential reference and empty model list are constructed freshly; unpinned inputs remain empty. Upstream pruning is retained. No provider/auth behavior changes.
Net 11 test/support lines. Broad expect calls 8 → 8; custom assertions 0 → 0; callback registrations 3 → 3; tables 1 → 1; hoists 0 → 0.
MCP fixture start gate
Delegate the existing waitForStart race to awaitGateBeforeSettlement.
Best-effort tradeoffs accepted: Gate-first race, early rejection, exact early-success error and original async await remain. Actual callers use native promises, so the canonical Promise.resolve adds no foreign-thenable timing contract. No timeout/cancellation/lifecycle guard changes.
Net 4 test/support lines. Broad expect calls 0 → 0; custom assertions 0 → 0; callback registrations 0 → 0; tables 0 → 0; hoists 0 → 0.
Dashboard held document
Reuse the existing native deferred helper for the document route gate.
Best-effort tradeoffs accepted: Fresh promise/resolver, await placement and finally release remain identical. The default void type argument is inferred after a lint-only correction; no browser behavior changes.
Net 2 test/support lines. Broad expect calls 120 → 120; custom assertions 2 → 2; callback registrations 9 → 9; tables 0 → 0; hoists 0 → 0.
Best-effort tradeoffs accepted
Per-cut loading/construction/stack-frame tradeoffs are named above. No production guard, security/authorization boundary, common-path durability, realistic concurrency or feature is removed. The PhaseE standalone session-memory backend/factory/registry/expiry/federation and actual tests remain untouched. No performance win is claimed.
Evidence
Changed-source before → after: direct expect880→880, broad expect2066→2066, custom assertion calls79→79, callback registrations236→236, tables37→37, hooks24→24, mocks53→53, hoists39→40. Counts overlap and are declarations, not expanded runtime cases. The extra hoist imports the existing pure metadata fixture. Native per-file census and exact assertion-call text digests match. Every distinct scenario/registration/input position and per-call freshness remains; no timeout/retry/skip/suppression/baseline weakened.
Focused canonical Vitest, serial nice10/maxWorkers1 and isolated HOME/OpenClaw/XDG:
942 passing, 0 failing, 0 unchanged skips. Sixteen narrow compiler groups plus format, typed lint, mock-export completeness, timeout ratchet, changed-lane classification, lint-suppressions, runtime cycles and Madge pass. Runtime wrappers include transforms/import/lifecycle work; retained real transport/storage/authority contracts are not replaced by cheaper mocks. Per-file timing remains in native wrapper logs. Exact-head hosted CI owns broad and platform proof; CI job-wall accounting follows completion.
Hosted-only: all UI browser/E2E consumers and build-dependent Gateway methods/server runtime consumers under the campaign compute limit; ci:full is attached before the landing run. No visual or renderer behavior change, so no parity screenshot claim. The first focused Gateway methods wrapper unexpectedly entered full dist preparation. Its owned descendants were intentionally stopped after 167.254 seconds; no test failure is attributed to that setup, and no successful Gateway runtime or build proof is claimed. The completed narrow prefix was retained, Gateway runtime groups moved to exact-head hosted ci:full, and remaining narrow checks resumed serially. No standalone broad build/E2E/whole-graph typecheck, paid provider, live authentication, operator-state or performance proof was requested or claimed. A skipped collection is not live proof.
Fresh isolated complete-candidate P0-P2 review scoped-clean/no findings. Its sole later mechanical change removes the redundant default void type argument caught by lint; emitted behavior and inferred type are identical, and all other reviewed hashes stay exact. Final lint/type/runtime proof uses the corrected candidate.
Fresh 72-hour collision census: 74 recent open PRs, 105 bounded reads, at most two in flight; no surviving overlap. Entire progress-placement/PR-reader/device-platform paths were excluded for recent open fixture campaigns #184569/#184346 before adoption. Upstream main migrations are preserved. No rebase, re-push or CI rerun for green.
Exact-head hosted proof and landing
CI 40362774116 passed; 84jobs accounted,21462summed overlapping job-wall seconds (not elapsed). Actual Security Review 40362762622 executed Prepare and Enforce successfully for this PR/head. Current protected-main publisher40371495858 projected successful dependency, security-sensitive and CI-gate statuses. Complete exact-head accounting:220checks,0failures,0pending;8cancelled duplicate/advisory checks each have an executed successful same-head replacement. Hosted CI owns Gateway/server/UI runtime coverage; no paid/live-provider proof inferred.
Two native landing attempts refused before dispatch because their watcher selected cancelled duplicate review40362774216 instead of the executed successful review. Both confirmed no request and released the operation lock. The standing rule10 exact-SHA squash recovery landed reviewed head
450c7bce9c14512a953f973f313e040f51467665as0969d13b34cb8dc3279eac337b0c4fc589abe204; evidence and complete attribution. No CI rerun, repush for green, rebase, failed-test or security waiver. Squash ancestry verified against fresh main.