Skip to content

test(gateway, browser, agents): remove low-value tests (batch d093) - #160892

Merged
steipete merged 11 commits into
mainfrom
tcr/land-d093-1790640444
Sep 29, 2026
Merged

steipete merged 11 commits into
mainfrom
tcr/land-d093-1790640444

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Batch d093 removes repetitive tests and duplicated fixtures whose maintenance cost exceeds their additional behavioral coverage.

User Impact

There is no production behavior change. The batch reduces test maintenance while retaining authority, cancellation, isolation, migration, and real-SDK regression coverage. Production code is unchanged.

Why This Change Was Made

Replay ten previously validated campaign shards onto current main, consolidate overlapping cases and fixtures, delete redundant split test files, and remove two stale max-lines entries.

All ten commits applied; none skipped. Two replay conflicts were resolved:

  • t0140: keep main's rewritten service.agent-attribution.test.ts in full, including the newer real-SDK setup/cleanup; drop the campaign's deletion of that file.
  • t0142: keep main's explicit Promise-constructor rendezvous semantics inside the consolidated pauseAtBoundary helper. Preserve cancellation and authority assertions.

Replay compatibility repair: use the existing typed createDeferred helper for seven browser fixture rendezvous calls under current main's ES2023 types. This adds two test lines; the per-shard table below describes the ten replay commits before that repair.

No changed path matches the repository's current CODEOWNERS rules.

Evidence

  • pnpm install --frozen-lockfile --prefer-offline: passed locally and on Blacksmith Testbox.
  • Changed-file oxfmt, plain oxlint -c .oxlintrc.json, and git diff --check: passed.
  • Blacksmith Testbox focused proof on head 2f7f3c3f60254d24bbf91aeb61d0d36b30f5fa69: 972 tests passed across 51 files, zero skips, nine routed Vitest shards in 116.78 seconds. Selection includes every surviving changed test and the retained OTEL agent-attribution and Gateway transcript tests. Lease tbx_01m3n92tyfgjx44wgq6d61500c; wrapper exit 0; stopped.
  • CRABBOX_PROVIDER=blacksmith-testbox OPENCLAW_TESTBOX=1 node scripts/check-changed.mjs -- <all 61 changed paths>: passed on Blacksmith Testbox, including all core/plugin test typechecks, boundaries, ratchets, dead exports, and lint. Run 36508087169, lease tbx_01m3ncegjhgg6y59t358mmnv7a, command exit 0; stopped automatically. The backing Actions run can show cancelled because Blacksmith stops the delegated session after success. Nonblocking warnings only; no pre-existing-failure exemption used.
  • Independent autoreview completed four passes. Four findings were rejected after checking current source: both reported unused symbols have retained callers; installModelsConfigTestHooks already clears runtime/config/readiness state after each case; the screenshot path invokes the mocked image-description dependency without a media-model configuration gate. The questioned screenshot tests also passed in the focused run. No accepted actionable findings remain.
  • An initial unused Testbox lease was stopped before tests after the ES2023 fixture repair; its interrupted source preparation is not counted as test evidence.

Historical shard coverage below is the original in-shard comparison, not a new coverage measurement of this replay. Statement and branch drops satisfy the campaign's 1% gates. t0127 excluded two baseline-failed dashboard files from its comparison; the source lane separately repaired their fixture, and this batch preserves main's current dashboard helper. Historical max-lines failures in several shard reports are not treated as proof of any current-main failure.

LOC split against the replay base: production +0/-0; tests +8,547/-30,551 (net -22,004); test support +0/-2; baseline configuration +0/-2. Total net reduction: 22,008 lines.

Declaration counts below count syntactic line-leading it/test calls, including one declaration per parameterized table; they are distinct from executed test-case counts. LOC and declarations are measured on each replayed commit, while coverage is quoted from its original shard report.

Shard Test/support LOC + / - (net) Declarations before → after (delta)
t0149 +327/-3415 (-3088) 165 → 81 (-84)
t0126 +1988/-4806 (-2818) 186 → 91 (-95)
t0140 +571/-2909 (-2338) 172 → 102 (-70)
t0145 +225/-1222 (-997) 40 → 18 (-22)
t0147 +904/-3161 (-2257) 80 → 46 (-34)
t0142 +1009/-3148 (-2139) 170 → 131 (-39)
t0151 +701/-3455 (-2754) 164 → 85 (-79)
t0127 +274/-791 (-517) 85 → 67 (-18)
t0130 +1457/-5098 (-3641) 181 → 94 (-87)
t0144 +1088/-2547 (-1459) 95 → 47 (-48)
Per-shard files and original coverage totals

t0149

  • src/gateway/config-reload.test.ts

Original report: covered statements 1017 -> 1016 (-1); branches 645 -> 643 (-2); functions 153 -> 153 (0)

t0126

  • extensions/browser/src/browser-tool.dashboard.test.ts
  • extensions/browser/src/browser-tool.schema.test.ts
  • extensions/browser/src/browser-tool.tabs.test.ts
  • extensions/browser/src/browser-tool.test.ts

Original report: covered statements 1299 -> 1300 (1); branches 1231 -> 1219 (-12); functions 213 -> 213 (0)

t0140

  • extensions/diagnostics-otel/src/service.event-loop.test.ts
  • extensions/diagnostics-otel/src/service.gateway-rpc.test.ts
  • extensions/diagnostics-otel/src/service.otlp-export.test.ts
  • extensions/diagnostics-otel/src/service.restart.test.ts
  • extensions/diagnostics-otel/src/service.test.ts

Original report: Coverage passed: statements 1,706 → 1,704 (−2); branches 1,314 → 1,303 (−11, 0.84%); functions 260 → 259. No excluded groups or file losing more than five statements.

t0145

  • src/agents/models-config.root-authorship.test.ts
  • src/agents/models-config.runtime-source-snapshot.test.ts
  • src/agents/models-config.skips-writing-models-json-no-env-token.test.ts
  • src/agents/models-config.uses-first-github-copilot-profile-env-tokens.test.ts
  • src/agents/models-config.write-serialization.test.ts

Original report: covered statements 1559 -> 1556 (-3); branches 931 -> 927 (-4); functions 300 -> 299 (-1)

t0147

  • config/max-lines-baseline.txt
  • src/acp/control-plane/manager.reset-options.test.ts
  • src/acp/control-plane/manager.runtime-config-validation.test.ts
  • src/acp/control-plane/manager.runtime-config.test.ts
  • src/acp/control-plane/manager.runtime-handles.test.ts
  • src/acp/control-plane/manager.runtime-resume-state.test.ts
  • src/acp/control-plane/manager.startup-identity-reconcile.test.ts
  • src/acp/control-plane/manager.test.ts

Original report: Coverage: statements 1,449 → 1,446 (−0.21%); branches 939 → 933 (−0.64%); functions 304 → 302. Gate passed; no exclusions or drops exceeding five statements.

t0142

  • config/max-lines-baseline.txt
  • extensions/browser/src/browser/pw-session.assert-navigation-safety.test.ts
  • extensions/browser/src/browser/pw-session.connections.test.ts
  • extensions/browser/src/browser/pw-session.create-page.navigation-guard.test.ts
  • extensions/browser/src/browser/pw-session.create-page.ownership.test.ts
  • extensions/browser/src/browser/pw-session.dialogs.test.ts
  • extensions/browser/src/browser/pw-session.enumeration.test.ts
  • extensions/browser/src/browser/pw-session.get-page-for-targetid.test.ts
  • extensions/browser/src/browser/pw-session.page-cdp.test.ts
  • extensions/browser/src/browser/pw-session.pinned-transport.test.ts
  • extensions/browser/src/browser/pw-session.termination-cdp-ssrf.test.ts
  • extensions/browser/src/browser/pw-session.test.ts

Original report: Coverage: statements 1,812 → 1,811; branches 888 → 887; functions 313 → 313. Both 1% gates passed. Only pw-session-connection.ts dropped coverage: one statement and one branch.

t0151

  • src/commands/doctor/shared/legacy-config-migrate.provider-shapes.test.ts
  • src/commands/doctor/shared/legacy-config-migrate.test.ts
  • src/commands/doctor/shared/legacy-config-migrate.validation.test.ts

Original report: Coverage: statements 2,659 → 2,678 (+19); branches 1,902 → 1,900 (−0.11%); functions 489 → 497 (+8). No excluded groups or per-file statement losses.

t0127

  • extensions/browser/src/browser/routes/agent.act.existing-session-navigation-guard.test.ts
  • extensions/browser/src/browser/routes/agent.act.normalize.batch-contract.test.ts
  • extensions/browser/src/browser/routes/agent.act.normalize.test.ts
  • extensions/browser/src/browser/routes/agent.existing-session.test.ts

Original report: Coverage: statements 1,443 → 1,443; branches 983 → 982; functions 205 → 205. Gate passed. Only the duplicate middle-button parser branch dropped; no statements dropped. The two baseline-failed dashboard files were excluded from comparison.

t0130

  • src/agents/model-fallback.chain-stop.test.ts
  • src/agents/model-fallback.live-switch.test.ts
  • src/agents/model-fallback.personal-cooldown.test.ts
  • src/agents/model-fallback.probe.test.ts
  • src/agents/model-fallback.quota-recovery.test.ts
  • src/agents/model-fallback.terminal-boundary.test.ts
  • src/agents/model-fallback.test-support.ts
  • src/agents/model-fallback.test.ts

Original report: Coverage: statements 4058 → 4047 (−0.27%); branches 3254 → 3225 (−0.89%); functions 779 → 778. Both groups passed; none excluded.

t0144

  • src/agents/models-config.providers.auth-provenance.test.ts
  • src/agents/models-config.providers.catalog-context.test.ts
  • src/agents/models-config.providers.endpoint.test.ts
  • src/agents/models-config.providers.implicit.discovery-scope.test.ts
  • src/agents/models-config.providers.implicit.outcomes.test.ts
  • src/agents/models-config.providers.normalize-keys.test.ts
  • src/agents/models-config.providers.nvidia.test.ts
  • src/agents/models-config.providers.policy.lookup.test.ts
  • src/agents/models-config.providers.runtime-headers.test.ts
  • src/agents/models-config.providers.secrets.bedrock-apikey.test.ts
  • src/agents/models-config.providers.vercel-ai-gateway.test.ts
  • src/agents/models-config.replace-mode-skip-implicit-discovery.test.ts

Original report: Coverage: statements 2,159 → 2,154 (−0.23%); branches 1,597 → 1,587 (−0.63%); functions 437 → 434. Both groups valid; no file lost more than five statements.

@clawsweeper

clawsweeper Bot commented Sep 29, 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.

@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime extensions: diagnostics-otel Extension: diagnostics-otel commands Command implementations agents Agent runtime and tooling extensions: browser size: XL labels Sep 29, 2026
@steipete
steipete enabled auto-merge (squash) September 29, 2026 02:11
@steipete
steipete disabled auto-merge September 29, 2026 02:17
Port t0127 while preserving the lane version of dashboard-ownership.test-support.ts, including its newer profile-selection hook.

Validation: Testbox passed 77 tests across 3 files with no skips from fresh origin/main plus the five resolved shard paths. Oxlint exited 0; oxfmt, whitespace checks, and independent review passed.
@steipete
steipete force-pushed the tcr/land-d093-1790640444 branch from 2f7f3c3 to 46c40b1 Compare September 29, 2026 02:29
@steipete
steipete enabled auto-merge (squash) September 29, 2026 02:32
@steipete
steipete merged commit 8dd42cb into main Sep 29, 2026
201 checks passed
@steipete
steipete deleted the tcr/land-d093-1790640444 branch September 29, 2026 02:39
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 29, 2026
…penclaw#160892)

* test(gateway): deslop t0149 tests

* test(browser): deslop t0126 tests

* test(diagnostics-otel): deslop t0140 tests

* test(models): deslop t0145 tests

* test(acp): deslop t0147 tests

* test(browser): deslop t0142 tests

* test(doctor): deslop t0151 tests

* test(browser): deslop t0127 tests

Port t0127 while preserving the lane version of dashboard-ownership.test-support.ts, including its newer profile-selection hook.

Validation: Testbox passed 77 tests across 3 files with no skips from fresh origin/main plus the five resolved shard paths. Oxlint exited 0; oxfmt, whitespace checks, and independent review passed.

* test(agents): deslop t0130 tests

* test(agents): deslop t0144 tests

* test(browser): use typed deferred helper in reduced fixtures
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling commands Command implementations extensions: browser extensions: diagnostics-otel Extension: diagnostics-otel gateway Gateway runtime size: XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant