Skip to content

test(agents,gateway,plugins): remove low-value tests (batch d224) - #165945

Merged
steipete merged 4 commits into
mainfrom
tcr/land-d224-1791259880
Oct 6, 2026
Merged

steipete merged 4 commits into
mainfrom
tcr/land-d224-1791259880

Conversation

@steipete

@steipete steipete commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

What Problem This Solves

The plugin installer, embedded agent runner, and Gateway session suites repeat contracts already covered at stronger boundaries, increasing test maintenance and execution cost.

User Impact

No user-visible behavior change. This is the explicitly requested d224 test-reduction batch; runtime production code is unchanged. Distinct security, run-authority, recovery-order, lifecycle-race, and regression coverage remains.

Why This Change Was Made

Remove redundant fixture variants and helper projections, retain the cache-continuity test in the context-injection suite, and move the unchanged six-case orphan-recovery table into the recovery-order suite. Remove its retired test filename from the CI proof inventory.

The replay is based on 3c66417c08e3d96ab14930262aa3cd47feaa42ac. Four cleanup commits were applied with their original messages: 6da37dffb878, 6e61a01728f8, 98903d78973e, and 1e4527712289.

Six fixture repairs were omitted because current main already carries the repair or its replacement:

The w0126 conflict was a duplicate bare-session-key test that main had simplified from a one-row table. Applied the intended deletion to the current form; preserved surrounding fixed-store ownership coverage. All other cleanup hunks applied without conflicts. No baseline files changed. None of the changed paths matches a current CODEOWNERS rule.

Shard scope and historical coverage evidence

These are the original in-shard measurements, not a new coverage measurement of the rebased branch. Every shard retained distinct cases instead of forcing a deletion quota; no cases were folded.

Shard Files touched Test LOC before → after Declarations before → after Executed cases before → after
w0124 src/plugins/install.npm-spec.e2e.test.ts, install.npm-spec.test.ts, install.test.ts; support install.npm-dependencies.test-support.ts, install.npm-spec.test-support.ts, update-npm-metadata.test-support.ts 6,058 → 5,070 (−988) 105 → 84 (−21) 158 → 124 (−34)
w0118 Under src/agents/embedded-agent-runner/run/: attempt.spawn-workspace.cache-ttl.test.ts (deleted), attempt.spawn-workspace.context-engine.test.ts, attempt.spawn-workspace.context-injection.test.ts, attempt.subscription-cleanup.test.ts, attempt.test.ts, attempt.tool-search-run-plan.test.ts 4,620 → 4,457 (−163) 106 → 102 (−4) 131 → 115 (−16)
w0122 Under src/gateway/: server.sessions.process-cleanup.test.ts, server.sessions.recover-orphan.test.ts (deleted), server.sessions.recovery-order.test.ts, server.sessions.reset-cleanup.test.ts, server.sessions.reset-concurrency.test.ts, server.sessions.reset-hooks.succession.test.ts, server.sessions.reset-hooks.test.ts, server.sessions.reset-models.test.ts, server.sessions.store-paths.test.ts, server.sessions.store-rpc.test.ts; scripts/lib/ci-proof-test-inventory.mts 6,779 → 5,954 (−825) 105 → 79 (−26) 125 → 98 (−27)
w0126 src/gateway/session-utils.test.ts, src/gateway/session-utils.subagent.test.ts 3,794 → 3,227 (−567) 103 → 80 (−23) 120 → 88 (−32)

Exact original coverage totals:

  • w0124: covered statements 4682 -> 4682 (0); branches 3531 -> 3531 (0); functions 953 -> 953 (0).
  • w0118: covered statements 13158 -> 13157 (-1); branches 8641 -> 8642 (1); functions 2464 -> 2463 (-1).
  • w0122: covered statements 17792 -> 17760 (-32); branches 10784 -> 10741 (-43); functions 3305 -> 3298 (-7).
  • w0126: covered statements 3329 -> 3329 (0); branches 2578 -> 2578 (0); functions 592 -> 592 (0).

Qualification: w0124's comparable coverage excludes four originally failing plugin-config files (install.archive-dependencies.test.ts, install.path.test.ts, install.test.ts, install.work-deadline.test.ts); it establishes zero loss for comparable npm/E2E groups, not complete zero loss across the full shard. All 124 final shard tests passed. w0122 drops 0.18% covered statements and 0.40% covered branches; five selected archive-owner cases also passed. w0118's historical default changed-check encountered inherited line-cap debt, while checks against its supplied shard base passed. Fresh replay validation is reported separately below.

