Skip to content

test(gateway,outbound,scripts): remove low-value tests (batch d203) - #164976

Merged
steipete merged 11 commits into
mainfrom
tcr/land-d203-1791124060
Oct 4, 2026
Merged

steipete merged 11 commits into
mainfrom
tcr/land-d203-1791124060

Conversation

@steipete

@steipete steipete commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

What Problem This Solves

Batch d203 consolidates repeated fixtures and test declarations across Gateway, outbound delivery, state/TUI, plugins, logging, and maintenance scripts, and removes redundant low-value cases.

User Impact

No user-visible behavior changes. Tests and exclusive test support shrink by 5,276 lines net. The only production/tooling change makes the release-checklist dispatch-output parser private; its internal caller remains and no external callers exist.

Why This Change Was Made

The retained tests own directive handling, destination authority, account isolation, database integrity, lifecycle cleanup, redaction, plugin migration, release provenance, and test/build routing. Repeated variants share tables and fixtures instead of maintaining parallel setup. This is a bounded replay of ten previously validated campaign commits onto current main.

All ten commits applied in the supplied order. No cherry-pick conflicts or skipped commits. Review retained the original CodeQL workflow/config security guard from v0028 rather than deleting it. A one-line selector inventory correction follows main commit bb5656b, which moved run.inherited-auth-owner.test.ts to the infra owner. Current main's YAML parser import is retained in the release-checklist tests. No paths in this diff match the current CODEOWNERS inventory.

Evidence

  • Local frozen installation, targeted oxfmt, plain oxlint, and git diff --check passed.
  • Focused Blacksmith Testbox proof covered all 21 touched test files. The initial tooling run found three stale inventory assertions after main moved an embedded-agent suite to infra; the one-line ownership correction passed all 438 tests in the two corrected script files.
  • Remaining core proof passed seven projects: 1,236 tests, three existing skips, including 313 additional cache-routing and CodeQL owner tests. The initial Docker-helper project passed 144 tests; the other ten tooling files passed before the ownership correction.
  • The full OPENCLAW_TESTBOX=1 changed-file gate passed (27 core/UI typecheck shards, scripts/root types, guards, targeted lint, and eight additional platform-test projects). The two post-review corrections also passed their targeted remote changed-file gate. Full gate remote command: 28m40s; correction gate: 6m51s.
  • Independent review accepted one finding: retain the CodeQL workflow/config security guard. The correction review completed with no actionable P0–P2 findings.
  • The eight rejected findings were checked against current source: the event listener accepts unknown; both Discord positions are defined in the same scope; default outbound targets remain in the shared suite; retry dedupe is leaf-independent with leafless admission separately covered; plugin resolution is synchronous and both provenance orders remain covered; the removed downgrade failure only tested fixture SQL plus test-issued rollback; backend stop restores mode/loggers; and the 300,000ms → "300" ingress timeout assertion remains.
  • Remote proof: focused/correction lease and changed gate lease. Both task-owned Testbox leases were stopped after proof. A final portal-sync warning did not change the successful command exit or completion receipt.
  • Hosted CI is the exact-head merge gate; auto-merge will be pinned to the published head.

Coverage below is historical in-shard before/after evidence, not a new whole-batch coverage measurement. All measured statement/branch losses stay within the campaign's 1% gate. These changes mainly consolidate declarations; they do not claim a 50% reduction in executed cases.

Per-shard files, LOC, declarations, and coverage

LOC and declaration counts describe each original shard comparison. Declarations count tables once; executed test cases are a different measure.

Shard Files Test LOC before → after Declarations before → after
v0020 src/gateway/server-methods/chat.directive-tags.test.ts 5782 → 5336 101 → 81
v0024 src/infra/outbound/{deliver,targets}.test.ts 6260 → 5446 177 → 117
v0029 test/scripts/{docker-build-helper,full-release-validation-at-sha}.test.ts 8251 → 8085 160 → 130
v0026 src/state/{openclaw-agent-db,openclaw-state-db}.test.ts; src/tui/embedded-backend.test.ts; src/tui/embedded-model-catalog.test-support.ts tests 12938 → 12200; support 245 → 207 tests 244 → 203; support 8 → 3
v0031 test/scripts/{mac-elevation-host,openclaw-cross-os-release-checks}.test.ts 6655 → 6221 178 → 142
v0030 test/scripts/{install-sh,kitchen-sink-rpc-walk}.test.ts 6393 → 5691 200 → 140
v0028 test/scripts/{ci-workflow-guards,crabbox-wrapper}.test.ts 14439 → 14131 250 → 175
v0032 test/scripts/{parallels-smoke-model,release-candidate-checklist}.test.ts; scripts/release-candidate-checklist.mts 5199 → 4880 (see baseline note) 174 → 119
v0033 test/scripts/{test-projects,tsdown-build}.test.ts 6019 → 5921 192 → 165
v0025 src/logging/redact.test.ts; src/plugins/{tools.optional,update}.test.ts 8791 → 7529 235 → 163

Original coverage report totals:

  • v0020: covered statements 6594 -> 6594 (0); branches 4930 -> 4930 (0); functions 1172 -> 1172 (0)
  • v0024: covered statements 4843 -> 4843 (0); branches 2876 -> 2876 (0); functions 834 -> 834 (0)
  • v0029: covered statements 586 -> 586 (0); branches 438 -> 438 (0); functions 73 -> 73 (0)
  • v0026: covered statements 6026 -> 6023 (-3); branches 3531 -> 3526 (-5); functions 1126 -> 1126 (0)
  • v0031: Statements: 1096 -> 1096; branches: 765 -> 761 (-0.5229%); functions: 226 -> 226.
  • v0030: covered statements 1159 -> 1159 (0); branches 807 -> 807 (0); functions 241 -> 241 (0)
  • v0028: covered statements 1175 -> 1175 (0); branches 689 -> 689 (0); functions 269 -> 269 (0)
  • v0032: covered statements 2376 -> 2377 (1); branches 1619 -> 1620 (1); functions 432 -> 432 (0)
  • v0033: covered statements 1833 -> 1828 (-5); branches 1411 -> 1400 (-11); functions 295 -> 292 (-3)
  • v0025: covered statements 6284 -> 6278 (-6); branches 4528 -> 4517 (-11); functions 1238 -> 1237 (-1)

Coverage limitations: v0032 uses the supplemental passing repair-only baseline after a separate YAML-import repair, not its initially failed/excluded group. That repair is already present on current main; the replay removes 320 test lines net while the pre-repair report says 319. v0033's helper excludes test-support files, including the selector owner scripts/test-projects.test-support.mts, so aggregate instrumentation does not prove unchanged selector coverage. Its measured drops are in managed-child-process and vitest-cache-slots. A separate source audit found the selector scenarios and assertions preserved; the one removed cache-layout case remains covered by vitest-cache-slots.test.ts, test-projects-routing.test.ts, and test-projects-build-admission.test.ts. v0030 counts become 208 → 144 when POSIX test aliases are included.

Current replay diff: tests +8,236/−13,474 (net −5,238); exclusive test support +64/−102 (net −38); production/tooling +1/−1 (net zero). Total 23 files, +8,301/−13,577.

@clawsweeper

clawsweeper Bot commented Oct 4, 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.

@steipete
steipete enabled auto-merge (squash) October 4, 2026 15:11
@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime scripts Repository scripts size: XL labels Oct 4, 2026
@steipete
steipete merged commit 9da00b0 into main Oct 4, 2026
126 of 127 checks passed
@steipete
steipete deleted the tcr/land-d203-1791124060 branch October 4, 2026 15:26
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 5, 2026
…penclaw#164976)

* test(gateway): deslop v0020 tests

* test(outbound): deslop v0024 tests

* test(scripts): deslop v0029 tests

* test(state,tui): deslop v0026 tests

* test(scripts): deslop v0031 tests

* test(scripts): deslop v0030 tests

* test(scripts): deslop v0028 tests

* test(scripts): deslop v0032 tests

* test(scripts): deslop v0033 tests

* test(plugins): deslop v0025 tests

* test: preserve security guard and current test routing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gateway Gateway runtime scripts Repository scripts size: XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant