Skip to content

test(scripts,channels,sessions): remove low-value tests (batch d398) - #179649

Merged
steipete merged 26 commits into
mainfrom
tcr/land-d398-1792596595
Oct 21, 2026
Merged

steipete merged 26 commits into
mainfrom
tcr/land-d398-1792596595

Conversation

@steipete

@steipete steipete commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Reduces repeated test setup and overlapping assertions in batch d398 while retaining the current main contracts.

User Impact

No intended runtime behavior change. The replay changes tests, test support, and shrink-only test metadata; production code is unchanged.

Why This Change Was Made

Consolidates sibling coverage and fixtures across scripts/release, Telegram, Feishu, update handoff, session storage, gateway sessions, and auto-reply. Initially replayed onto pinned main d19785dd6b93054c5b59b01749a5bb1a1750a60f, then rebased onto b5aa29b1ed0fcef44ec2367dd03eb2239e55511f to incorporate newer send-denial coverage; 19 of the 30 supplied commits were applied, with 11 skipped where the current test/fixture contracts diverged.

Evidence

  • pnpm install --frozen-lockfile --prefer-offline: passed.
  • node_modules/.bin/oxfmt --write <changed existing files>: passed.
  • node_modules/.bin/oxlint -c .oxlintrc.json <changed TS/JS files>: exit 0 after removing two unused maturity helpers.
  • git diff --check b5aa29b1ed0fcef44ec2367dd03eb2239e55511f: passed.
  • CI-only validation: no local Vitest, typecheck, check-changed, coverage, or Testbox runs. Hosted openclaw/ci-gate is the runtime/type gate. No Testbox lease was created.
  • Independent review: three full-candidate rounds produced 18 accepted findings, and PR review identified two additional lost Telegram dispatch contracts. All 20 findings were accepted and resolved by restoring affected complete files and paired suites/routing. None were rejected. Scoped correction reviews found no actionable P0–P2 findings.
  • Final diff: tests/support +3448/-5588 lines; metadata +0/-9; production +0/-0. Net reduction: 2,149 lines.
  • No changed paths match current CODEOWNERS rules.

The source shard reports explicitly say coverage was not run under CI-only mode. They contain no measured coverage totals, so no <=1% coverage claim is made. Their original counts below are historical source-shard counts, not measurements of this rebased PR. Runtime and CI timings will come from hosted CI.

Replay decisions

Whole commits skipped:

  • e8088f3fbe364 y0063: bot-thread/DM sibling merge conflicts with newer history/thread fixtures.
  • ecc4082f055cf y0066: memory sibling merge conflicts with newer preflight and memory fixtures.
  • 1bb032f5e1336 y0068: worktree sibling merge conflicts across current branch, canonical-path, acceleration, pending-slot and provisioned coverage.
  • 1af5c61e2daf1, 353e7114f922e y0067: Feishu family/owner merges depend on divergent chat, channel, streaming, send and account fixtures.
  • 361dd6dd4f26b, 71c554d924493, 8925c8a180e5b y0070: current ACP custody/abort/owner contracts diverged; entire family preserved.
  • d18d826de745c y0071: current selection and patch-authority fixtures diverged.
  • 0837791299adc, eb85e94248fe0 y0072: budget, compaction, owner-parity and model-context fixtures diverged; entire family preserved.

Partial replay decisions:

  • y0064: retained the maturity renderer consolidation using the current invocation owner; removed two unused assertion helpers. Dropped the package-candidate fixture hunk, preserving main's current helper/API shape.
  • y0063: preserved main's added DM-history and explicit-reply tests in the prompt-context conflict.
  • y0065: left release-plan-producer unchanged in both overlapping commits, preserving newer candidate-metadata and publication-authority coverage.
  • y0066: dropped all memory-family changes in the first commit; dropped memory and question-recovery changes in the final commit. The earlier clean question-recovery fixture cleanup remains.
  • y0067: left chat and streaming-card unchanged in the first commit, preserving current delivery failure contracts.
  • y0069: preserved the automatic-transfer failure campaign tests; omitted an unused custody fixture helper while retaining the original-owner suite consolidation.
  • y0073: left search, typing, and search-scope files unchanged where fixture shapes diverged.

No baseline conflict required broadening a baseline; metadata removals are shrink-only.

Review and CI corrections

The initial CI run (39627619284) exposed batch-caused fixture/runtime/type/lint failures. Logs were fetched once per failed job and reused. Corrections did not use retries, timeout increases, skips, or weaker assertions.

  • Restored current main's memory-dependent pending-input and accounting fixtures, Telegram reply-target/history/progress families, cold-restoration tests, release-finalization pair, and desktop-readiness pair and routing.
  • Restored retention and suggestion test families rather than adapting incompatible database connection callbacks.
  • Restored dependency approval authorization, archive-byte integrity, pinned-reader WAL, secret freshness, text/media dedupe, command transcript, DM topic, sticker carrier, rollback, sentinel revision-floor, default desktop staging, release artifact mapping, and performance publication opt-out proof.
  • Restored release-preflight's disposable-fixture tests; this also removes the reported type-aware sort lint failures.
  • Added the missing node:assert/strict import in the consolidated command-custody suite. The ingress test now directly narrows its admission union and awaits the resolver's real asynchronous result.
  • Restoring the archive-pruning suite also preserves its original timeout-race baseline count, so no baseline loosening was needed.
  • 89378a1d6a970 was replayed but now has no retained diff after restoring both cold-restoration publication files.
  • Restored the final-delivery lifecycle suite in response to both PR review findings: native-question dispatch during progress streaming (including registration, finalization, and rejected buttons), and non-fatal post-send recording failure. Its reasoning cases remain covered in the restored progress-card suite.

The second CI run (39631847031) and third run (39634640360) exposed the remaining Telegram ingress-fixture failure: unknown audit evidence. The original explicit live host owner, enabled admission audit, and context builder are retained. Source inspection showed the resolver really returns a Promise; restored await and replaced assertion-only union narrowing with an explicit rejected-admission guard. The targeted repair passed independent review with no actionable P0–P2 findings. Both evidence assertions and cleanup remain intact.

The later changed-extensions CI job identified stale texts and waitForContaining references in send-denial cases added to main after the initial base. Rebased onto b5aa29b1ed0fc without conflicts and switched those three references to the shared HTTP fixture methods. All eight send-denial cases and assertions remain intact.

The final repair diffs are reviewed; fresh-head hosted CI is required before merge. No old-head failures are claimed pre-existing or waived.

Per-shard final diff counts and source-report evidence

Final counts cover only changed test/support files, including deleted files. Declarations are static call-site estimates for it/test/itUnix, not expanded runtime cases.

Shard Changed test/support files LOC before → after Declaration estimate before → after
y0063 11 4652 → 4524 84 → 81
y0064 5 2391 → 2262 35 → 34
y0065 14 4114 → 3675 96 → 90
y0066 7 3191 → 3056 50 → 47
y0067 14 6112 → 5578 148 → 134
y0068 4 2017 → 1960 32 → 32
y0069 14 4173 → 4150 93 → 93
y0070 0 0 → 0 0 → 0
y0071 8 4801 → 4628 78 → 78
y0072 0 0 → 0 0 → 0
y0073 11 5673 → 5151 102 → 97

y0063

Source report totals: 11,593 → 11,481 LOC; declarations 195 → 194; expanded cases 299 → 298. Coverage: not run (CI-only).

  • extensions/telegram/src/bot-handlers.inbound-authorization.test.ts
  • extensions/telegram/src/bot-message-avatar.test.ts
  • extensions/telegram/src/bot-message-dispatch.fallback-topic-media.test.ts
  • extensions/telegram/src/bot-message-dispatch.preview.telegram-http.test.ts
  • extensions/telegram/src/bot-message-dispatch.recovery.telegram-http.test.ts
  • extensions/telegram/src/bot-message-dispatch.telegram-http.test-support.ts
  • extensions/telegram/src/bot-native-command-dispatch.delivery.test.ts
  • extensions/telegram/src/bot-native-command-login.test.ts
  • extensions/telegram/src/bot-native-command-menu-sync.test.ts
  • extensions/telegram/src/bot.create-telegram-bot.channel-post-media.test.ts
  • extensions/telegram/src/bot.create-telegram-bot.disabled-bindings.test.ts

y0064

Source report totals: 11,513 → 11,387 LOC; declarations 274 → 271; expanded cases 432 → 432. Coverage: not run (CI-only).

  • test/scripts/gateway-ws-client.test.ts
  • test/scripts/render-maturity-docs.test.ts
  • test/scripts/setup-pnpm-store-cache-image.test.ts
  • test/scripts/update-first-hop-package-fixtures.test.ts
  • test/scripts/validate-release-publish-approval.test.ts

y0065

Source report totals: 11,151 → 10,837 LOC; declarations 242 → 238; expanded cases 479 → 479. Coverage: not run (CI-only).

  • test/scripts/release-check.test.ts
  • test/scripts/release-clawhub-children.test.ts
  • test/scripts/release-inventory-paths.test-support.ts
  • test/scripts/release-plan-contract.test.ts
  • test/scripts/release-plugin-marketplace-lifecycle.test.ts
  • test/scripts/release-prepare.test.ts
  • test/scripts/release-publish-children.test.ts
  • test/scripts/release-publish-closeout-preflight.test.ts
  • test/scripts/release-publish-parent.test.ts
  • test/scripts/release-publish-preflight-evidence.test.ts
  • test/scripts/release-publish-state.test.ts
  • test/scripts/release-scenarios-assertions.test.ts
  • test/scripts/release-stable-post.test.ts
  • test/scripts/release-stable-validation.test.ts

y0066

Source report totals: 11,344 → 11,115 LOC; declarations 178 → 176; expanded cases 312 → 311. Coverage: not run (CI-only).

  • src/auto-reply/reply/agent-runner-result-accounting.persistence.test-support.ts
  • src/auto-reply/reply/agent-runner-result-accounting.persistence.test.ts
  • src/auto-reply/reply/agent-runner-result-accounting.restoration.test.ts
  • src/auto-reply/reply/agent-runner-steer-adoption.question-recovery.test.ts
  • src/auto-reply/reply/agent-runner-steer-adoption.worker.test.ts
  • src/auto-reply/reply/agent-runner.final-media-runreplyagent.test.ts
  • src/auto-reply/reply/agent-runner.media-paths.test.ts

y0067

Source report totals: 11,447 → 10,789 LOC; declarations 294 → 277; expanded cases 420 → 419. Coverage: not run (CI-only).

  • extensions/feishu/src/comment-dispatcher.test.ts
  • extensions/feishu/src/comment-handler.test.ts
  • extensions/feishu/src/comment-reaction.test.ts
  • extensions/feishu/src/delivery-trace.test.ts
  • extensions/feishu/src/drive-comments-loopback.test.ts
  • extensions/feishu/src/media-upload-contract.test.ts
  • extensions/feishu/src/media.test.ts
  • extensions/feishu/src/outbound.send-authority.test.ts
  • extensions/feishu/src/outbound.test.ts
  • extensions/feishu/src/send.concurrent.test.ts
  • extensions/feishu/src/send.reply-fallback.test.ts
  • extensions/feishu/src/send.test.ts
  • extensions/feishu/src/streaming-card.error-release.test.ts
  • extensions/feishu/src/tool-account-routing.test.ts

y0068

Source report totals: 10,099 → 10,042 LOC; declarations 196 → 196; expanded cases 297 → 297. Coverage: not run (CI-only).

  • src/agents/worktrees/service.apfs.test.ts
  • src/agents/worktrees/service.diagnostics.test.ts
  • src/agents/worktrees/service.gc-cli.test.ts
  • src/agents/worktrees/service.gc-performance.test.ts

y0069

Source report totals: 11,398 → 11,324 LOC; declarations 194 → 194. Coverage: not run (CI-only).

  • src/infra/update-install-status.test.ts
  • src/infra/update-managed-command-custody.test.ts
  • src/infra/update-managed-service-handoff-boot.test.ts
  • src/infra/update-managed-service-handoff-command.test-support.ts
  • src/infra/update-managed-service-handoff-database-contention.test.ts
  • src/infra/update-managed-service-handoff-database-identity.test.ts
  • src/infra/update-managed-service-handoff-database-recovery.test.ts
  • src/infra/update-managed-service-handoff-engine.test.ts
  • src/infra/update-managed-service-handoff-fixture.test-support.ts
  • src/infra/update-managed-service-handoff-foreground.test.ts
  • src/infra/update-managed-service-handoff-identity.test.ts
  • src/infra/update-managed-service-handoff-lifecycle.test-support.ts
  • src/infra/update-managed-service-handoff-original-owner.test.ts
  • src/infra/update-managed-service-handoff-result.test-support.ts

y0070

Source report totals: 11,767 → 11,404 LOC; declarations 188 → 187; expanded cases 334 → 333. Coverage: not run (CI-only).

No files retained from this shard; commits skipped as above.

y0071

Source report totals: 11,850 → 11,537 LOC; declarations 181 → 180; expanded cases 287 → 286. Coverage: not run (CI-only).

  • src/config/sessions/session-cold-storage.lifecycle.test.ts
  • src/config/sessions/session-cold-storage.sync-write.test.ts
  • src/config/sessions/session-entry-cohort.worker.test.ts
  • src/config/sessions/session-entry-current-check.test.ts
  • src/config/sessions/session-entry-patch.operations.test.ts
  • src/config/sessions/session-entry-patch.test.ts
  • src/config/sessions/session-entry-read.memory.test.ts
  • src/config/sessions/session-entry-read.worker.test.ts

y0072

Source report totals: 11,519 → 11,363 LOC; declarations 170 → 169; expanded cases 284 → 283. Coverage: not run (CI-only).

No files retained from this shard; commits skipped as above.

y0073

Source report totals: 11,488 → 11,070 LOC; declarations 178 → 174; expanded cases 292 → 292. Coverage: not run (CI-only).

  • src/gateway/server-methods/sessions-fixed-store.test-support.ts
  • src/gateway/server-methods/sessions-read.test.ts
  • src/gateway/server-methods/sessions-reset-subagent-cleanup.test.ts
  • src/gateway/server-methods/sessions-rewind.handler.test-support.ts
  • src/gateway/server-methods/sessions-rewind.storage.test.ts
  • src/gateway/server-methods/sessions-rewind.test.ts
  • src/gateway/server-methods/sessions-rewind.upstream-harness.test.ts
  • src/gateway/server-methods/sessions-rewind.upstream.test.ts
  • src/gateway/server-methods/sessions-sharing.test.ts
  • src/gateway/server-methods/sessions.abort-agent-scope.test.ts
  • src/gateway/server-methods/sessions.abort-dedupe-currentness.test.ts

@steipete
steipete enabled auto-merge (squash) October 21, 2026 15:39
@openclaw-barnacle openclaw-barnacle Bot added channel: telegram Channel integration: telegram gateway Gateway runtime scripts Repository scripts agents Agent runtime and tooling channel: feishu Channel integration: feishu size: XL labels Oct 21, 2026
@steipete
steipete disabled auto-merge October 21, 2026 15:45
@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 in progress

ClawSweeper is reviewing this revision. This supersedes any previous blocked status.

View the workflow run.

@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-21T17:36:33.627954Z bb6e8bb 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.

@steipete
steipete enabled auto-merge (squash) October 21, 2026 16:05
@steipete
steipete disabled auto-merge October 21, 2026 16:20
@steipete
steipete enabled auto-merge (squash) October 21, 2026 16:25

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 271b86d770

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@steipete
steipete disabled auto-merge October 21, 2026 16:42
@steipete
steipete enabled auto-merge (squash) October 21, 2026 16:45

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f2437c2340

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@steipete
steipete disabled auto-merge October 21, 2026 16:56
@steipete
steipete enabled auto-merge (squash) October 21, 2026 17:00
@steipete
steipete disabled auto-merge October 21, 2026 17:16
@steipete
steipete force-pushed the tcr/land-d398-1792596595 branch from a5efa75 to bb6e8bb Compare October 21, 2026 17:31
@steipete
steipete enabled auto-merge (squash) October 21, 2026 17:32
@steipete
steipete merged commit 3347882 into main Oct 21, 2026
141 checks passed
@steipete
steipete deleted the tcr/land-d398-1792596595 branch October 21, 2026 18:12
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 22, 2026
…penclaw#179649)

* test(scripts): consolidate y0064 owner coverage

* test(scripts): further deslop y0064 fixtures

* test(telegram): deslop y0063 tests

* test(telegram): consolidate y0063 dispatch family

* test(release): deslop y0065 tests

* test(release): consolidate y0065 release test families

* test(release): share y0065 assertion harnesses

* test(auto-reply): deslop y0066 tests

* test(auto-reply): deduplicate y0066 owner coverage

* test(worktrees): deslop y0068 tests

* test(feishu): deslop y0067 tests

* test(update): deslop y0069 tests

* test(update): consolidate y0069 sibling coverage

* test(update): share y0069 custody and command fixtures

* test(config): deslop y0071 tests

* test(config): consolidate cold restoration publication proof

* test(gateway): deslop y0073 tests

* test(gateway): consolidate y0073 session families

* test(gateway): compact y0073 fixtures

* test(scripts): remove unused maturity assertion helpers

* test: preserve distinct contracts during batch replay

* test: align batch fixtures with current owners

* test(telegram): preserve owned admission audit fixture

* test(telegram): await resolved admission evidence

* test(telegram): preserve final delivery regression contracts

* test(telegram): align new commentary cases with shared fixture
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: feishu Channel integration: feishu channel: telegram Channel integration: telegram gateway Gateway runtime scripts Repository scripts size: XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant