Repository navigation
test(acp,agents,workboard,sdk): remove low-value tests (batch d169) - #164238
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 3, 2026, 6:18 AM ET / 10:18 UTC (Revision 2). ClawSweeper reviewWhat this changesThe PR consolidates overlapping tests and shared fixtures for agent sessions, Workboard, streaming clients, and text utilities while retaining independent behavioral assertions. Merge readiness⛔ Blocked before merge - 1 item remains Keep open. The consolidation remains useful, the earlier merge-conflict blocker is resolved, and no concrete blocking defect was identified in the inspected changes. Priority: P3 Review scores
Verification
How this fits togetherThese test suites exercise OpenClaw’s session storage, agent execution, Workboard task management, and SDK streaming boundaries. They feed controlled requests and events into those owners and check ordering, lifecycle cleanup, authorization rejection, and returned results. flowchart TD
A[Requests and event fixtures] --> B[Consolidated test scenarios]
B --> C[Session and agent owners]
B --> D[Workboard services]
B --> E[SDK streaming clients]
C --> F[Contract assertions]
D --> F
E --> F
Before merge
Agent review detailsSecurityNone. PR surfaceTests -1820. Total -1820 across 42 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep consolidated fixtures and scenario tables while preserving each independently meaningful storage, authorization, protocol, and lifecycle contract at its owning boundary. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR consolidates tests rather than reporting a product defect; inspection did not establish a failing introduced scenario. Is this the best way to solve the issue? Yes: shared fixtures and scenario tables are a maintainable approach where the original independent assertions remain, as in the inspected streaming, storage, and lifecycle cases. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 260a31989937. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
Drop u0083 protocol changes after review, retain Workboard registration and both MCP acquisition lifecycle matrices, and include the MCP index declaration in virtual typecheck inputs.
03f931e to
11de0f9
Compare
…penclaw#164238) * test(acp): deslop u0088 tests * test(workboard): deslop u0077 tests * test(agents): deslop u0089 tests * test(agents): deslop u0090 tests * test(auth-profiles): deslop u0091 tests * test(packages): deslop u0086 tests * test(gateway-protocol): deslop u0083 tests * test(code-mode): deslop u0095 tests * test(agents): deslop u0092 tests * test(agents): deslop u0097 tests * test: retain independent contracts in batch d169 Drop u0083 protocol changes after review, retain Workboard registration and both MCP acquisition lifecycle matrices, and include the MCP index declaration in virtual typecheck inputs.
What Problem This Solves
Batch d169 reduces repeated test fixtures, duplicate cases, and implementation inventories across ACP, agents, Workboard, and SDK packages.
User Impact
No production behavior change. All changes are confined to tests; public behavior, authority, concurrency, migration, and regression coverage remain the retention criteria.
Why This Change Was Made
Consolidate related inputs into tables and retain the stronger owner-boundary assertions. The SDK assistant streaming scenarios move into the chat-stream suite with their original assertions retained. All ten supplied commits replayed in order onto main; the initial replay had no conflicts.
All u0083 Gateway protocol changes are dropped after review: these deletions removed independent wire-schema contracts, so all six files retain their base versions. Also retain the exhaustive Workboard method registration assertion and both full/requester MCP acquisition entrypoints at every lifecycle boundary. Fix the consolidated Code Mode fixture to include the MCP index declaration in its virtual compiler input. These are review-driven adjustments. A subsequent rebase onto
48ff3d1efde5fbb0bb534693c6bcc448cad7d796resolved one Workboard conflict by retaining main's newfacts-unavailablereason assertion in the consolidated unknown-PR row. Main's other changes were retained.CODEOWNERS: no changed paths match the current ownership rules.
Evidence
Focused remote proof on the pre-rebase tree:
CI=1 pnpm install --frozen-lockfile --prefer-offline && CI=1 pnpm test <41 changed test files> packages/gateway-protocol/src/session-narration.test.ts src/agents/embedded-agent-runner/tool-name-allowlist.test.tspassed 616 tests in 43 files / 12 shards, with runner wall time 221.32s. Blacksmith Testbox leasetbx_01m40h5ck8148ry183kb6ryzfv, run, verified source tree08b16410a60f20d05a6c04bdc131dbc7ee93743a; lease stopped. Plain localoxlint -c .oxlintrc.json <changed TS files>,oxfmt --write <changed files>, andgit diff --checkpassed.Two earlier attempts stopped before executing tests: a source-commit guard needed to account for the wrapper's carrier commit, and a moving shared
origin/mainadded an unrelated documentation path to the test target list. The successful run pinned path selection to base2a58339e793171ad389db75e6815757037180adcand verified test-file hashes.At publication,
OPENCLAW_TESTBOX=1 node scripts/check-changed.mjs --base 2a58339e793171ad389db75e6815757037180adc -- <42 changed paths>had completed isolated-source staging but could not start checks because Testbox leasetbx_01m40k2as3p00krvpz5akr34zfremained queued for allocation. This is an infrastructure gap, not a passing changed-gate claim; no validation assertion failed. The focused suite and local gates above passed. Hostedopenclaw/ci-gateremains the merge gate under the campaign arming rule.The final replay is test-only: +3,709 / −5,529 lines (net −1,820) across 42 files; production/tooling: +0 / −0. Test declarations fall by 138 across the retained shards. u0083 has no final diff.
Rebase proof status: the original Blacksmith changed-check lease never obtained a runner and is confirmed stopped. A fresh AWS Crabbox run is executing the rebased focused suite (plus the global-dispatch owner test) and the changed-file gate. Until it completes, the prior 616-test pass is prior-tree evidence; hosted CI remains the current-head merge gate. Local formatting, plain oxlint, and diff checks are repeated before push.
Review disposition
Two independent review passes completed. Accepted findings restored the independent protocol schemas, Workboard registration inventory, and full MCP lifecycle matrices, and repaired the Code Mode virtual-source fixture. No accepted finding remains unresolved.
Rejected findings, checked against source:
src/agents/embedded-agent-runner/tool-name-allowlist.test.ts; its owner maps generic registered names, deduplicates, and sorts. The adapter preserves generictool.name, with nosessions_spawnspecial case.interruptedcase selected the default executor, which is Node incode-mode-runtime.ts. Its replacement Node row preserves that behavior; the old QuickJS comment did not describe its actual execution.src/agents/embedded-agent-runner/run/run-attempt-dispatch.owner.test.ts: theworkagent plusagent:main:policyrow verifies the dispatched agent/global session, no sandbox creation, andsandbox === nullthrough the same dispatch entrypoint.Original shard coverage evidence
These totals come from the original in-shard reports, before this replay; they are not a new combined coverage measurement. Every original shard was within the one-percent covered statement/branch loss gate. The replay restores additional contracts. Original reduction quotas were deliberately not reached where distinct behavior needed retention. u0083 is listed for source-batch traceability only and is entirely dropped from this PR.
u0088
Original shard test LOC delta: -148; declaration delta: -7.
Files:
src/acp/runtime/session-meta-read.test.ts,src/acp/runtime/session-meta-write.worker.test.ts,src/acp/runtime/session-meta.alias-lifecycle.test.ts,src/acp/runtime/session-meta.key-repair.test.ts.u0077
Original shard test LOC delta: -155; declaration delta: -5.
Files:
extensions/workboard/src/gateway.test.ts,extensions/workboard/src/lifecycle-sync.service.test.ts,extensions/workboard/src/sessions-board.test.ts.u0089
Original shard test LOC delta: -292; declaration delta: -23.
Files:
src/acp/session-new-ordering.sdk.test.ts,src/acp/session-new-ordering.test.ts,src/agents/admitted-run-context.test.ts,src/agents/agent-bundle-mcp-acquisition.test.ts,src/agents/agent-bundle-mcp-idle-policy.test.ts,src/agents/agent-bundle-mcp-manager.lifecycle.test.ts.u0090
Original shard test LOC delta: -204; declaration delta: -18.
Files:
src/agents/agent-command-local.test.ts,src/agents/agent-lifecycle-registry.test.ts,src/agents/agent-tool-definition-adapter.metadata.test.ts,src/agents/agent-tools.session-portal.test.ts,src/agents/apply-patch.operator-hint.test.ts,src/agents/auth-profiles.sqlite-read-pool.test.ts.u0091
Original shard test LOC delta: -210; declaration delta: -20.
Files:
src/agents/auth-profiles/inherited-store.test.ts,src/agents/auth-profiles/oauth-refresh-failure.test.ts,src/agents/auth-profiles/oauth-shared.test.ts,src/agents/auth-profiles/store.async-read.test.ts.u0086
Original shard test LOC delta: -288; declaration delta: -17.
Files:
packages/normalization-core/src/grapheme.test.ts,packages/normalization-core/src/utf16-slice.test.ts,packages/retry/src/index.test.ts,packages/sdk/src/assistant-stream.test.ts,packages/sdk/src/chat-stream.test.ts,packages/sdk/src/run-reconnect.websocket.test.ts,packages/sdk/src/transport.websocket.test.ts.u0083
Original shard test LOC delta: -888; declaration delta: -30.
Files:
packages/gateway-protocol/src/schema/environments.test.ts,packages/gateway-protocol/src/schema/sessions-patch.test.ts,packages/gateway-protocol/src/schema/worker-gateway-tool.test.ts,packages/gateway-protocol/src/session-narration.test.ts,packages/gateway-protocol/src/theme.test.ts,packages/gateway-protocol/src/update-runs-validators.test.ts.u0095
Original shard test LOC delta: -41; declaration delta: -7.
Files:
src/agents/code-mode.contracts.test.ts,src/agents/code-mode.integrated.test.ts,src/agents/code-mode.loop-detection.test.ts,src/agents/code-mode.rejections.test.ts.u0092
Original shard test LOC delta: -428; declaration delta: -21.
Files:
src/agents/auth-profiles/usage-state.test.ts,src/agents/bash-tools.exec-runtime.test.ts,src/agents/bootstrap-files.remote.test.ts,src/agents/cli-output-stream.test.ts.u0097
Original shard test LOC delta: -108; declaration delta: -20.
Files:
src/agents/embedded-agent-runner/lanes.test.ts,src/agents/embedded-agent-runner/requester-run-settlement.test.ts,src/agents/embedded-agent-runner/run.incomplete-turn.classification.test.ts,src/agents/embedded-agent-runner/run.overflow-compaction.loop.test.ts.