Skip to content

test(acp,agents,workboard,sdk): remove low-value tests (batch d169) - #164238

Merged
steipete merged 11 commits into
mainfrom
tcr/land-d169-1791019170
Oct 3, 2026
Merged

steipete merged 11 commits into
mainfrom
tcr/land-d169-1791019170

Conversation

@steipete

@steipete steipete commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

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 48ff3d1efde5fbb0bb534693c6bcc448cad7d796 resolved one Workboard conflict by retaining main's new facts-unavailable reason 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.ts passed 616 tests in 43 files / 12 shards, with runner wall time 221.32s. Blacksmith Testbox lease tbx_01m40h5ck8148ry183kb6ryzfv, run, verified source tree 08b16410a60f20d05a6c04bdc131dbc7ee93743a; lease stopped. Plain local oxlint -c .oxlintrc.json <changed TS files>, oxfmt --write <changed files>, and git diff --check passed.

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/main added an unrelated documentation path to the test target list. The successful run pinned path selection to base 2a58339e793171ad389db75e6815757037180adc and 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 lease tbx_01m40k2as3p00krvpz5akr34zf remained 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. Hosted openclaw/ci-gate remains 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.

Shard Original test LOC delta Final replay test LOC delta Original / final declaration delta
u0088 −148 −148 −7 / −7
u0077 −155 −103 −5 / −5
u0089 −292 −290 −23 / −23
u0090 −204 −204 −18 / −18
u0091 −210 −210 −20 / −20
u0086 −288 −288 −17 / −17
u0083 −888 0 (dropped) −30 / 0
u0095 −41 −41 −7 / −7
u0092 −428 −428 −21 / −21
u0097 −108 −108 −20 / −20

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:

  • The removed allowlist replay duplicates src/agents/embedded-agent-runner/tool-name-allowlist.test.ts; its owner maps generic registered names, deduplicates, and sorts. The adapter preserves generic tool.name, with no sessions_spawn special case.
  • The removed guest interrupted case selected the default executor, which is Node in code-mode-runtime.ts. Its replacement Node row preserves that behavior; the old QuickJS comment did not describe its actual execution.
  • The removed global-plugin dispatch case is covered by src/agents/embedded-agent-runner/run/run-attempt-dispatch.owner.test.ts: the work agent plus agent:main:policy row verifies the dispatched agent/global session, no sandbox creation, and sandbox === null through 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.

covered statements 591 -> 591 (0); branches 412 -> 412 (0); functions 122 -> 122 (0)

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.

covered statements 2007 -> 2008 (1); branches 1597 -> 1601 (4); functions 520 -> 521 (1)

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.

covered statements 3070 -> 3070 (0); branches 1591 -> 1591 (0); functions 583 -> 583 (0)

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.

covered statements 10302 -> 10298 (-4); branches 5466 -> 5465 (-1); functions 1810 -> 1806 (-4)

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.

covered statements 2658 -> 2658 (0); branches 1707 -> 1707 (0); functions 518 -> 518 (0)

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.

covered statements 988 -> 987 (-1); branches 782 -> 781 (-1); functions 175 -> 175 (0)

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.

covered statements 2639 -> 2639 (0); branches 139 -> 139 (0); functions 67 -> 67 (0)

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.

covered statements 3915 -> 3915 (0);
branches 2357 -> 2355 (-2);
functions 725 -> 725 (0)

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.

covered statements 2702 -> 2702 (0); branches 1749 -> 1749 (0); functions 461 -> 461 (0)

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.

covered statements 14254 -> 14244 (-10); branches 9158 -> 9135 (-23); functions 2637 -> 2634 (-3)

@clawsweeper

clawsweeper Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@steipete
steipete enabled auto-merge (squash) October 3, 2026 10:04
@steipete
steipete disabled auto-merge October 3, 2026 10:06
@clawsweeper

clawsweeper Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed October 3, 2026, 6:18 AM ET / 10:18 UTC (Revision 2).

ClawSweeper review

What this changes

The 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
Reviewed head: 11de0f9ee945b0e572a0e1abecb1add0a708ffd4

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Useful test consolidation with retained contract assertions and no concrete blocking finding; validation provenance correctly distinguishes the earlier tree.
Proof confidence 🌊 off-meta tidepool Not applicable: The host identifies a MEMBER-authored test-only PR, so contributor runtime proof is exempt. Reported test results are supplemental prior-tree validation; no production authority or stored-data contract changes require separate final-effect or upgrade proof.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The host identifies a MEMBER-authored test-only PR, so contributor runtime proof is exempt. Reported test results are supplemental prior-tree validation; no production authority or stored-data contract changes require separate final-effect or upgrade proof.
Evidence reviewed 8 items Pinned introduced scope: The merge-base-to-head delta is confined to test files; it introduces no production, dependency, workflow, public API, or stored-data contract changes. The checkout remained clean, and the read-only diff check passed.
Previous conflict blocker resolved: The recorded test merge has exactly the pinned base parent followed by the reviewed PR head. Its result changes only the introduced test paths, supporting removal of the previous conflict warning without attributing base-only changes to this PR.
Independent contracts retained: The Workboard method-registration inventory remains explicit, and the MCP acquisition tests retain both full and requester entrypoints across admission rejection and queued-release lifecycle boundaries. The dropped protocol-schema pruning is absent from the introduced delta.
Findings None None.
Security None None.

How this fits together

These 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
Loading

Before merge

  • Resolve review confidence - ClawSweeper must reach high confidence before merge readiness is known.
Agent review details

Security

None.

PR surface

Tests -1820. Total -1820 across 42 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 42 3650 5470 -1820
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 42 3650 5470 -1820

Review metrics

None.

Technical review

Best 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.

Labels

Label changes:

  • add P3: This is test-maintenance cleanup with no introduced production behavior change or identified urgent regression.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The host identifies a MEMBER-authored test-only PR, so contributor runtime proof is exempt. Reported test results are supplemental prior-tree validation; no production authority or stored-data contract changes require separate final-effect or upgrade proof.

Label justifications:

  • P3: This is test-maintenance cleanup with no introduced production behavior change or identified urgent regression.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The host identifies a MEMBER-authored test-only PR, so contributor runtime proof is exempt. Reported test results are supplemental prior-tree validation; no production authority or stored-data contract changes require separate final-effect or upgrade proof.

Evidence

What I checked:

  • Pinned introduced scope: The merge-base-to-head delta is confined to test files; it introduces no production, dependency, workflow, public API, or stored-data contract changes. The checkout remained clean, and the read-only diff check passed. (11de0f9ee945)
  • Previous conflict blocker resolved: The recorded test merge has exactly the pinned base parent followed by the reviewed PR head. Its result changes only the introduced test paths, supporting removal of the previous conflict warning without attributing base-only changes to this PR. (1c32a7378947)
  • Independent contracts retained: The Workboard method-registration inventory remains explicit, and the MCP acquisition tests retain both full and requester entrypoints across admission rejection and queued-release lifecycle boundaries. The dropped protocol-schema pruning is absent from the introduced delta. (src/agents/agent-bundle-mcp-manager.lifecycle.test.ts:424, 11de0f9ee945)
  • Code Mode compiler fixture repaired: The consolidated test retrieves the root, index-server, alpha, and beta declarations through OpenClaw’s API and typechecks all four MCP namespace calls. Its execution owner is OpenClaw’s Code Mode implementation; no Codex dependency contract is established by this change. (src/agents/code-mode.contracts.test.ts:46, 11de0f9ee945)
  • Streaming assertions moved: The removed assistant-stream suite’s replay eviction, item replacement, raw-frame identity, and terminal-baseline cases remain in chat-stream.test.ts. The consolidated scenarios continue to assert reconstructed output independently of wire frames. (packages/sdk/src/chat-stream.test.ts:177, 11de0f9ee945)
  • Validation provenance: The captured PR body reports 616 passing tests on source tree 08b16410a60f20d05a6c04bdc131dbc7ee93743a and explicitly identifies that result as prior-tree evidence after rebasing. The supplied current-head checks include passing changed-test jobs with other checks pending. No tests were executed during this read-only review. (08b16410a60f)

Likely related people:

  • Peter Steinberger: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Vincent Koc: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (1 earlier review cycle)
  • reviewed 2026-10-03T10:07:26.048Z sha 03f931e2a3af6955e8b50760f95ed86628a60241 :: needs changes before merge. :: none

@steipete
steipete force-pushed the tcr/land-d169-1791019170 branch from 03f931e to 11de0f9 Compare October 3, 2026 10:13
@steipete
steipete enabled auto-merge (squash) October 3, 2026 10:13
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Oct 3, 2026
@steipete
steipete merged commit 641f774 into main Oct 3, 2026
123 checks passed
@steipete
steipete deleted the tcr/land-d169-1791019170 branch October 3, 2026 10:24
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 4, 2026
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. plugin: workboard rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XL status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant