Skip to content

test(gateway,cli,feishu): remove low-value tests (batch d409) - #179934

Merged
steipete merged 32 commits into
mainfrom
tcr/land-d409-1792618173
Oct 21, 2026
Merged

steipete merged 32 commits into
mainfrom
tcr/land-d409-1792618173

Conversation

@steipete

@steipete steipete commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Reduces duplicated test scaffolding and repeated owner-level proof across the gateway, Feishu, CLI, integration, scripts, node-host, and system-agent suites.

User Impact

No intended production behavior change. Retains distinct authority, lifecycle, persistence, and error-path coverage while sharing fixtures and consolidating sibling suites.

Why This Change Was Made

Replays the 30 authorized d409 campaign commits onto main at 6aff6172a02bf399c4eb9e973d3a765aabf80e94. All 30 applied; no complete commit skipped. Conflict resolutions deliberately omit outdated reductions where main has newer coverage.

Production code: +0/-0 LOC. Test and test-support code: +8,929/-15,097 LOC (net -6,168). Test routing, inventory, and baseline metadata: +0/-26 LOC. Total: +8,929/-15,123 LOC (net -6,194) across 162 files. No changed path matches the repository's current CODEOWNERS entries.

Evidence

CI-only validation: initial formatting and plain lint passed; after rebasing onto 9819d4db1c86ebab2afc1ebd404bbe09cd776b4a, node_modules/.bin/oxfmt --check <144 changed TS/JS files>, node_modules/.bin/oxlint -c .oxlintrc.json --no-ignore <144 changed TS/JS files>, and git diff --check 9819d4db1c86ebab2afc1ebd404bbe09cd776b4a all exited 0. All 32 commits were patch-identical across the rebase (git range-diff). No local Vitest, check-changed, typecheck, build, or Testbox run. Hosted openclaw/ci-gate supplies runtime proof.

Coverage totals: not available for every shard. Each source result explicitly states coverage/tests were not run under the campaign's CI-only rule. These are static source counts, not executed-test or coverage measurements. Declaration counts below use the campaign AST counter on changed test/support paths before and after this replay; table consolidation changes declaration counts without necessarily removing cases. Source reports also explicitly state that the 35% reduction target was not achieved.

Conflict resolutions

  • Kept main's extracted skills-refresh suite registration in config-reload.test.ts; did not restore the old inline suite.
  • Kept server.sessions.store-rpc.test.ts unchanged: proposed consolidation depended on fixture rewrites absent from current main.
  • Kept server.subagent-prompt-recent.gateway.test-support.ts unchanged, preserving main's heartbeat cleanup.
  • Combined subagent model fixture changes with main's cron disabling and existing agent defaults.
  • Kept monitor.vc-meeting-invited-handler.test.ts, its test routing, and baseline entries: main added bot-menu fallback/error cases.
  • Omitted the first transport-status fixture rewrite; later retired that file after confirming its four status cases are retained in monitor.webhook-e2e.test.ts.
  • Kept feishu-message-read-authority.integration.test.ts unchanged, preserving current live-directory and pagination coverage.
  • Kept help-cold-imports.test.ts, proxy-cli.runtime.test.ts, and qr-cli.test.ts unchanged to retain newer imports, query, and configuration cases.
  • Kept docker-e2e-plan.test.ts and native-app-i18n.test.ts unchanged: current admission/source and locale cases supersede the proposed consolidation.
  • Kept node-host launch-store, prepared-workspace, and supervisor-container test files unchanged, preserving current admission, setup-transfer, and recovery cases.
  • Kept gateway session-create accounts and authority test files unchanged; retained the other y0185 fixture reductions.

CI and independent review follow-up

The first hosted run exposed missing mock exports, one stale stream-helper caller, fixture type inference errors, a removed container-daemon delay, and Windows cleanup ordering changed by deferred mock restoration. Repaired the small mock/type/caller issues; dropped the container helper and Windows fence rewrites rather than changing their established behavior. Subsequent follow-up reviews found no actionable P0-P2 defects. A second CI run identified two mock-export baseline rows made stale by the repaired Feishu media and CLI globals mocks; removed exactly those rows, with a scoped-clean P0-P2 review.

Accepted two of the initial review's twelve findings: restored cron-show pagination and failed-upload snapshot cleanup by leaving those files unchanged. Dropped lint-suppression cleanup as well, leaving its failing baseline test unchanged.

Declined the other ten findings after inspecting source and remaining proof:

  • Attach recorder: no remaining consumer references the removed hasDeviceIdentityKey marker.
  • ApplySetup is still used by rejectsRecovery in operations.setup.test.ts.
  • Private config provenance remains protected by redact-snapshot.test.ts (valid/invalid snapshots) and server.config-security-policy.test.ts (real config.get path).
  • Update-time no-write refusal remains in doctor-config-preflight.refusal.process.test.ts, including byte-for-byte database/WAL/SHM/config preservation.
  • Repository mismatch remains in server.sessions.create-worktree-spawn.test.ts: keyed worktree creation reuses its recorded base after reopening the registry.
  • Captioned top-level files remain in bot.test.ts: delivers post files with caption to agent context.
  • CLI runtime routing, tool restrictions, cleanup, and session continuity remain in agent-turn.test.ts and assistant.configured.test.ts.
  • Same-sequence cursor siblings remain at the owning boundary in session-history-reads.test.ts for SQLite and reset archives.
  • Slack channel/thread metadata admission remains in actions.download-file.test.ts, including refreshed metadata.
  • Slack redirect token stripping and trust-plane rejection remain in monitor/media.test.ts.

Hourly main CI failed lint-suppressions.test.ts / keeps the intentional production suppression tail on an explicit allowlist, with the identical missing scripts/perf/provider-request-prepare-measure.ts|typescript/unbound-method|3 entry. Evidence: https://github.com/openclaw/openclaw/actions/runs/39679539559/job/119498590396 . Main fixed it in 9819d4db1c86ebab2afc1ebd404bbe09cd776b4a; the batch was rebased to include that fix. This PR changes neither that test nor the production perf file. Fresh-head CI remains the gate for all batch-related checks.

ClawSweeper's advisory review stopped before analysis at its input-safety scan. Its diagnostic identifies the synthetic config-redaction fixture in src/gateway/config-get-response.test.ts; fixture credentials use explicit synthetic canaries, generated UUIDs, and an example.test URL. No scanner policy or hold was changed. Independent local review completed, and the hosted Codex review of the previous head reported no findings.

Per-shard static deltas

Test/support LOC only; metadata listed separately above.

Shard Added Removed Net Declarations before → after Coverage
y0174 2083 3172 -1089 206 → 192 Not run (CI-only)
y0178 1136 1718 -582 28 → 28 Not run (CI-only)
y0176 1354 2067 -713 208 → 207 Not run (CI-only)
y0179 533 1162 -629 84 → 73 Not run (CI-only)
y0177 483 1377 -894 164 → 146 Not run (CI-only)
y0180 429 673 -244 162 → 155 Not run (CI-only)
y0182 208 429 -221 104 → 103 Not run (CI-only)
y0183 421 822 -401 174 → 169 Not run (CI-only)
y0186 395 675 -280 55 → 52 Not run (CI-only)
y0184 1708 2749 -1041 224 → 196 Not run (CI-only)
y0185 179 253 -74 55 → 55 Not run (CI-only)
Changed test and support files by shard

y0174

  • src/gateway/config-get-response.test.ts
  • src/gateway/config-reload.plugin-drain.test.ts
  • src/gateway/config-reload.services.test-support.ts
  • src/gateway/config-reload.test.ts
  • src/gateway/sessions-history-http-read.test-support.ts
  • src/gateway/sessions-history-http.model-policy.test.ts
  • src/gateway/sessions-history-http.physical-source.test.ts
  • src/gateway/sessions-history-http.revocation.test.ts
  • src/gateway/sessions-history-http.test.ts
  • src/gateway/sessions-patch.test.ts
  • src/gateway/sessions-resolve-projection.test.ts
  • src/gateway/sessions-resolve-store.test.ts
  • src/gateway/sessions-resolve.resident.test.ts
  • src/gateway/sessions-resolve.test.ts

y0178

  • src/gateway/server.sessions.title-source.test.ts
  • src/gateway/server.sessions.worker-placement-order.test.ts
  • src/gateway/server.silent-scope-upgrade-reconnect.poc.test.ts
  • src/gateway/server.startup-recovery-boundary.test.ts
  • src/gateway/server.startup-recovery-webchat.test.ts
  • src/gateway/server.startup-recovery.test-support.ts
  • src/gateway/server.subagent-announce-owner.product.test.ts
  • src/gateway/server.subagent-queued-cleanup.product.test.ts
  • src/gateway/server.subagent-stop-followup.product.test.ts
  • src/gateway/server.subagent-stop-settlement.product.test-support.ts
  • src/gateway/server.talk-caller-replay.test-support.ts
  • src/gateway/server.talk-consult-history.test.ts
  • src/gateway/server.talk-native-action.test-support.ts

y0176

  • extensions/feishu/src/bot-content.media.test.ts
  • extensions/feishu/src/bot-sender-name.test.ts
  • extensions/feishu/src/bot.bot-threads.test.ts
  • extensions/feishu/src/bot.broadcast.test-support.ts
  • extensions/feishu/src/bot.card-action.test.ts
  • extensions/feishu/src/bot.test.ts
  • extensions/feishu/src/monitor.acp-init-failure.lifecycle.test-support.ts
  • extensions/feishu/src/monitor.bot-identity.test.ts
  • extensions/feishu/src/monitor.bot-menu.lifecycle.test-support.ts
  • extensions/feishu/src/monitor.broadcast.reply-once.lifecycle.test-support.ts
  • extensions/feishu/src/monitor.card-action.lifecycle.test-support.ts
  • extensions/feishu/src/monitor.comment.test.ts
  • extensions/feishu/src/monitor.dedupe-lifecycle.test.ts
  • extensions/feishu/src/monitor.helpers.test.ts
  • extensions/feishu/src/monitor.lifecycle.test.ts
  • extensions/feishu/src/monitor.message-handler.ingress.test.ts
  • extensions/feishu/src/monitor.message-handler.test-support.ts
  • extensions/feishu/src/monitor.reaction.test.ts
  • extensions/feishu/src/monitor.startup.test.ts
  • extensions/feishu/src/monitor.transport-status.test-support.ts
  • extensions/feishu/src/monitor.webhook-e2e.test.ts
  • extensions/feishu/src/monitor.webhook-routing.test.ts
  • extensions/feishu/src/monitor.webhook.test-helpers.ts
  • extensions/feishu/src/reply-dispatcher.model-wait.test.ts
  • extensions/feishu/src/reply-dispatcher.streaming-backlog.test.ts
  • extensions/feishu/src/reply-dispatcher.test-support.ts
  • extensions/feishu/src/reply-dispatcher.test.ts

y0179

  • test/cron-message-read.integration.test.ts
  • test/decision-admission.test-support.ts
  • test/decision-levanto-admission.integration.test.ts
  • test/decision-subq-admission.integration.test.ts
  • test/decision-typesafe-admission.integration.test.ts
  • test/discord-metadata-read-authority.integration.test.ts
  • test/feishu-message-mutations.integration.test.ts
  • test/matrix-channel-read-authority.integration.test.ts
  • test/message-read-authority.test-support.ts
  • test/non-isolated-runner.test.ts
  • test/openai-model-discovery-auth-order.test.ts
  • test/slack-download-read-authority.integration.test.ts
  • test/subagent-announce-origin.integration.test.ts
  • test/subagent-progress-telegram-retirement.integration.test.ts
  • test/subagent-requester-owner.e2e.test.ts
  • test/test-env.test.ts

y0177

  • src/cli/admin-state-owner.process.test.ts
  • src/cli/agent-cli-recovery.process.test.ts
  • src/cli/agent-session-affinity.process.test.ts
  • src/cli/attach-cli.action.test.ts
  • src/cli/channel-auth.owner.integration.test.ts
  • src/cli/channel-auth.test.ts
  • src/cli/channels-cli.test.ts
  • src/cli/daemon-cli.coverage.test.ts
  • src/cli/daemon-cli.update-run.test.ts
  • src/cli/directory-cli.test.ts
  • src/cli/doctor-output.process.test.ts
  • src/cli/models-cli.test.ts
  • src/cli/native-hook-relay-cli.test.ts
  • src/cli/nodes-camera.test.ts
  • src/cli/nodes-cli.coverage.test.ts
  • src/cli/nodes-cli.plugin-registration.test.ts
  • src/cli/proxy-owner.test.ts
  • src/cli/resume-cli.test.ts

y0180

  • test/scripts/docker-build-helper.test.ts
  • test/scripts/docker-channel-promote.test.ts
  • test/scripts/docker-setup.test-support.ts
  • test/scripts/docker-setup.test.ts
  • test/scripts/test-env-mutation-report.test.ts
  • test/scripts/test-extension.test.ts
  • test/scripts/test-group-report.test.ts

y0182

  • test/scripts/database-worker-compat.test.ts
  • test/scripts/direct-run-entrypoints.test.ts
  • test/scripts/extension-test-plan.test.ts
  • test/scripts/kova-report-gate.test.ts
  • test/scripts/kova-workflow-evidence.test.ts
  • test/scripts/lint-status.test.ts
  • test/scripts/macos-native-test-launch.test.ts
  • test/scripts/pnpm-audit-prod.test.ts
  • test/scripts/testbox-base.test.ts

y0183

  • test/scripts/bundled-plugin-build-entries.test.ts
  • test/scripts/bundled-plugin-install-uninstall-probe.test.ts
  • test/scripts/docs-agent-workflow.test.ts
  • test/scripts/docs-dev.test.ts
  • test/scripts/docs-fixture.test-support.ts
  • test/scripts/docs-list.test.ts
  • test/scripts/docs-markdown.test.ts
  • test/scripts/docs-mirror-freshness.test.ts
  • test/scripts/docs-sync-publish.test.ts
  • test/scripts/live-docker-auth.test.ts
  • test/scripts/live-docker-stage.test.ts
  • test/scripts/mantis-publish-pr-evidence.test.ts
  • test/scripts/mantis-telegram-failure.test.ts
  • test/scripts/mantis-telegram-proof.test.ts
  • test/scripts/write-cli-startup-metadata.test.ts

y0186

  • src/node-host/node-worker-bundle-installer.test.ts
  • src/node-host/node-worker-supervisor.reboot.test.ts
  • src/node-host/node-worker-supervisor.recovery.test.ts
  • src/node-host/node-worker-transfer-client.encoding.test.ts
  • src/node-host/node-worker-transfer-client.fixture.test-support.ts
  • src/node-host/node-worker-transfer-client.git.test.ts
  • src/node-host/node-worker-transfer-client.test.ts

y0184

  • src/system-agent/chat-engine.test-support.ts
  • src/system-agent/chat-turn-router.approval.test.ts
  • src/system-agent/chat-turn-router.operations.test.ts
  • src/system-agent/chat-wizard-host.test.ts
  • src/system-agent/operations-parse.test.ts
  • src/system-agent/operations-setup-flows.test.ts
  • src/system-agent/operations.roles.test.ts
  • src/system-agent/operations.setup.test.ts
  • src/system-agent/operations.test.ts
  • src/system-agent/setup-app-recommendations.test.ts
  • src/system-agent/setup-apply.model-selection.test.ts
  • src/system-agent/setup-apply.test-harness.ts
  • src/system-agent/setup-apply.test.ts
  • src/system-agent/setup-inference-activate.openrouter-onboarding.test.ts
  • src/system-agent/setup-inference-activate.test-support.ts
  • src/system-agent/setup-inference-activate.test.ts
  • src/system-agent/setup-inference-auth-options.test.ts
  • src/system-agent/setup-inference-credentials.authority.test.ts
  • src/system-agent/setup-inference-credentials.lifecycle.test.ts
  • src/system-agent/setup-inference-error-reporting.test.ts
  • src/system-agent/setup-inference-provider-snapshot.test.ts
  • src/system-agent/setup-inference-utility.test.ts
  • src/system-agent/setup-native-runtime.test.ts

y0185

  • src/gateway/server.sessions.create.account-authority.test.ts
  • src/gateway/server.sessions.create.dispatch.test.ts
  • src/gateway/server.sessions.create.projects.test-support.ts
  • src/gateway/server.sessions.create.projects.test.ts
  • src/gateway/server.sessions.create.test-support.ts
  • src/gateway/server.sessions.create.titles.test.ts
  • src/gateway/server.sessions.create.worktree-selection.test.ts
  • src/gateway/server.sessions.create.worktrees.test.ts

@clawsweeper

clawsweeper Bot commented Oct 21, 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 21, 2026 21:38
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 21, 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-21T22:22:22.418304Z 4f781da 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 gateway Gateway runtime cli CLI command changes scripts Repository scripts channel: feishu Channel integration: feishu size: XL labels Oct 21, 2026
@steipete
steipete disabled auto-merge October 21, 2026 21:44
@steipete
steipete enabled auto-merge (squash) October 21, 2026 21:51
@steipete
steipete disabled auto-merge October 21, 2026 22:09
Consolidate resident resolution and plugin drain siblings into existing family owners. Remove duplicate owner-layer replays while retaining authority, publication, and lifecycle cases. Keep the existing Vitest project routing and prune deleted-file inventory entries.

CI-only validation: oxfmt, plain oxlint, and git diff --check. Shard LOC is 11626 to 10778 cumulatively; the 35 percent target remains unmet.
Factor repeated reload snapshots, plugin requests, environment setup, and callback counts. Share typed SSE reading and disposal across history tests, and reuse model and resolution fixture shapes without removing distinct cases.

CI-only static validation: oxfmt, plain oxlint, and diff-check pass. Shard LOC is 10529, down from 11626 originally; the 35 percent target remains unmet.
@steipete
steipete force-pushed the tcr/land-d409-1792618173 branch from 11f4253 to 4f781da Compare October 21, 2026 22:16
@steipete
steipete enabled auto-merge (squash) October 21, 2026 22:16
@steipete

Copy link
Copy Markdown
Contributor Author

The only test failure on head 4f781da603e1725c62c65504f0946a4adee27ff1 is checks-node-compact-small-4: test/scripts/ci-changed-node-test-plan.test.ts / “keeps more than 96 changed tests with E2E and plugin owners precise with canonical worker budgets.”

The same test also fails in the recent scheduled hourly main CI run: https://github.com/openclaw/openclaw/actions/runs/39671240295/job/119469909010 . That main run reports the worker-budget environment mismatch; this PR reports a plan-concurrency mismatch (expected 1, received 2) after incorporating main's newer serial-projection assertion. These are not claimed to be identical assertion messages.

This batch changes neither the failing test/support file nor its planner, shard-runner, runtime-placement implementations, or the selected cron/plugin/E2E/tsgo fixture files. The three removed protected-test inventory entries are unrelated CLI, gateway, and system-agent files, not members of that fixture. A fresh main fetch found no subsequent change to the failing test or planner implementations after this PR's rebased base 9819d4db1c86ebab2afc1ebd404bbe09cd776b4a.

All test jobs exercising this batch's changed files ran and passed. The stale baseline rows exposed by the earlier run were repaired and their check passed. Under the operator's campaign rule allowing the same failing test on recent scheduled main CI, this is the documented inherited-failure exception; no test assertion, timeout, skip, or gate was weakened.

@steipete
steipete merged commit 4b17ae2 into main Oct 21, 2026
152 of 155 checks passed
@steipete
steipete deleted the tcr/land-d409-1792618173 branch October 21, 2026 22:39
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 22, 2026
…aw#179934)

* test(gateway): deslop y0174 tests

* test(gateway): consolidate y0174 test families

Consolidate resident resolution and plugin drain siblings into existing family owners. Remove duplicate owner-layer replays while retaining authority, publication, and lifecycle cases. Keep the existing Vitest project routing and prune deleted-file inventory entries.

CI-only validation: oxfmt, plain oxlint, and git diff --check. Shard LOC is 11626 to 10778 cumulatively; the 35 percent target remains unmet.

* test(gateway): share y0174 lifecycle fixtures

Factor repeated reload snapshots, plugin requests, environment setup, and callback counts. Share typed SSE reading and disposal across history tests, and reuse model and resolution fixture shapes without removing distinct cases.

CI-only static validation: oxfmt, plain oxlint, and diff-check pass. Shard LOC is 10529, down from 11626 originally; the 35 percent target remains unmet.

* test(gateway): deslop y0178 tests

* test(gateway): consolidate y0178 test family

* test(gateway): share y0178 recovery fixtures

* test(feishu): deslop y0176 tests

* test(feishu): consolidate y0176 monitor families

* test(feishu): share remaining y0176 lifecycle fixtures

* test(integration): deslop y0179 tests

* test(integration): consolidate y0179 authority and catalog proof

* test(integration): remove y0179 duplicate owner proof

* test(cli): consolidate y0177 auth and command fixtures

* test(scripts): deslop y0180 tests

* test(scripts): consolidate y0180 duplicate owner proof

* test(scripts): consolidate y0180 fixture ownership

* test(scripts): deslop y0182 tests

* test(scripts): consolidate y0182 fixture and owner proof

* test(scripts): keep lockfile framing proof at its owner

* test(scripts): deslop y0183 tests

* test(scripts): consolidate y0183 fixtures and duplicate proof

* test(scripts): share y0183 locale and entry fixtures

* test(node-host): deslop y0186 tests

* test(node-host): consolidate y0186 family coverage

* test(node-host): share y0186 setup and capacity assertions

* test(system-agent): deslop y0184 tests

* test(system-agent): consolidate y0184 test families

* test(system-agent): fix merged activation snapshot reads

* test(system-agent): share y0184 family fixtures

* test(gateway): deslop y0185 tests

* test: preserve fixture contracts after campaign replay

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

Labels

channel: feishu Channel integration: feishu cli CLI command changes gateway Gateway runtime scripts Repository scripts size: XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant