Repository navigation
refactor: deslop worker, transport and UI fixtures - #182739
Conversation
Consolidate repeated test setup into existing or adjacent fixture owners while preserving every assertion, scenario and registration. Keep per-call state, cleanup lifetimes and wire/schema values explicit. Republish the completed attachment-service fixture config before RPC preparation. Release-note context: internal test-fixture ownership cleanup; no user-visible change.
|
🦞👀 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 consolidates repeated test fixtures while preserving their scenarios, assertions, values, and cleanup lifetimes. Example: An enqueue test holds a committed deliveryQueue.enqueue worker reply.
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 test-fixture consolidation, with no actionable introduced defect found; exact-head CI remains pending. Priority: P3 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherTest-support factories supply synthetic records, HTTP responses, worker interception, and mounted UI fixtures to existing suites, which retain their independent assertions. flowchart LR
A[Test scenarios] --> B[Shared fixture factories]
B --> C[Transport and worker owners]
B --> D[Mounted UI components]
C --> E[Existing assertions]
D --> E
E --> F[Caller owned cleanup]
Technical reviewBest possible solution: Retain the fixture consolidation and use the existing exact-head CI gate for landing. Do we have a high-confidence way to reproduce the issue? This is a test refactor; the reported attachment-fixture failure and base control are documented in the full body, but were not rerun during this read-only review. Is this the best way to solve the issue? The change uses existing fixture owners where available, removes replaced helpers, and keeps scenario-specific inputs and assertions local. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against efe1c0dabba4. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceTests -655. Total -655 across 76 files. Added test files: 4. View PR surface stats
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 24, 2026, 1:35 PM ET / 17:35 UTC. |
Share request frames, deferreds, placement journals, pairing, prompt reports and model fixtures without changing assertions or scenarios. Defer transcript fixture consolidation while its support owner belongs to #182739.
|
Merged via squash auto-merge.
|
Share request frames, deferreds, placement journals, pairing, prompt reports and model fixtures without changing assertions or scenarios. Defer transcript fixture consolidation while its support owner belongs to #182739.
Consolidate repeated test setup into existing or adjacent fixture owners while preserving every assertion, scenario and registration. Keep per-call state, cleanup lifetimes and wire/schema values explicit. Republish the completed attachment-service fixture config before RPC preparation. Release-note context: internal test-fixture ownership cleanup; no user-visible change.
…82751) Share request frames, deferreds, placement journals, pairing, prompt reports and model fixtures without changing assertions or scenarios. Defer transcript fixture consolidation while its support owner belongs to openclaw#182739.
What Problem This Solves
Independent test families maintain copied wire framing, state records, lifecycle
fixtures and cleanup blocks. This stack gives each repeated family one existing
test-support owner, or a small adjacent owner where no suitable one exists.
Scenarios, assertions and authority remain at their original consumers.
User Impact
Test maintenance only. No production code, public SDK/config/protocol, schema,
durability, permission, rendering or user-visible behavior changes. No assertion,
test case, parameter row, or suite/test/mock/hook registration is removed or weakened.
Completion HTTP fixtures
Four raw servers reuse the existing completion suite's server, SSE and context
helpers. Fresh loopback servers, response-release ordering, exact headers/frames,
error metadata and finally-close propagation remain. Provenance: #174840/#175058.
Best-effort tradeoffs accepted: two handlers collect the same small synthetic
request bodies as UTF-8 instead of discarding them; wire bytes and cases stay intact.
Queue reply interception
The existing committed-reply owner handles enqueue replies too. Enqueue still
matches command type without inspecting input; existing operations keep ID matching.
Held replies, attempts, loss diagnostics, release and spy cleanup retain per-call
state. All three consumers migrate and the duplicate helper disappears.
Provenance: #152840/#157413.
Best-effort tradeoffs accepted: none; no queue durability or settlement guard changed.
Node supervisor fixtures
The existing fixture owner layers capacity observation, terminal/receipt/file
access and disposal once. Generic fixtures remain unchanged; startup-only store,
optional signal and main-only JSON readers remain local. Each receipt/store call
constructs a fresh handle. Three isolated-launch builders share their existing owner.
Provenance: #149158/#175294.
Best-effort tradeoffs accepted: internal function-property insertion order may differ;
own keys, override precedence, callback lifetimes and cleanup behavior are preserved.
Publication recording
Two identical receipt-bearing publication collectors use an adjacent owner.
Each invocation still allocates a fresh array/subscription and registers its own
onTestFinished unsubscribe; specialized transaction projections remain local.
Provenance: #178563.
Best-effort tradeoffs accepted: none. Static cleanup statements are shared, not runtime
cleanup registrations; no top-level subscription or shared mutable array is introduced.
Historical approval SQL
An import-free frozen fixture owns the byte-identical two-kind CREATE TABLE body.
The older reader adds only its historical system-agent kind, preserving its full
DDL including whitespace/indexes. Its reader/query/resolution functions are unchanged.
Neither fixture derives from today's schema. Provenance: #170280/#156033.
Best-effort tradeoffs accepted: none; this changes no persisted schema or migration
contract. The two historical DDL forms remain exactly 3,354 and 4,061 bytes.
Entered gates
Eight factory shapes reuse the landed entered-gate owner from #182660. Every call
retains fresh promises, synchronous entered notification and async wait semantics.
Release/open/resume/pause aliases, zero-arity wrappers, request during/finally/join,
disposal identity and idle cleanup lists remain. The orphaned duplicate support
file is deleted after all its callers migrate.
Best-effort tradeoffs accepted: none; no production admission, authorization,
ordering, cancellation or write-capable settlement mechanism changed.
Explicit usage records
Twelve complete zero-cost records reuse the existing fresh usage owner, with
explicit input/output/total counters rather than deriving totals. Singleton,
in-loop and per-function allocation sites remain unchanged, including fresh cost
objects. Partial/legacy serialized fixtures stay local. Provenance: #139745.
Best-effort tradeoffs accepted: none; exact fields, omissions, counter values and
object-key order were compared with each original literal.
Provider catalog models
Seven tests reuse the existing catalog-model builder. Names, headers, params,
family presence, context/output budgets and special provider/API fields remain
explicit. Incomplete/negative rows stay local. The self-hosted setup slice is
omitted because #182687 owned it during selection. Provenance: #178651/#151849/#151570.
Best-effort tradeoffs accepted: harmless property insertion ordering in internal
fixtures only; own keys, omitted versus undefined values and freshness remain exact.
Audio transport callbacks
The existing MeetingBot audio fixture owns repeated callback queue construction.
Node-host retains manual acceptance; local transport explicitly enables draining.
Success callbacks remain microtask queued and backpressure retains callbacks.
Best-effort tradeoffs accepted: none; each emitter, mock and callback queue is fresh.
Management catalog fixtures
Repeated complete management catalog defaults use the existing test-helper owner.
Caller-specific node identity, install facts, service results and overrides remain
local. Process factories and lifecycle ownership are unchanged.
Best-effort tradeoffs accepted: none; no catalog/runtime policy or mock registration changed.
Board frame fixtures
Two suites share mounting, default host callbacks and iframe message construction.
The helper keeps projected state and current-widget reads lazy, preserves revision
updates/flush ordering, and appends unmount to the original caller-owned disposer
array. Invalid-source cases remain local. No production view changes.
Best-effort tradeoffs accepted: none; cleanup order, source identity, omitted
message fields and per-call host callbacks remain unchanged.
Property descriptor restoration
Fourteen tests share one import-free restore-or-delete helper. Every descriptor
capture remains at its original module/beforeEach/local/loop lifetime; cleanup
placement, order, getter identity and inherited-property visibility remain.
Best-effort tradeoffs accepted: none; the helper neither captures nor auto-registers cleanup.
Composer capabilities
Two browser suites reuse the existing capability-menu builder with explicit empty
basePath (the owner's default is intentionally different). The overflow skills
table remains local and keeps its array identity. Original callbacks and empty
arrays stay fresh at the original fixture call site.
Best-effort tradeoffs accepted: none; optional keys remain absent and the original
three mock allocations per fixture call are preserved.
Unused conversation-menu helper
Remove the unused openChatConversationOptions test helper and its comment.
The feature's test consumer was removed by #182539 (6045ee8); the earlier
consumer disappeared in #182377. A whole tracked-tree symbol search finds only
the definition. All remaining menu helpers and their callers remain unchanged.
This is not a dormant feature foundation or a production capability removal.
Best-effort tradeoffs accepted: none; the removed helper contains no assertions
or registrations and no test reads it. The separate dashboard helper is excluded
because open #180697 already owns that deletion.
Board native command results
Retire the board GitHub Actions suite's duplicate Buffer command-result constructor
in favor of the existing import-free identity test-support owner (#175876).
All three callers, synthetic credentials, authority checks and scenarios stay local
and unchanged. Results and both empty buffers remain fresh on each invocation.
Best-effort tradeoffs accepted: none; Buffer bytes, own-key order, values and
freshness match. No credential, transport, cache or authorization behavior changes.
Preservation counts
Native TypeScript AST source call sites, not expanded parameter cases. Assertions
include expect/expect.soft, browser expect.poll/expect.element, expectDefined and
Node assert calls. All table
rows, custom registration aliases and full assertion/matcher bodies were also
checked for conservation. Each tuple is assertions / tests / suites / hooks.
The hook column counts before/afterAll/Each. Separately, publication keeps its
two aroundEach registrations and all eleven other onTestFinished source sites.
Its four collector invocations still register four fresh unsubscribe callbacks;
only the duplicated onTestFinished factory statement moves from two copies to one.
Evidence
Complete candidate after the two-line fixture-publication repair and exclusions:
GitHub reports 743 additions / 1,398 deletions = 655 net lines removed, 76 files, zero
production lines changed. No new suppressions, skips,
retries, timeouts, dependencies or baseline allowances.
Source-extracted probes preserve exact fixture values, own-key sets/omissions,
reference identities, generated literals, gate aliases and microtasks. Actual
apply_patch verification caught and repaired out-of-order backend artifact hunks
before application; that failed atomic application changed no tracked source.
Fresh full-base independent review returned scoped-clean through P2, including
all four added support files. Formatting and initial native conservation passed.
The later Board substitution also passed fresh whole-candidate review through P2.
The initial focused core selection was intentionally stopped and joined after
five completed project groups when its transitive-consumer expansion was found
to include a packaging E2E file outside the local budget. That E2E did not run;
completed results are retained and only unfinished non-E2E selection is resumed.
The interrupted wrapper is not an all-green result.
The attachment-service suite exposed ten RPC preparation failures. A serial
base-equivalent control restored all three branch-owned files in the original
two-file shard's import closure to pinned base 3d2d217, then reproduced all ten
with matching names and error signatures (14 passed/10 failed, 128.90 seconds).
Source inspection traces these to publication of config before adding the
suite's session-store route: eager capture from #182582 is already in that base.
The candidate is restored and a minimal local repair republishes the completed
fixture config before RPC preparation. Runtime snapshot behavior, security
checks, assertions and registrations are untouched. The repaired original shard
passed both files and all 24 cases (144.56 seconds test duration, 160.01 seconds
wrapper), red on the pinned-base control and green with this local fixture fix.
Fresh independent full-base review of the repaired candidate, with complete
fixture and runtime-snapshot owner context, returned scoped-clean through P2
with no actionable findings. Remaining proof is not represented as passed.
The owner-settlement slice is restored byte-for-byte to the pinned base because
open #182725 owns that file; its 81 assertions, ten tests, two suites and four
hooks remain in the repository, outside this PR. The 18-net updater consolidation
was also dropped: it introduced a runtime import into a widely shared fixture
owner. All three files are byte-identical to the pinned base; the unused-helper
cut replaces it without expanding that dependency graph.
The final pre-write census caught new open #182737 owning chat.directive-tags.
That file is also restored byte-for-byte to the pinned base; its 450 assertions,
71 tests, two suites and four hooks remain in the repository, outside this PR.
The independent eight-net Board native-result cut replaces the twelve-net usage
slice. Its full source and import-free owner were inspected, and seven native
before/after comparisons preserve Buffer bytes, object shape and per-call freshness.
The resumed core run completed 78 files / 1,077 cases: 77 files and 1,076 cases
passed, with nine of ten project groups green (2,039.47 seconds runner / 2,042.28
seconds wrapper). Its sole failed case was the first fresh-overrides staging row,
which surfaced a serialized Reef plugin-instance retirement failure after 5,000ms,
not an npm timeout. Source tracing shows that even an empty isolated profile can
load that setup through original-state Doctor migration backup discovery.
After dropping the updater slice, the directly reachable package-update support
file is byte-identical to pinned base. A single-file base-equivalent control
passed both original table cases (80.31 seconds test duration / 191.16 seconds
wrapper, including required worker-fixture preparation). This is an inconclusive
reproduction of the original larger-shard failure, not proof that it is fixed or
inherited. The original failed local result and remaining lifecycle uncertainty
are retained in the native review evidence. No timeout, retry, skip or expectation
changed. The long existing process/SQLite suites retain their real boundary
contracts; no new test cases or waiting budgets were added.
Final UI proof passed 18 files / 260 cases: 14 ordinary files / 186 cases,
one isolated file / 23 cases and three browser files / 51 cases (75.49 seconds
runner / 78.06 seconds wrapper). Completion transport proof passed all three
package files / 38 cases (4.62 seconds test duration / 15.14 seconds wrapper).
Final native source conservation confirms the counts above. Final full-base
independent review completed with no actionable findings through P2.
The original final guards passed scoped core/UI lint, mock-export completeness,
zero runtime value cycles, zero Madge cycles and all 14 suppression cases. UI lint
reported one reactivity warning on unchanged overflow-test line 55. Four remaining
UI type leaves passed after the private components proof config included the
existing Board custom-element declaration owner; no source type was weakened.
Final Board proof passed all 28 runtime cases (31.38 seconds test duration /
47.02 seconds wrapper), its updated narrow type leaf (2.07 seconds), formatting
and scoped lint (18.40 seconds). This completes all 19 narrow owning type leaves.
The final delta guards confirm the conservation table, zero runtime value cycles,
zero Madge cycles and all 14 suppression cases. The added file's changed-check
planner dry run passed; no broad local changed-check suite was run. Fresh final
whole-candidate review returned no actionable findings through P2. Staged Git
counts (745 additions / 1,400 deletions) confirm the same 655-net / 76-file
measurement above. Every runtime run uses
isolated HOME/OpenClaw/XDG, nice priority 10, maxWorkers=1 and serial heavy commands.
Hosted exact-head PR CI will supply broad proof; no local build, broad check-changed,
whole-graph typecheck or product E2E is planned under the campaign budget.
Release-note context: internal test-fixture ownership cleanup; no user-visible change.