Final replay numstat across 25 paths: tests +367/−2,923, test support +46/−98, test tooling +0/−1, runtime production +0/−0; total +413/−3,022, net −2,609 lines.

Evidence

  • Local pinned dependency install, oxfmt --write on all changed existing files, plain oxlint -c .oxlintrc.json on changed TS/MTS files, and git diff --check: passed.
  • Blacksmith Testbox focused validation on 69fbea2c31ff79b193431950b7bf511eae06db7a: 452 tests passed across 20 files / 7 Vitest shards, including install.npm-spec.e2e.test.ts and the additional installer-update owner suite. Command: CI=1 pnpm install --frozen-lockfile --prefer-offline && CI=1 pnpm test <all changed surviving test files> src/plugins/update.test.ts. Remote command 924.1 seconds, including cold preparation/build; Vitest group durations totaled 210.4 seconds. Lease tbx_01m47pqcczxz13cnzzr9a4axkn, Testbox run, exit 0. The external runner portal-sync warning occurred after successful execution and did not affect the result.
  • OPENCLAW_TESTBOX=1 node scripts/check-changed.mjs -- <all 25 changed paths>: dry-run classified core-test/script/tooling lanes. At publication, execution is blocked on Blacksmith allocation: lease tbx_01m47qv4bqwtftwdxx445hrvys remains queued without a runner after nearly five minutes. No changed-check validation has executed or failed. This is an explicit infrastructure gap under the campaign arming rule; the required hosted CI gate remains the merge gate.
  • Independent autoreview runs alongside hosted CI under the authorized campaign workflow; pinned-head squash auto-merge uses the required hosted gate.

Remove 26 declarations and 27 expanded cases without folding. Consolidate orphan recovery into the ordering suite and retain authority, lifecycle-race, and regression coverage. All 98 retained cases and check-changed pass. Covered statements decrease 0.18% and branches 0.40% from the repaired baseline.
@clawsweeper

clawsweeper Bot commented Oct 6, 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 6, 2026 04:39
@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime scripts Repository scripts agents Agent runtime and tooling size: XL labels Oct 6, 2026
@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 6, 2026
@clawsweeper

clawsweeper Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed October 6, 2026, 12:43 AM ET / 04:43 UTC.

ClawSweeper review

What this changes

The PR removes redundant agent, Gateway session, and plugin installer tests, consolidates retained cases, and updates the CI test inventory.

Merge readiness

✅ Ready for maintainer review

Keep open: this is a useful test-reduction batch, and the reviewed diff introduces no concrete blocking defect. Related merged work supplies fixture repairs rather than superseding this cleanup.

Priority: P3
Reviewed head: 69fbea2c31ff79b193431950b7bf511eae06db7a

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A useful, bounded cleanup with retained boundary coverage and no concrete blocking finding.
Proof confidence 🌊 off-meta tidepool Not applicable: The supplied repository state identifies this as maintainer-authored test cleanup with no changed production behavior. Recorded focused tests are supplemental validation; no stored-data contract changes require 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 supplied repository state identifies this as maintainer-authored test cleanup with no changed production behavior. Recorded focused tests are supplemental validation; no stored-data contract changes require upgrade proof.
Evidence reviewed 9 items Introduced scope and merge ownership: Read the complete introduced diff. Changes are confined to tests, test support, and one test-inventory deletion. The raw test-merge commit records the pinned main parent followed by the exact PR head; its delta against main contains the same cleanup paths.
Recovery cases preserved: The six-case orphan-recovery table moves intact into the recovery-order suite, retaining live-owner rejection, terminal-state rejection, and transcript-preservation assertions.
CI routing retained: The recovery-order suite remains explicitly inventoried. Searches of scripts, test configuration, tests, and workflows found no remaining references to either deleted test filename.
Findings None None.
Security None None.

How this fits together

These suites validate agent prompt preparation, Gateway session lifecycle operations, and plugin installation. Test fixtures exercise those owners, while the CI inventory determines which retained suites run.

flowchart TD
  A[Test fixtures] --> B[Agent prompt preparation]
  A --> C[Gateway session lifecycle]
  A --> D[Plugin installation]
  B --> E[Behavior assertions]
  C --> E
  D --> E
  F[CI test inventory] --> E
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests -2608, Other -1. Total -2609 across 25 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 24 413 3021 -2608
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 0 1 -1
Total 25 413 3022 -2609

Review metrics

None.

Technical review

Best possible solution:

Retain the consolidated suites and their distinct lifecycle, recovery, integrity, and rollback assertions while reducing redundant fixture work.

Do we have a high-confidence way to reproduce the issue?

Not applicable: this is test cleanup, and no introduced behavioral failure was established by source review.

Is this the best way to solve the issue?

Yes: consolidation and removal of redundant cases are a maintainable approach, with retained boundary assertions and no runtime implementation changes.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against a6d546de7f5b.

Labels

Label changes:

  • add P3: This reduces test maintenance and execution cost without changing runtime behavior.
  • 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 supplied repository state identifies this as maintainer-authored test cleanup with no changed production behavior. Recorded focused tests are supplemental validation; no stored-data contract changes require upgrade proof.

Label justifications:

  • P3: This reduces test maintenance and execution cost without changing runtime behavior.
  • 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 supplied repository state identifies this as maintainer-authored test cleanup with no changed production behavior. Recorded focused tests are supplemental validation; no stored-data contract changes require upgrade proof.

Evidence

What I checked:

Likely related people:

  • steipete: 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.

@steipete
steipete merged commit 205120b into main Oct 6, 2026
141 of 143 checks passed
@steipete
steipete deleted the tcr/land-d224-1791259880 branch October 6, 2026 04:47
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 7, 2026
…enclaw#165945)

* test(plugins): deslop w0124 tests

* test(agents): deslop w0118 tests

* test(gateway): deslop w0122 tests

Remove 26 declarations and 27 expanded cases without folding. Consolidate orphan recovery into the ordering suite and retain authority, lifecycle-race, and regression coverage. All 98 retained cases and check-changed pass. Covered statements decrease 0.18% and branches 0.40% from the repaired baseline.

* test(gateway): deslop w0126 tests
zeroaltitude added a commit to zeroaltitude/openclaw that referenced this pull request Oct 11, 2026
… (review feedback)

ClawSweeper [P1] "Preserve creation for existing unsupported thinking
settings": with a saved subagent thinking level (e.g. `high`) and an
off-only child, the visible spawn path skipped the capability clamp and
forwarded `high` explicitly. `sessions.create` rejects an explicit level the
prepared catalog does not support, so creation failed with INVALID_REQUEST
where the shipped visible path (which omitted the field) created the child.

Visible spawns already reject per-call `thinking`, so the candidate level is
always a saved subagent/agent default or the caller's inherited level, never
an explicit request. Both are now clamped through the same prepared-catalog,
runtime-row-aware path that inherited levels used. An unreadable catalog
still omits the field. The clamp moves to sessions-spawn-visible-thinking.ts
so sessions-spawn-visible.ts stays under its max-lines cap.

Regression: server.sessions.agent-model-catalog.test.ts drives the real
visible spawn into the real sessions.create handler with saved subagent
thinking `high` and an off-only child. It asserts the child is created and
persists `off`, and probes the same handler with the unclamped `high` to show
INVALID_REQUEST. With the production fix reverted, only this case fails, with
the real Gateway rejection.

Also repairs branch-owned tests broken by recent main merges and the line-cap
ratchet:
- restore the gateway test's real prepareModelChoice (vi.mock now spreads the
  original module, pruning its now-obsolete mock-export baseline entry) and
  stop pinning the harness-owned Ultra suggestion list;
- declare loadModelCatalog on SessionsSpawnToolOptions (it already flowed
  through createSessionsSpawnTool) and move tests off retired agents.list;
- drop a test main deleted in openclaw#165945 that a merge resurrected;
- move the branch's visible-thinking, visible worktree-fork, and visible-child
  projection tests into sibling files so no over-cap test file grows;
- remove the review's flagged low-value tests (mock-manufactured rejection,
  duplicate off-only replay, snapshot-shape runtime-row replays).

Refs: openclaw#137435
Beads: openclaw-cy3n
Co-Authored-By: Claude <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling gateway Gateway runtime P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. scripts Repository scripts 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