Skip to content

test(ai,gateway,cli): remove low-value tests (batch d153) - #174040

Merged
steipete merged 10 commits into
mainfrom
tcr/land-d153-1792139002
Oct 16, 2026
Merged

steipete merged 10 commits into
mainfrom
tcr/land-d153-1792139002

Conversation

@steipete

@steipete steipete commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Repeated setup and assertion scaffolding make the AI provider, chat metadata, session-file, and plugin CLI tests harder to maintain. This replays the bounded d153 campaign batch onto main, preserving newer regression coverage.

User Impact

No production behavior, public API, configuration, or dependency changes. Test/support code changes only: +4,332 / -6,498 lines (net -2,166). Production: +0 / -0. Test files: +4,251 / -6,403; shared test support: +81 / -95.

Why This Change Was Made

Consolidate repeated fixtures, RPC calls, lifecycle setup, and equivalent assertion tables. The source reports retain the expanded behavior cases rather than forcing their 25%-per-file reduction target.

Applied source commits: 2f23d6bc0d43, ca340cda7611, f06f81661352, aa7d32035a40, 0a33fc896201, f6955654a8a9, c5f0cee5fd41, 24eb77867036, and aeea4e2b6276 (the last with the marketplace-file hunk omitted).

Skipped 0e8862940a9b (x7036): all five subagent files conflict with current main. The commit depends on earlier campaign-only helpers (childFixture, withRecovery, compact SQLite helpers) outside this batch. Kept current main's lifecycle, absent-child, and storage tests rather than importing those omitted refactors.

Replay decisions:

  • Chat metadata: kept main's lazy-projection, live-discovery, stable-auth-generation, and settled-history regression tests; retained the projection-read spy they use and runtime cleanup. Adapted the fixture helpers and resolved two shadowed names.
  • Session files: kept main's UTF-8 BOM round-trip test, adapted it to the new RPC fixture, and fixed the newer regression's workspace-path call to use the helper's single-path argument.
  • CLI: omitted the final commit's entire plugins-cli.marketplace-entries.test.ts hunk because its broad suite restructuring overlaps newer pinned-refresh fallback coverage. The preceding commit's small cleanup remains, along with main's assertions and both checksum forms.
  • No baseline edits or production seams removed. No changed paths match the repository's CODEOWNERS rules.
  • Review follow-up: restored main's existing and lookup-failed receipt-state cases in the GitHub publication rejection table. Both must suppress an unverified selection-rejection fact.

Evidence

CI-only validation per maintainer instruction: changed-file oxfmt --write, plain oxlint -c .oxlintrc.json, and git diff --check. No Vitest, check-changed, tsgo, coverage, builds, or Testbox/Crabbox runs. Required openclaw/ci-gate is the runtime proof and merge gate; independent review runs during CI.

The first CI run found a stale listFiles call in a newer pending-checkout test, missing workspaceScope in three Doctor fixtures, a missing install-policy warning reason, an unused max-lines suppression, an overly broad SDK type on the Responses replay fixture, and widened role-scope literals in a GitHub fixture. All were repaired at the fixture/caller boundary without weakening assertions. Evidence: https://github.com/openclaw/openclaw/actions/runs/38875989340. Auto-merge was disabled for repair and is re-armed only on the corrected head; no failed run was retried merely for green.

Independent review completed all 16 full-batch passes. It confirmed the six CI defects were fixed in the working tree and identified two receipt-state cases to restore. Its aggregate status was incomplete because it also reviewed the old index and rejected one source anchor; that is not presented as a clean verdict. After staging every fix and restoring both cases, an exact-source five-file follow-up with complete owning contract modules returned scoped-clean, with no P0-P2 findings. The follow-up files were byte-compared against the landing worktree. Formatting, plain lint, and whitespace checks passed after all corrections.

The host's Node 26 installation lost its libsimdutf.36.dylib dependency during the task. Final checks used the already-installed, supported Node 24.22.0 via a process-local PATH override; no host installation or dependency files changed.

Base: 0b47dd05c63a4f90c9f9ce31fbc1007b57348296. Two origin fetches raced another shared-ref updater; the second reported that origin/main already equaled the fetched commit above, which was pinned for this replay.

Shard totals

LOC and lexical it/test declaration counts below are measured against the pinned current-main base, not the older campaign base. Declaration reductions are fixture/table consolidation, not an expanded-case count.

Shard Test/support LOC before -> after Declaration count before -> after Source coverage evidence
x7034 3,980 -> 3,594 (-386) 64 -> 64 Report: "Tests, coverage, and typechecking were not run, per CI-only mode." No coverage totals available.
x7035 3,980 -> 3,389 (-591) 57 -> 55 Final report: "Tests, coverage, and builds were not run, per CI-only mode." No coverage totals available.
x7036 unchanged (commit skipped) unchanged Report: "Tests, coverage, and builds were not run, per CI-only instructions." No coverage totals available.
x7037 3,978 -> 3,441 (-537) 94 -> 88 Report: "No tests, coverage, or typechecks ran under CI-only mode." No coverage totals available.
x7038 3,977 -> 3,325 (-652) 69 -> 63 Final report: "No tests, coverage, or typechecks ran under CI-only mode." No coverage totals available.

Files by shard

Shard File LOC before -> after Declarations before -> after
x7034 packages/ai/src/providers/openai-chatgpt-responses-streaming.test.ts 561 -> 469 9 -> 9
x7034 packages/ai/src/providers/openai-compatible-thinking.test.ts 362 -> 325 1 -> 1
x7034 packages/ai/src/providers/openai-completions-structured-content-parity.test.ts 474 -> 420 2 -> 2
x7034 packages/ai/src/providers/openai-completions-usage-parity.test.ts 411 -> 385 2 -> 2
x7034 packages/ai/src/providers/openai-responses-shared.test.ts 1,849 -> 1,679 40 -> 40
x7034 packages/ai/src/providers/openai-responses.test.ts 323 -> 316 10 -> 10
x7035 src/gateway/server-methods/chat-metadata-handler.test.ts 866 -> 780 15 -> 14
x7035 src/gateway/server-methods/chat-metadata-runtime.native-session.test.ts 506 -> 357 5 -> 5
x7035 src/gateway/server-methods/chat-metadata-runtime.refresh.test.ts 305 -> 265 5 -> 5
x7035 src/gateway/server-methods/chat-metadata-runtime.test-support.ts 271 -> 251 0 -> 0
x7035 src/gateway/server-methods/chat-metadata-runtime.test.ts 741 -> 661 24 -> 23
x7035 src/gateway/server-methods/chat-metadata-session-writes.test.ts 699 -> 638 2 -> 2
x7035 src/gateway/server-methods/chat-pending-inputs.test.ts 592 -> 437 6 -> 6
x7037 src/cli/plugins-cli.inspect.test.ts 577 -> 530 10 -> 10
x7037 src/cli/plugins-cli.install.test.ts 987 -> 845 30 -> 27
x7037 src/cli/plugins-cli.list.test.ts 498 -> 473 14 -> 14
x7037 src/cli/plugins-cli.marketplace-entries.test.ts 403 -> 390 10 -> 10
x7037 src/cli/plugins-cli.policy.test.ts 417 -> 377 8 -> 7
x7037 src/cli/plugins-cli.update.test.ts 1,096 -> 826 22 -> 20
x7038 src/gateway/server-methods/sessions-files.host-read.test.ts 489 -> 364 8 -> 7
x7038 src/gateway/server-methods/sessions-files.incognito.test.ts 370 -> 293 3 -> 3
x7038 src/gateway/server-methods/sessions-files.repository.test.ts 973 -> 816 10 -> 10
x7038 src/gateway/server-methods/sessions-files.test-support.ts 268 -> 274 0 -> 0
x7038 src/gateway/server-methods/sessions-files.test.ts 1,107 -> 934 34 -> 30
x7038 src/gateway/server-methods/sessions-github-read.target.test.ts 353 -> 285 7 -> 7
x7038 src/gateway/server-methods/sessions-github.test.ts 417 -> 359 7 -> 6

@clawsweeper

clawsweeper Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review blocked

Automated review did not run, so no review verdict was produced.

Reason: The input-safety check rejected material in this revision. No detected value, path, or scanner output is reproduced here.

Automatic review is on hold, including after source changes. Request a fresh re-review after resolving the failure; maintainers can also release the hold through an intentional scanner-policy update.

Next step: If this is a genuine credential, remove and rotate it. If it is an intentional test fixture, a maintainer must review and qualify it.

View the workflow run.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-16T10:09:20.168818Z 8fff617 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@steipete
steipete enabled auto-merge (squash) October 16, 2026 08:47
@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime cli CLI command changes size: XL labels Oct 16, 2026
@steipete
steipete disabled auto-merge October 16, 2026 08:53
@steipete
steipete enabled auto-merge (squash) October 16, 2026 10:04
@steipete
steipete merged commit d6b70c1 into main Oct 16, 2026
112 checks passed
@steipete
steipete deleted the tcr/land-d153-1792139002 branch October 16, 2026 10:13
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 17, 2026
…74040)

* test(ai): deslop x7034 tests

* test(gateway): deslop x7035 tests

* test(gateway): deslop x7035 tests

* test(gateway): deslop x7035 tests

* test(gateway): deslop x7038 tests

* test(gateway): deslop x7038 tests

* test(gateway): deslop x7038 tests

* test(cli): deslop x7037 tests

* test(cli): deslop x7037 tests

* test: repair rebased d153 fixture contracts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli CLI command changes gateway Gateway runtime size: XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant