Skip to content

test(core,plugins): remove low-value tests (batch d275) - #177103

Merged
steipete merged 29 commits into
mainfrom
tcr/land-d275-1792395390
Oct 19, 2026
Merged

steipete merged 29 commits into
mainfrom
tcr/land-d275-1792395390

Conversation

@steipete

@steipete steipete commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Reduces repeated setup and assertion scaffolding in the test suite without changing production behavior.

User Impact

No user-visible behavior change, migration, configuration change, or runtime production-code change. This is the test/support-only remainder of batch d275 after replaying onto pinned main 419653b638d8a53822d0c5ad919a6d05fb8e6c94 and rebasing onto 077fcccbdfdee2d755dc4d248d82412222e638d0 to include the upstream control-UI test-type fix.

Why This Change Was Made

Consolidates repeated fixtures and equivalent cases, shares voice-call registration and portal server harnesses, and removes an obsolete doctor test helper. Distinct authorization, persistence, concurrency, Unicode, transport, and failure-path coverage takes precedence over line reduction.

26 of the 30 requested campaign commits were applied, with conflict-scoped omissions. Four were skipped: 1fc96941b62a9f5333d7989eba2eb84ec8dfe2a8 (second QA-lab rewrite) and f1515588b1ef847970fff5277dd9205509809066, e23c8a48dfb729a15426f24b630cc592055e8352, 0c68611c5e027937facc4a6307d97467188d0f84 (system-agent). Main's new fixture/lifecycle contracts supersede the older rewrite assumptions.

Conflict decisions:

  • Discord voice: preserved main's Ogg and MP3 bounded-ffmpeg cases and probe-count assertions. Kept compatible typed mocks/fixture consolidation; dropped the conflicting argument-list compaction.
  • Device-pair: left index.test.ts and notify.test.ts identical to main. Main has newer authorization/QR transports and persisted one-shot notification coverage. The notification cleanup removed settlePoll still required by a new regression; restored the whole file, including its cleanup tracking. Only the CAS suite cleanup remains.
  • File tools: left edit.test.ts, edit-diff.test.ts, and write.test.ts identical to main, preserving newer Unicode, write-verification, and diff-receipt regressions. Kept read.test.ts consolidation.
  • LLM: left openai.test.ts and proxy.test.ts identical to main, preserving new code-mode and cache-retention cases; kept compatible schema and service-tier fixture cleanup.
  • QA-lab: left scenario-selection.test.ts identical to main; retained added channels and missing-recipe rejection in the compatible first rewrite. Skipped the second rewrite rather than replace newer startup/shutdown and credential-timeout cases.
  • System-agent: no changes retained; current config-snapshot/inference ownership differs from the campaign base.

Evidence

Initial CI run 39217731603 exposed stale fixture contracts. Repaired the missed schema-helper rename, missing doctor cfg, webhook delivery callback type, V2 service-start context, extracted portal callback binding and raw WebSocket decoding, and mock-isolation documentation. Restored MiniMax's original variadic-safe timeout assertion and original request/input narrowing. The unrelated control-UI SubscriptionDeps.load type failure is fixed upstream by 833bd279bd3, included by the rebase. No tests, retries, or timeout budgets were weakened to obtain green. The rebased run 39219614594 cleared the earlier type/lint/test failures; its remaining ratchet error identified six obsolete mock-export baseline rows. Removed exactly those six rows, with no added exceptions. Fresh-head CI is the remaining gate.

Local validation: pnpm install --frozen-lockfile --prefer-offline; direct node_modules/.bin/oxfmt --write <changed files>; direct node_modules/.bin/oxlint -c .oxlintrc.json <changed TS files> (exit 0); git diff --check 077fcccbdfdee2d755dc4d248d82412222e638d0 (exit 0).

Per the explicit CI-only instruction, no local Vitest, check-changed, typecheck, coverage, or Testbox run. Hosted openclaw/ci-gate is the merge proof. The source shard reports also explicitly say coverage was not run under CI-only mode; no numeric coverage-total evidence exists for these shards, and none is claimed here. Independent full-batch review completed; its missing-cfg finding was accepted and repaired. Two findings were rejected against source: the lease input accepts role?: string, and invalidTool() already contains the exact non-array required: "query" fixture. A focused review of the repair delta was scoped-clean at P0–P2. The final three lint repairs restore the original HTTP handler/input narrowing patterns.

Production LOC: +0 / -0. Test/support LOC: +5,957 / -9,535, net -3,578, across 50 test/support paths (including one deleted helper). The mock-export baseline also shrinks by six metadata lines, for 51 total paths and net -3,584 lines. Counts below cover only the retained touched paths against the rebased pinned base. Declaration counts are static it/test declarations, not expanded cases or executed test totals.

The only metadata change is shrink-only removal of the six exact stale rows reported by CI from config/test-mock-exports-baseline.txt. No changed path matches the current explicit CODEOWNERS rules.

Per-shard scope and static deltas
Shard Test/support LOC before → after Declaration count before → after Coverage totals
x8310 195 → 147 (-48) 4 → 1 Not run (CI-only)
x8311 2053 → 1657 (-396) 37 → 30 Not run (CI-only)
x8312 1952 → 1550 (-402) 54 → 53 Not run (CI-only)
x8313 1944 → 1570 (-374) 40 → 32 Not run (CI-only)
x8314 1956 → 1452 (-504) 55 → 48 Not run (CI-only)
x8315 1830 → 1365 (-465) 48 → 39 Not run (CI-only)
x8316 587 → 439 (-148) 23 → 23 Not run (CI-only)
x8317 744 → 597 (-147) 19 → 19 Not run (CI-only)
x8318 1939 → 1488 (-451) 45 → 45 Not run (CI-only)
x8319 1927 → 1685 (-242) 17 → 15 Not run (CI-only)
x8320 0 → 0 (0) 0 → 0 Not run (CI-only)
x8321 1926 → 1708 (-218) 0 → 0 Not run (CI-only)
x8322 1697 → 1514 (-183) 50 → 50 Not run (CI-only)

x8310: extensions/device-pair/notify-cas.test.ts

x8311: src/config/io.cli-validation.integration.test.ts, src/config/io.factory.test.ts, src/config/io.health-state-scope.test.ts, src/config/io.paired-source-write.test.ts, src/config/io.runtime-authority.test.ts, src/config/io.runtime-snapshot-write.test.ts, src/config/io.snapshot.test.ts, src/config/io.write-preflight.test-support.ts

x8312: extensions/discord/src/send.permissions.authz.test.ts, extensions/discord/src/send.webhook.chunk-limit.test.ts, extensions/discord/src/send.webhook.proxy.test.ts, extensions/discord/src/shared-interactive.test.ts, extensions/discord/src/targets.test.ts, extensions/discord/src/voice-message.test.ts

x8313: src/gateway/portals/portal-http-proxy.test.ts, src/gateway/portals/portal-service.ingress.test.ts, src/gateway/portals/portal-service.test.ts, src/gateway/portals/portal.test-support.ts

x8314: extensions/voice-call/doctor-contract-api.test.ts, extensions/voice-call/index.call-scope.test.ts, extensions/voice-call/index.lifecycle.test.ts, extensions/voice-call/index.test-harness.ts, extensions/voice-call/index.test.ts

x8315: extensions/minimax/index.test.ts, extensions/minimax/oauth.test.ts, extensions/minimax/speech-provider.test.ts, extensions/minimax/tts.test.ts

x8316: src/agents/sessions/tools/read.test.ts

x8317: src/llm/providers/stream-wrappers/anthropic-family-tool-payload-compat.test.ts, src/llm/providers/stream-wrappers/openai-service-tier-observation.test.ts

x8318: src/commands/doctor/shared/stale-auth-order.test-support.ts, src/commands/doctor/shared/stale-auth-order.test.ts, src/commands/doctor/shared/stale-oauth-profile-shadows.test.ts, src/commands/doctor/shared/stale-plugin-config.test.ts

x8319: src/gateway/server.approval-forwarding.test.ts, src/gateway/server.auth.compat-baseline.test.ts, src/gateway/server.auth.hello-order.test.ts, src/gateway/server.sessions.create.auth-policy.test.ts, src/gateway/server.sessions.create.test-support.ts, src/gateway/server.sessions.reclamation.test.ts, src/gateway/server.talk-config.test.ts, src/gateway/server.talk-relay-history.test-support.ts

x8320: No retained files (skipped).

x8321: src/agents/test-helpers/live-cache-regression-runner.ts, src/agents/test-helpers/live-model-dynamic-candidates.ts, src/agents/test-helpers/prepared-model-catalog-oauth-fixture.ts, src/agents/test-helpers/prepared-model-catalog-worker-fixture.ts

x8322: extensions/qa-lab/src/live-transports/shared/credential-lease.runtime.test.ts, extensions/qa-lab/src/live-transports/shared/live-gateway.runtime.test.ts, extensions/qa-lab/src/live-transports/shared/live-transport-suite.runtime.test.ts

@clawsweeper

clawsweeper Bot commented Oct 19, 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 19, 2026 07:42
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 19, 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-19T08:05:22.231593Z 6e42c93 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.

@openclaw-barnacle openclaw-barnacle Bot added channel: discord Channel integration: discord channel: voice-call Channel integration: voice-call gateway Gateway runtime commands Command implementations agents Agent runtime and tooling extensions: device-pair extensions: minimax extensions: qa-lab size: XL labels Oct 19, 2026
@steipete
steipete disabled auto-merge October 19, 2026 07:48
@steipete
steipete force-pushed the tcr/land-d275-1792395390 branch from 49a2727 to 6e42c93 Compare October 19, 2026 07:59
@steipete
steipete enabled auto-merge (squash) October 19, 2026 07:59
@steipete
steipete disabled auto-merge October 19, 2026 08:11
@steipete
steipete enabled auto-merge (squash) October 19, 2026 08:11
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Oct 19, 2026
@clawsweeper

clawsweeper Bot commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

This PR consolidates test fixtures and cases across core and plugins and removes six obsolete mock-export baseline entries.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Useful consolidation supported by hosted tests, with one independently valuable regression lost.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored test/support cleanup changes no product entry point; hosted exact-head test and type-check evidence was inspected.
Patch quality 🦐 gold shrimp (3/6) 1 actionable review finding remain.

Product

Kind: Test only · Worth it: Yes · Fix scope: Complete
Reason: The maintainer-directed reduction removes repeated test setup while preserving production behavior.

Merge readiness

⛔ Needs changes before merge - 2 items remain

Keep open: this maintainer-directed cleanup is useful, but it removes one distinct portal exposure regression without equivalent coverage.

Priority: P3
Reviewed head: 3de96f37b272c74f843acfe99e24368a2f643e89

Before merge

  • Preserve the loopback-backed ingress exposure regression (P2) - The deleted portal-service case configured httpBindHosts: ["127.0.0.1"] together with ingress and asserted exposure.kind === "non-loopback". This replacement uses wildcardService(["0.0.0.0"]), so it still passes if the !ingress exception is removed from summarize: the configured hosts alone make the result non-loopback. No remaining exposure assertion covers the loopback-host-plus-ingress combination. This drops the distinct contract introduced by fix: portal previews report requesting-browser access failures #172366 and violates the repository's coverage-preservation requirement. Restore that focused case with the shared harness, or parameterize this assertion to include loopback configured hosts.
  • Explain or restore the original intent of Portal exposure regression - f4ba015: Distinguish externally exposed ingress from its loopback backend without claiming requesting-browser reachability.

Findings

  • [P2] Preserve the loopback-backed ingress exposure regression — src/gateway/portals/portal-service.ingress.test.ts:80

Provenance

  • Portal exposure regression changes intended behavior without addressing why it exists (f4ba015: Distinguish externally exposed ingress from its loopback backend without claiming requesting-browser reachability.)
Agent review details

How this fits together

Vitest suites feed synthetic configuration, credentials, and transport inputs through core and plugin owners, then assert observable results and lifecycle behavior.

flowchart LR
  A[Test fixtures] --> B[Shared test harnesses]
  B --> C[Core owners]
  B --> D[Plugin owners]
  C --> E[Observable results]
  D --> E
  E --> F[Regression assertions]
Loading

Technical review

Best possible solution:

Keep the shared fixtures and restore a focused loopback-backed ingress exposure case using the existing portal harness.

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

Removing the ingress exception would fail the deleted loopback-host case but pass its wildcard-host replacement; this is source-verifiable, and no tests were executed during this read-only review.

Is this the best way to solve the issue?

Fixture consolidation is appropriate, provided cases that exercise different branches of the public exposure contract remain independently detectable.

Full review comments:

  • [P2] Preserve the loopback-backed ingress exposure regression — src/gateway/portals/portal-service.ingress.test.ts:80
    The deleted portal-service case configured httpBindHosts: ["127.0.0.1"] together with ingress and asserted exposure.kind === "non-loopback". This replacement uses wildcardService(["0.0.0.0"]), so it still passes if the !ingress exception is removed from summarize: the configured hosts alone make the result non-loopback. No remaining exposure assertion covers the loopback-host-plus-ingress combination. This drops the distinct contract introduced by fix: portal previews report requesting-browser access failures #172366 and violates the repository's coverage-preservation requirement. Restore that focused case with the shared harness, or parameterize this assertion to include loopback configured hosts.
    Confidence: 0.96
    Late finding: first raised on code an earlier review cycle already covered.

Overall correctness: patch is incorrect
Overall confidence: 0.91

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Configuration write authority tests keeps the original intent (f6b64c3: Preserve the originating executor's authority through configuration finalization and reject revoked effects.)
  • Live cache regression runner keeps the original intent (6e6b4f6: Gate releases on provider cache floors across distinct cache lanes.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

Acceptance criteria:

  • pnpm test src/gateway/portals/portal-service.test.ts src/gateway/portals/portal-service.ingress.test.ts --maxWorkers=1
  • Verify in an isolated repair checkout that removing only the ingress exception from exposure classification fails the restored loopback-backed ingress case.
  • git diff --check

What I checked:

  • Pinned scope: The introduced diff changes tests, test support, and shrinking baseline metadata; no production implementation changes were found. (3de96f37b272)
  • Distinct ingress coverage lost: The deleted case configured loopback bind hosts plus ingress; its replacement asserts exposure with wildcard bind hosts, which cannot independently guard the ingress exception. (src/gateway/portals/portal-service.ingress.test.ts:80, 3de96f37b272)
  • Original regression intent: fix: portal previews report requesting-browser access failures #172366 introduced exposure facts to prevent agents treating allocated previews as reachable; its focused test explicitly distinguished configured ingress from a loopback backend. (src/gateway/portals/portal-service.test.ts, f4ba015f025c)
  • Current-main contract: Fetched main still exempts configured ingress from loopback-only classification and retains the original focused regression. Local blame encountered an unavailable historical blob; an exact-SHA GitHub contents read verified the current implementation. (src/gateway/portals/portal-service.ts:290, b1148769f5cc)
  • Exact-head validation: The inspected checks for this head include successful changed-test shards and type checks; PostgreSQL conformance shards 2 and 3 and openclaw/ci-gate remained pending at the last successful read. A later refresh was blocked by the network proxy. (3de96f37b272)
  • Policy applied: Root and applicable extensions, agents, and Gateway instructions were read, together with test-audit and pr-simplify guidance; the requirement to preserve distinct behavioral contracts applies to the removed ingress case. The maintainer-notes directory is absent. (AGENTS.md, 3de96f37b272)

Likely related people:

  • Peter Steinberger: Raw commit c3ea977 adds src/gateway/portals/portal-service.test.ts:10 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: c3ea9775ca7c; files: src/gateway/portals/portal-service.test.ts)
  • Vincent Koc: Raw commit a1c62fe adds src/config/io.runtime-authority.test.ts:15 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: a1c62fe5e46b; files: src/config/io.runtime-authority.test.ts)

PR surface

Tests -3544, Other -6. Total -3550 across 51 files. Added test files: 2.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 50 5812 9356 -3544
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 0 6 -6
Total 51 5812 9362 -3550

Review metrics

Metric Value Why it matters
Production versus test/support LOC Production +0/-0; tests/support +5,860/-9,438, net -3,578. Shared fixtures reduce duplication without production growth; the identified independent regression should survive that reduction.

Labels

Label changes:

  • add P3: This is internal test maintenance with a focused coverage repair and no changed runtime behavior.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🦐 gold shrimp.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Label justifications:

  • P3: This is internal test maintenance with a focused coverage repair and no changed runtime behavior.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed October 19, 2026, 4:30 AM ET / 08:30 UTC.

@steipete
steipete merged commit 8671ef2 into main Oct 19, 2026
137 of 139 checks passed
@steipete
steipete deleted the tcr/land-d275-1792395390 branch October 19, 2026 08:33
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 20, 2026
)

* test(discord): deslop x8312 tests

* test(discord): deslop x8312 tests

* test(device-pair): deslop x8310 tests

* test(device-pair): deslop x8310 tests

* test(device-pair): deslop x8310 tests

* test(voice-call): deslop x8314 tests

* test(voice-call): deslop x8314 tests

* test(config): deslop x8311 tests

* test(portals): deslop x8313 tests

* test(portals): deslop x8313 tests

* test(portals): deslop x8313 tests

* test(agents): deslop x8316 tests

* test(agents): deslop x8316 tests

* test(doctor): deslop x8318 tests

* test(llm): deslop x8317 tests

* test(llm): deslop x8317 tests

* test(minimax): deslop x8315 tests

* test(minimax): deslop x8315 tests

* test(agents): deslop x8321 tests

* test(agents): deslop x8321 tests

* test(agents): deslop x8321 tests

* test(qa-lab): deslop x8322 tests

* test(gateway): deslop x8319 tests

* test(gateway): deslop x8319 tests

* test(gateway): deslop x8319 tests

* test(config): deslop x8311 tests

* test(device-pair): preserve current notification lifecycle coverage

* test: repair batch d275 fixtures against current contracts

* test: prune obsolete mock export baseline entries
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling channel: discord Channel integration: discord channel: voice-call Channel integration: voice-call commands Command implementations extensions: device-pair extensions: minimax extensions: qa-lab gateway Gateway runtime P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: XL status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant