Repository navigation
test(core,plugins,ui): remove low-value tests (batch d375) - #179340
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
9742db2 to
3215383
Compare
|
Confirmed inherited QA smoke failures on reviewed head 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 |
There was a problem hiding this comment.
💡 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 }); |
There was a problem hiding this comment.
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 👍 / 👎.
3d3c5d5 to
5803168
Compare
There was a problem hiding this comment.
💡 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".
| const automationJob = (name: string) => ({ | ||
| name, | ||
| enabled: true, | ||
| updatedAtMs: 2, | ||
| schedule: { kind: "every", everyMs: 86400000 }, |
There was a problem hiding this comment.
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 👍 / 👎.
…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
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) andui/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.tswas also kept identical to new main, preserving its custom/tailnet loopback probe regression. CI later rejected cleanup insrc/cli/cron-cli/cron-suppression.gateway.test.tsandsrc/cli/daemon-cli/status.test.ts; those files are also restored to pinned main. A second required conflict rebase retained current main'ssrc/cli/nodes-cli/register.camera.test.tsentirely: 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
node_modules/.bin/oxfmt --write <55 changed TS/TSX files>passed.node_modules/.bin/oxlint -c .oxlintrc.json <55 changed TS/TSX files>passed, exit 0.git diff --check e1044d962211a253da4bd9d70b8193ec5ec2b701passed.openclaw/ci-gateselects the affected tests.togglePopoverAPI 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; addedmaxEntries: 10and 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 fromconfig/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.