Skip to content

test(core,plugins,ui): remove low-value tests (batch d375) - #179340

Merged
steipete merged 35 commits into
mainfrom
tcr/land-d375-1792575775
Oct 21, 2026
Merged

steipete merged 35 commits into
mainfrom
tcr/land-d375-1792575775

Conversation

@steipete

@steipete steipete commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Reduces repeated fixtures, duplicated assertion setup, and low-value test scaffolding in campaign batch d375.

User Impact

No production behavior, public API, configuration, or visual change. Only tests and test support change. Distinct lifecycle, authorization, error, and cleanup contracts must remain covered; hosted CI is the runtime gate.

Why This Change Was Made

Replays all 30 supplied campaign commits onto pinned main e1044d962211a253da4bd9d70b8193ec5ec2b701. Three conflicting files are deliberately unchanged from that base: extensions/qa-lab/src/test-file-scenario-script-evidence.test.ts (retain main's receipt-evidence fixture) and ui/src/lib/chat/session-diff-folds.test.ts (retain main's newer revealed-context-marker regression). During the required conflict rebase, src/cli/daemon-cli/status.gather.config.test-support.ts was also kept identical to new main, preserving its custom/tailnet loopback probe regression. CI later rejected cleanup in src/cli/cron-cli/cron-suppression.gateway.test.ts and src/cli/daemon-cli/status.test.ts; those files are also restored to pinned main. A second required conflict rebase retained current main's src/cli/nodes-cli/register.camera.test.ts entirely: main moved it to the public nodes-registration entry point. Its cleanup and isolation-comment hunks were dropped. The six retained files are byte-identical to this latest pinned base. All remaining replay hunks were kept except the CI repairs below; no whole supplied commits were skipped.

56 files: production +0/-0; test files +2712/-4630; test support +253/-471; ratchet metadata +0/-12; total +2965/-5113 (net -2148). No CODEOWNERS-listed paths are touched.

Evidence

  • Frozen offline-preferred dependency installation passed.
  • node_modules/.bin/oxfmt --write <55 changed TS/TSX files> passed.
  • Plain node_modules/.bin/oxlint -c .oxlintrc.json <55 changed TS/TSX files> passed, exit 0.
  • git diff --check e1044d962211a253da4bd9d70b8193ec5ec2b701 passed.
  • Per operator CI-only instruction: no local Vitest, check-changed, tsgo, coverage, or Testbox runs. Local test wall time and coverage totals are unavailable, not zero. Hosted openclaw/ci-gate selects the affected tests.
  • Failed-head CI evidence: Discord assertion failures and Custodian mock type error. Both repaired; fresh-head CI is required, no local runtime/typecheck reruns under CI-only policy.
  • Subsequent failed-head CI: Signal fixture setup, extension types, type-aware lint, and mock-isolation explanations were addressed, not waived.
  • Inherited QA smoke timeouts have exact scheduled-main signature proof in this evidence comment. They remain failures; the approved inherited-only exception applies only after every batch-caused check passes.
  • Independent review completed: one P2 suggestion to restore the test polyfill's removed togglePopover API was declined. Repository-wide source search found no callers; it was an unused test-only seam, not a production/public contract. No other P0-P2 findings. The subsequent rebase only drops another cleanup file and retains newer main behavior. CI then exposed two batch defects: exact Discord equality included internal symbol metadata, and Custodian used a widened generic mock type. Restored the original string-key assertions and adopted the existing harness parameter type. Focused independent review of both repairs passed with no actionable findings. Later CI also caught missing bounds in the Signal failure fixture's real keyed store; added maxEntries: 10 and independently reviewed it clean. Two type-aware lint helper rewrites were dropped as noted above. Added specific isolation explanations for unchanged synthetic mocks reported by the mock-exports ratchet; no runtime behavior or blanket baseline exemptions changed. The next CI pass accepted the mock annotations and explicitly listed 13 obsolete baseline entries. Removed exactly those entries from config/test-mock-exports-baseline.txt; one was independently removed by newer main, so the final diff removes 12. The baseline-ratchet job passed on head 3d3c5d59ac80 before the camera-only conflict rebase. This is shrink-only metadata maintenance, not a new exemption.
Per-shard replay inventory and static deltas

LOC is current pinned-base to replayed-head, including test support where present. Declarations count static it/test call sites, including table declarations, not expanded executions. Source reports describe an earlier pass; later supplied commits further consolidate tests, so their original totals are not presented as final proof. Every source report states coverage was not run under CI-only instructions; no coverage totals line exists.

Shard LOC before → after Declarations before → after Changed files (common directory indicated)
z0860 619 → 490 19 → 19 extensions/discord/src/monitor: thread-bindings.disabled-owner.test.ts, thread-session-close.test.ts, thread-title.generate.test.ts, threading.parent-info.test.ts, timeouts.test.ts
z0859 620 → 480 13 → 9 src/commands: status-database-engines.test.ts, status-overview-surface.test.ts, telemetry-exporter-summary.test.ts, triage-repair-isolation.test.ts
z0855 625 → 451 9 → 9 extensions/workboard/browser/pages/workboard: view-card-actions.test.ts, workboard-page-automation.test.ts, workboard-page-selection.test.ts, workboard-page.test-support.ts
z0857 235 → 164 11 → 9 src/cli/cron-cli: register.cron-scratch.test.ts, schedule-options.stream.test.ts
z0861 644 → 443 17 → 14 src/commands/models: list.auth-overview.test.ts, load-config.test.ts, refresh.test.ts, set.test.ts
z0864 609 → 458 16 → 8 src/projects: project-clone-registration.test.ts, project-clone-runtime.test.ts
z0862 442 → 324 11 → 7 extensions/qa-lab/src: test-file-scenario-runner.process.test.ts, web-runtime.lifecycle.e2e.test.ts, web-runtime.pending-navigation.test.ts
z0863 617 → 481 18 → 15 ui/src/pages/custodian: custodian-alert-store.test.ts, custodian-page-agent-create.test.ts, custodian-plugin-help.test.ts, custodian-surface.receipts.test.tsx
z0856 523 → 373 29 → 23 ui/src/lib/chat: history-message-identity.test.ts, model-ref.test.ts, session-diff-split.test.ts, tool-call-diff.test.ts
z0865 604 → 446 24 → 20 src/daemon: systemd-scope.identity.test.ts, systemd-system-loaded.test.ts, systemd-unit.test.ts, systemd-user-command-deadline.test.ts
z0867 601 → 466 12 → 12 src/plugins: wired-hooks-llm.test.ts, wired-hooks-message.test.ts, wired-hooks-session.test.ts, wired-hooks-subagent.test.ts
z0870 377 → 304 12 → 12 src/cli/nodes-cli: register.location.test.ts, register.status.test.ts, rpc.test.ts
z0866 602 → 484 0 → 0 ui/src/test-helpers: plugins-e2e-fixtures.test-support.ts, popover.ts, session-menu.ts, solid-menu.tsx
z0868 609 → 428 9 → 8 extensions/signal/src: reply-authors.test.ts, send-reactions.test.ts, signal-ingress.approval-reaction-replay.test.ts, sse-reconnect.real-server.test.ts
z0872 588 → 447 11 → 11 src/cli/program: root-command-descriptions.test.ts, routes.test.ts
z0871 238 → 178 2 → 2 src/cli/daemon-cli: status.gather.probes.test-support.ts, status.gather.timeout.test-support.ts
Test/support total 8553 → 6417 213 → 178 55 files; plus 12 removed ratchet metadata lines

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

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@steipete
steipete enabled auto-merge (squash) October 21, 2026 09:45
@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-21T10:57:13.193440Z 5803168 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: discord Channel integration: discord channel: signal Channel integration: signal app: web-ui App: web-ui gateway Gateway runtime cli CLI command changes commands Command implementations extensions: qa-lab plugin: workboard size: XL labels Oct 21, 2026
@steipete
steipete force-pushed the tcr/land-d375-1792575775 branch from 9742db2 to 3215383 Compare October 21, 2026 09:50
@steipete
steipete disabled auto-merge October 21, 2026 09:59
@steipete
steipete enabled auto-merge (squash) October 21, 2026 10:01
@steipete
steipete disabled auto-merge October 21, 2026 10:11
@steipete

steipete commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor Author

Confirmed inherited QA smoke failures on reviewed head 5803168bbd33110725d9273eb5ede3acaddde886, CI run 39587427713. All five signatures also fail in the newest completed scheduled-main CI run 39585413125 (main ff5b71ad4a8e41c76e8fc8345ce450b6f8dc0ff0, 2026-10-21 10:33Z):

Scenario Same failure on PR and main Scheduled-main job proof
subagent-empty-completion-recovery 60000ms timeout; inbound-message/outbound-message final bus events https://github.com/openclaw/openclaw/actions/runs/39585413125/job/119173206744
telegram-attributed-block-delivery 45000ms timeout; same final bus events https://github.com/openclaw/openclaw/actions/runs/39585413125/job/119173206744
telegram-command-prompt-context 45000ms timeout; same final bus events https://github.com/openclaw/openclaw/actions/runs/39585413125/job/119173206579
subagent-completion-direct-fallback public:visible 60000ms timeout; same final bus events https://github.com/openclaw/openclaw/actions/runs/39585413125/job/119173206618
group-visible-reply-tool 180000ms timeout; same final bus events https://github.com/openclaw/openclaw/actions/runs/39585413125/job/119173206618

Final-head PR logs: https://github.com/openclaw/openclaw/actions/runs/39587427713/job/119180935835 ; https://github.com/openclaw/openclaw/actions/runs/39587427713/job/119180935827 ; https://github.com/openclaw/openclaw/actions/runs/39587427713/job/119180935878

The diff does not touch these scenario files or their production execution paths. Fresh-main history through 5ffeff12269c1d60372a9ed86911fc764b8f21ee has no scenario changes since the pinned base. The earlier scheduled main run 39578067192 independently showed the same five failures. They remain failures, not passing tests. The approved inherited-only campaign exception applies only after every other check completes without an unproven red. Batch-caused Discord assertions, Custodian mock typing, Signal store setup, CLI type-aware lint, and mock-export baseline issues were repaired or dropped, not waived.

@steipete
steipete enabled auto-merge (squash) October 21, 2026 10:18
@steipete
steipete disabled auto-merge October 21, 2026 10:32
@steipete
steipete enabled auto-merge (squash) October 21, 2026 10:34

@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: 3d3c5d59ac

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

});

it("reports revision conflicts without rereading or retrying", async () => {
rpc.mockResolvedValue({ ok: false, currentRevision: 43 });

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.

P2 Badge Restore the scratch conflict receipt discriminator

When this case simulates a cron.scratch.set conflict, the mock now returns { ok: false, currentRevision: 43 }, although CronJobScratchWriteResult requires every failed receipt to include reason: "revision-conflict" (src/cron/scratch-contract.ts:31-33). Because rpc is an untyped vi.fn(), the invalid fixture escapes static checking and lets this contract test pass against a response the Gateway cannot produce; restore the discriminator or type the mock against the RPC result contract.

AGENTS.md reference: AGENTS.md:L78-L78

Useful? React with 👍 / 👎.

@steipete
steipete force-pushed the tcr/land-d375-1792575775 branch from 3d3c5d5 to 5803168 Compare October 21, 2026 10:49

@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: 5803168bbd

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

Comment on lines +119 to +123
const automationJob = (name: string) => ({
name,
enabled: true,
updatedAtMs: 2,
schedule: { kind: "every", everyMs: 86400000 },

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.

P2 Badge Keep automation fixtures on the CronJob contract

Whenever these tests mock cron.get, this helper now returns an object missing required CronJob fields such as id, createdAtMs, sessionTarget, wakeMode, and payload (packages/gateway-protocol/src/schema/cron.ts). Because loadJob is typed to return unknown, the incomplete response bypasses static checking and lets the lifecycle tests exercise a payload the Gateway cannot produce; type the callback as returning CronJob and restore a complete fixture.

AGENTS.md reference: AGENTS.md:L78-L78

Useful? React with 👍 / 👎.

@steipete
steipete merged commit 86deff5 into main Oct 21, 2026
125 of 131 checks passed
@steipete
steipete deleted the tcr/land-d375-1792575775 branch October 21, 2026 11:15
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 22, 2026
…179340)

* test(discord): deslop z0860 tests

* test(commands): deslop z0859 tests

* test(commands): deslop z0859 tests

* test(workboard): deslop z0855 tests

* test(workboard): deslop z0855 tests

* test(workboard): deslop z0855 tests

* test(cron): deslop z0857 tests

* test(cron): deslop z0857 tests

* test(models): deslop z0861 tests

* test(models): deslop z0861 tests

* test(projects): deslop z0864 tests

* test(projects): deslop z0864 tests

* test(qa-lab): deslop z0862 tests

* test(qa-lab): deslop z0862 tests

* test(custodian): deslop z0863 tests

* test(custodian): deslop z0863 tests

* test(chat): deslop z0856 tests

* test(chat): deslop z0856 tests

* test(daemon): deslop z0865 tests

* test(daemon): deslop z0865 tests

* test(plugins): deslop z0867 tests

* test(nodes-cli): deslop z0870 tests

* test(ui): deslop z0866 tests

* test(ui): deslop z0866 tests

* test(ui): deslop z0866 tests

* test(signal): deslop z0868 tests

* test(signal): deslop z0868 tests

* test(cli): deslop z0872 tests

* test(daemon-cli): deslop z0871 tests

* test(daemon-cli): deslop z0871 tests

* test: preserve Discord assertions and Custodian mock contract

* test(signal): bound the reply-author failure fixture store

* test(cli): retain main fixtures rejected by type-aware lint

* test: explain isolated external-state mocks

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

Labels

app: web-ui App: web-ui channel: discord Channel integration: discord channel: signal Channel integration: signal cli CLI command changes commands Command implementations extensions: qa-lab gateway Gateway runtime plugin: workboard size: XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant