Skip to content

test(runtime): remove low-value tests (batch d167) - #174199

Merged
steipete merged 33 commits into
mainfrom
tcr/land-d167-1792149289
Oct 17, 2026
Merged

steipete merged 33 commits into
mainfrom
tcr/land-d167-1792149289

Conversation

@steipete

@steipete steipete commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Reduces repeated test setup and low-value duplicate proof in the selected campaign batch, without a production behavior change.

User Impact

No user-visible change or migration. Production LOC: +0/-0. Current test/support LOC: +5197/-8393 (net -3196) across 41 files.

Why This Change Was Made

Consolidates fixtures, request setup, and repeated assertions while retaining distinct lifecycle, authority, ordering, and failure cases. This is batch d167, settled onto pinned main 2411716. The historical per-shard inventory below describes the earlier 49-file candidate; the settlement notes and current LOC above supersede it.

29 of 30 supplied commits were replayed. The x7076 commit (7c7677e34af1) was skipped because it depends on earlier fixture refactors absent from this batch. The entire x7094 six-file delta was subsequently dropped after formatter/source review exposed an incompatible partial mock refactor.

Conflict handling: kept main's expanded retry schedules, preview fallback cases, receipt identity cases, memory preflight pressure/identity/latch tests, embedding fallback cases, and hybrid ranking cases. Dropped the later overlapping ingress-queue/receipt rewrites, embedding/hybrid rewrites, final memory-index rewrite, and App SDK composed-resources delta rather than transplant stale fixture assumptions. Other nonconflicting cleanup remains. Fixed two stale media-payload type references exposed by that preservation.

CODEOWNERS: none of the changed paths match the current explicit CODEOWNERS entries.

Evidence

  • Frozen install completed with pnpm 12.10.1.
  • Changed-file oxfmt --write: passed.
  • Plain oxlint -c .oxlintrc.json on changed TypeScript files: exit 0.
  • git diff --check origin/main: passed.
  • Per operator CI-only rule, no local Vitest, check-changed, tsgo, coverage, or Testbox was run. Hosted openclaw/ci-gate is the runtime/typecheck merge proof.
  • The supplied shard reports explicitly say coverage was not run; they contain no coverage totals line. No coverage claim is made here. Historical report counts are not substituted for the rebased diff.
  • Independent review completed all 19 passes. Restored the prepared Mattermost dispatcher and result, custody database-target assertion, skipped-media failure fixture, and complete App SDK protocol scenario. Index-only findings were resolved by staging the already-restored working tree. Rejected the unused queueName finding because the same test uses it in its SQL query.
  • First hosted CI run 38898809523 exposed additional fixture-contract, assertion, and type errors. Restored the original settings-manager mock and dropped 17 incompatible file deltas; no assertion weakening or retries.
  • The second run, 38900390663, passed the retained batch test/typecheck jobs but failed unrelated baseline/max-lines checks. Fresh scheduled main 38902471699 passed those three checks; rebased onto its exact source. All 32 commits are patch-identical by git range-diff. Fresh-head PR CI remains the merge gate; no admin exception used.

Settlement

Read all four failed job logs from run 38904113368 once. The fatal failures were batch-caused, not the unrelated max-lines warnings:

  • Baseline ratchets: timeout-race in attempt-stream-finalize and changed closed mock factories in five files. Dropped those five cleanup deltas, restoring pinned main byte-for-byte: Mattermost directory, attempt-spawn-workspace support, attempt-stream-finalize, config runtime-schema, and hooks.early-failure. No baseline allowances or timeout changes.
  • Core lint 1: removed the redundant generic RPC forwarding helper, omitted absent clients from Promise.allSettled, and removed redundant void type arguments.
  • Core lint 2: removed the redundant void type argument in the nack coalescing test.
  • ci-gate: aggregate failure from the jobs above; fresh exact-head CI is required.

Rebase conflicts preserve main's expanded ingress claim/retry/resubmission coverage. Dropped overlapping cleanup in Mattermost client/draft-stream and Gateway health-state, retaining main's current contracts. Files previously dropped by the first lander remain at current main, including ingress restart, database recreation, private transcript, and row presentation coverage.

Plain oxlint and oxfmt passed on all 41 retained changed files; git diff --check passed. Settlement autoreview completed scoped-clean through P2 with no actionable findings. Existing batch review and its repaired findings remain recorded above. The pre-commit formatter passed using the supported installed tooling owner; no hooks were bypassed. No local tests/typechecks, Testbox, or AWS were used. No inherited-failure exception is claimed. Exact-head PR CI is the runtime/type proof.

Historical per-shard inventory of the earlier 49-file candidate

Counts below are static it/test call declarations (including table declarations), not expanded runtime cases. LOC is physical test/support lines. Coverage for every shard: not run under CI-only instructions.

x7087

LOC 2214 → 1657 (-557); declarations 9 → 9 (0).

  • src/agents/embedded-agent-runner/run/attempt-spawn-workspace.test-support.ts: LOC 1251 → 952; declarations 0 → 0.
  • src/agents/embedded-agent-runner/run/attempt-stream-custody.test-support.ts: LOC 235 → 205; declarations 0 → 0.
  • src/agents/embedded-agent-runner/run/attempt-stream-finalize.test.ts: LOC 728 → 500; declarations 9 → 9.

x7090

LOC 2919 → 2607 (-312); declarations 82 → 81 (-1).

  • src/channels/message/ingress-queue.test.ts: LOC 1096 → 1022; declarations 28 → 28.
  • src/channels/message/ingress-retry-policy.test.ts: LOC 304 → 259; declarations 10 → 10.
  • src/channels/message/lifecycle.test.ts: LOC 600 → 501; declarations 21 → 21.
  • src/channels/message/receipt.test.ts: LOC 268 → 255; declarations 10 → 10.
  • src/channels/message/ingress-queue.claim-ownership.test.ts: LOC 298 → 261; declarations 6 → 6.
  • src/channels/message/live-lifecycle.test.ts: LOC 353 → 309; declarations 7 → 6.

x7076

No retained delta (skipped or dropped).

x7097

LOC 2943 → 2465 (-478); declarations 68 → 61 (-7).

  • extensions/mattermost/src/mattermost/client.test.ts: LOC 539 → 487; declarations 23 → 18.
  • extensions/mattermost/src/mattermost/directory.test.ts: LOC 246 → 179; declarations 6 → 6.
  • extensions/mattermost/src/mattermost/draft-stream.test.ts: LOC 691 → 518; declarations 18 → 16.
  • extensions/mattermost/src/mattermost/model-picker.test.ts: LOC 296 → 215; declarations 9 → 9.
  • extensions/mattermost/src/mattermost/monitor.inbound-system-event.test.ts: LOC 1171 → 1066; declarations 12 → 12.

x7091

LOC 2608 → 2322 (-286); declarations 24 → 23 (-1).

  • src/gateway/server.chat-worktree-readiness.product.test.ts: LOC 645 → 557; declarations 1 → 1.
  • src/gateway/server.mcp-auth-login.forced-effects.test-support.ts: LOC 641 → 581; declarations 7 → 7.
  • src/gateway/server.sessions.create.account-authority.test.ts: LOC 645 → 574; declarations 15 → 14.
  • src/gateway/server.codex-failure-recovery.test.ts: LOC 677 → 610; declarations 1 → 1.

x7093

LOC 2615 → 2213 (-402); declarations 53 → 44 (-9).

  • src/gateway/server/event-loop-health.test.ts: LOC 503 → 445; declarations 16 → 14.
  • src/gateway/server/health-state.test.ts: LOC 500 → 358; declarations 12 → 9.
  • src/gateway/server/hooks.early-failure.test.ts: LOC 923 → 798; declarations 15 → 12.
  • src/gateway/server/client-presence.test.ts: LOC 469 → 417; declarations 9 → 8.
  • src/gateway/server/connection.test.ts: LOC 220 → 195; declarations 1 → 1.

x7098

LOC 3934 → 3011 (-923); declarations 108 → 93 (-15).

  • src/auto-reply/dispatch.delivery-order.test.ts: LOC 508 → 379; declarations 7 → 7.
  • src/auto-reply/fallback-state.test.ts: LOC 409 → 301; declarations 11 → 8.
  • src/auto-reply/heartbeat-filter.test.ts: LOC 469 → 339; declarations 16 → 16.
  • src/auto-reply/inbound.test.ts: LOC 496 → 364; declarations 27 → 25.
  • src/auto-reply/media-note.test.ts: LOC 348 → 274; declarations 15 → 10.
  • src/auto-reply/dispatch.question-input.test.ts: LOC 347 → 260; declarations 3 → 2.
  • src/auto-reply/inbound-debounce.test.ts: LOC 510 → 471; declarations 17 → 16.
  • src/auto-reply/reply.triggers.trigger-handling.e2e.test.ts: LOC 847 → 623; declarations 12 → 9.

x7092

LOC 2493 → 2107 (-386); declarations 5 → 5 (0).

  • src/gateway/server.node-result-close.test.ts: LOC 504 → 375; declarations 2 → 2.
  • src/gateway/server.requester-pause-authority.test.ts: LOC 499 → 420; declarations 1 → 1.
  • src/gateway/server.agent-runtime-authority-proof.test-support.ts: LOC 500 → 467; declarations 0 → 0.
  • src/gateway/server.chat-abort-sibling-fanout.test.ts: LOC 485 → 426; declarations 1 → 1.
  • src/gateway/server.sessions.worker-original-order.test.ts: LOC 505 → 419; declarations 1 → 1.

x7094

No retained delta (skipped or dropped).

x7096

LOC 1327 → 1238 (-89); declarations 34 → 34 (0).

  • extensions/memory-core/src/memory/index.test.ts: LOC 1327 → 1238; declarations 34 → 34.

x7099

LOC 3933 → 2994 (-939); declarations 138 → 126 (-12).

  • src/config/paths.test.ts: LOC 479 → 340; declarations 25 → 24.
  • src/config/plugin-auto-enable.channels.test.ts: LOC 421 → 351; declarations 12 → 11.
  • src/config/plugin-auto-enable.core.test.ts: LOC 810 → 666; declarations 30 → 26.
  • src/config/plugin-auto-enable.providers.test.ts: LOC 313 → 212; declarations 11 → 9.
  • src/config/redact-snapshot.test.ts: LOC 626 → 468; declarations 26 → 22.
  • src/config/runtime-schema.test.ts: LOC 622 → 479; declarations 10 → 10.
  • src/config/schema.test.ts: LOC 662 → 478; declarations 24 → 24.

x7100

LOC 2728 → 2669 (-59); declarations 32 → 32 (0).

  • src/gateway/session-row-event-ancestor-placement.test.ts: LOC 251 → 241; declarations 1 → 1.
  • src/gateway/session-row-event-parity.test.ts: LOC 409 → 396; declarations 1 → 1.
  • src/gateway/session-row-placement-projection.lifecycle.test.ts: LOC 434 → 406; declarations 6 → 6.
  • src/gateway/session-row-prepared-read.test.ts: LOC 613 → 610; declarations 12 → 12.
  • src/gateway/session-row-projection.accepted-facts.test.ts: LOC 1021 → 1016; declarations 12 → 12.

@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.

@steipete
steipete enabled auto-merge (squash) October 16, 2026 12:11
@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-17T10:36:47.680208Z d0e7720 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: mattermost Channel integration: mattermost gateway Gateway runtime extensions: memory-core Extension: memory-core agents Agent runtime and tooling size: XL labels Oct 16, 2026
@steipete
steipete force-pushed the tcr/land-d167-1792149289 branch from 5525139 to 210f3ea Compare October 16, 2026 12:56
@steipete
steipete force-pushed the tcr/land-d167-1792149289 branch from 210f3ea to d0e7720 Compare October 17, 2026 10:33
@steipete
steipete merged commit 4aa7b50 into main Oct 17, 2026
118 checks passed
@steipete
steipete deleted the tcr/land-d167-1792149289 branch October 17, 2026 11:04
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 18, 2026
* test(agents): deslop x7087 tests

* test(agents): deslop x7087 tests

* test(agents): deslop x7087 tests

* test(channels): deslop x7090 tests

* test(channels): deslop x7090 tests

* test(channels): deslop x7090 tests

* test(mattermost): deslop x7097 tests

* test(mattermost): deslop x7097 tests

* test(mattermost): deslop x7097 tests

* test(gateway): deslop x7091 tests

* test(gateway): deslop x7091 tests

* test(gateway): deslop x7091 tests

* test(gateway): deslop x7093 tests

* test(gateway): deslop x7093 tests

* test(gateway): deslop x7093 tests

* test(auto-reply): deslop x7098 tests

* test(auto-reply): deslop x7098 tests

* test(gateway): deslop x7092 tests

* test(gateway): deslop x7092 tests

* test(gateway): deslop x7092 tests

* test(auto-reply): deslop x7094 tests

* test(auto-reply): deslop x7094 tests

* test(auto-reply): deslop x7094 tests

* test(memory-core): deslop x7096 tests

* test(memory-core): deslop x7096 tests

* test(memory-core): deslop x7096 tests

* test(config): deslop x7099 tests

* test(config): deslop x7099 tests

* test(gateway): deslop x7100 tests

* test: preserve current-main contracts in batch d167

* test(agents): retain the complete settings fixture contract

* test: drop cleanup hunks incompatible with current contracts

* test: repair d167 lint and preserve ratcheted 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 channel: mattermost Channel integration: mattermost extensions: memory-core Extension: memory-core gateway Gateway runtime size: XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant