Repository navigation
test(core,plugins): remove low-value tests (batch d118) - #162138
Merged
Merged
Conversation
Remove repeated policy-drift inputs, generic route checks, and replays of pager, wrapper-depth, and approval-plan owner tests. Consolidate durable approval fixtures and lifecycle cleanup; infer mock result types instead of casting partial copies of production contracts. Preserve Vitest routing. The 50% campaign target is not reached. Retention ledger below names each remaining case (table rows expanded), using the requested rules: 1 = unique covered execution path; 2 = historical regression; 3 = distinct security boundary. No unrelated behaviors were combined to reduce counts. - Native cwd refusal: 2, d88e10a, preserve preparation-refusal classification. - Lost companion response: 3, disabled fallback must never replay locally. - Already-cancelled command: 1, entry cancellation return. - Cancelled local completion: 1, post-run cancellation return and signal forwarding. - Pending Mac cancellation: 1, post-bridge cancellation return without replay/publication. - Medium-risk auto review: 2, 3b26947, ordinary audit-related argv must reach review and execution. - Auto review without a plan: 3, unbound commands cannot obtain model authority. - Login-shell startup: 3, startup effects cannot bypass review through a forged plan. - Reviewer asks: 1, defer-to-human switch branch. - Reviewer denies: 3, explicit model refusal cannot execute. - Approved env wrapper argv: 3, preserve approved positional execution semantics locally and over the bridge. - Transparent versus semantic env wrappers: 3, only transparent carriers may unwrap into an allowlisted executable. - Nested safe-bin chains: 3, bind rewritten shell payloads to canonical safe-bin paths. - PowerShell wrappers: 1, non-POSIX transport must bypass POSIX rewriting. - PATH-token allowlist execution: 3, launch the canonical approved executable rather than a mutable PATH alias. - Live policy revocation at commit: 3, recheck authority after awaited persistence before real launch. - Live policy revocation at callback: 3, the launch adapter must recheck immediately before spawning. - Live policy unchanged at callback: 3, positive control proves authorized real execution succeeds. - Unbindable auto executable identity: 3, model review cannot authorize an unbound dispatch chain. - Human executable identity drift at commit: 3, changed executable resolution invalidates the approved command. - Script drift after commit: 3, recheck mutable operands after the persistence await. - Runtime script binding at dispatch: 3, reject changed operands and omitted required bindings. - Relative skill-bin invocation: 3, skill trust cannot authorize an arbitrary relative executable. - Unsafe environment inputs: 3, block dangerous overrides, argv assignments, and invalid env keys. - Shell executable env allowlist: 3, filter shell environments even without an inline payload. - Revoked rule during allow-always commit: 3, do not resurrect revoked authority through grant persistence. - Unprompted ask tightening during commit: 3, current-policy authority must not survive a newly required prompt. - Auto-review ask tightening during commit: 3, forwarded model authority remains bound to its prepared policy snapshot. - Exact-plan forwarded strict inline review: 3, authenticated one-shot authority remains scoped to its bound plan. - Unavailable screen recording: 3, deny before execution or durable grant mutation. - Tightened timeout fallback policy: 3, reevaluate fallback authority at commit. - Fallback without canonical plan: 3, reject unbound fallback provenance. - Explicit approval without canonical plan: 3, reject unbound explicit authority. - Delayed approval without policy snapshot: 3, require the prepared policy identity. - Allowlist revocation after prepare: 3, reject stale authority before committing. - Mixed fallback and explicit provenance: 3, refuse contradictory authority sources. - Durable allowlist timeout fallback: 3, positive control for an exact durable grant. - Revoked durable timeout source: 3, source downgrade removes fallback authority. - Mac fallback bridge: 3, forward fallback provenance without inventing explicit approval. - Fallback versus strict inline review: 3, timeout fallback cannot satisfy mandatory review. - Unknown approval provenance: 3, reject unsupported authority markers. - Benign awk durable grant: 3, a file-based grant must not reopen inline programs. - Make inline grant: 3, explicitly approved runtime payloads remain one-shot. - Windows cmd transport: 3, unwrap transport before deciding shell approval requirements. - Windows durable trust downgrade: 3, revalidate the exact durable source at commit. - Durable cwd replacement: 3, directory identity remains bound through execution. - Safe builtin with redundant exact grant: 1, builtin authorization must survive revocation of an unused grant. - Socket response loss: 2, adf5c67, real completed execution must never replay after its reply is lost. Measurements and validation: - Executed tests: 90 -> 48, down 46.67%. - Shard test LOC: 3431 -> 2045, down 40.40%. - Covered statements: 357 -> 354 (-0.84%). - Covered branches: 438 -> 435 (-0.68%). Functions: 34 -> 34. - Only invoke-system-run-plan.ts drops coverage: 3 statements, 3 branches. These are removed preparation-only probes; no source file drops >5 statements. - Both Vitest coverage groups succeeded; no groups were excluded. - Blacksmith Testbox: both shard files pass (47 infra + 1 unit tests). Final file durations: 2.80s infra; 1.95s unit. - check:changed passes, including core-test types, boundary checks, all dead-export scans, and type-aware lint (0 warnings, 0 errors). - Local oxfmt, plain oxlint, and git diff --check pass. - No production or shared test-support changes; no bugs or flakes found. - Proof workflow: https://github.com/openclaw/openclaw/actions/runs/36738903333
Contributor
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review blockedAutomated 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. |
steipete
enabled auto-merge (squash)
September 30, 2026 21:25
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Oct 1, 2026
) * test(scripts): deslop t0421 tests * test(node-host): deslop t0420 tests Remove repeated policy-drift inputs, generic route checks, and replays of pager, wrapper-depth, and approval-plan owner tests. Consolidate durable approval fixtures and lifecycle cleanup; infer mock result types instead of casting partial copies of production contracts. Preserve Vitest routing. The 50% campaign target is not reached. Retention ledger below names each remaining case (table rows expanded), using the requested rules: 1 = unique covered execution path; 2 = historical regression; 3 = distinct security boundary. No unrelated behaviors were combined to reduce counts. - Native cwd refusal: 2, 9c8fecb, preserve preparation-refusal classification. - Lost companion response: 3, disabled fallback must never replay locally. - Already-cancelled command: 1, entry cancellation return. - Cancelled local completion: 1, post-run cancellation return and signal forwarding. - Pending Mac cancellation: 1, post-bridge cancellation return without replay/publication. - Medium-risk auto review: 2, bd93e54, ordinary audit-related argv must reach review and execution. - Auto review without a plan: 3, unbound commands cannot obtain model authority. - Login-shell startup: 3, startup effects cannot bypass review through a forged plan. - Reviewer asks: 1, defer-to-human switch branch. - Reviewer denies: 3, explicit model refusal cannot execute. - Approved env wrapper argv: 3, preserve approved positional execution semantics locally and over the bridge. - Transparent versus semantic env wrappers: 3, only transparent carriers may unwrap into an allowlisted executable. - Nested safe-bin chains: 3, bind rewritten shell payloads to canonical safe-bin paths. - PowerShell wrappers: 1, non-POSIX transport must bypass POSIX rewriting. - PATH-token allowlist execution: 3, launch the canonical approved executable rather than a mutable PATH alias. - Live policy revocation at commit: 3, recheck authority after awaited persistence before real launch. - Live policy revocation at callback: 3, the launch adapter must recheck immediately before spawning. - Live policy unchanged at callback: 3, positive control proves authorized real execution succeeds. - Unbindable auto executable identity: 3, model review cannot authorize an unbound dispatch chain. - Human executable identity drift at commit: 3, changed executable resolution invalidates the approved command. - Script drift after commit: 3, recheck mutable operands after the persistence await. - Runtime script binding at dispatch: 3, reject changed operands and omitted required bindings. - Relative skill-bin invocation: 3, skill trust cannot authorize an arbitrary relative executable. - Unsafe environment inputs: 3, block dangerous overrides, argv assignments, and invalid env keys. - Shell executable env allowlist: 3, filter shell environments even without an inline payload. - Revoked rule during allow-always commit: 3, do not resurrect revoked authority through grant persistence. - Unprompted ask tightening during commit: 3, current-policy authority must not survive a newly required prompt. - Auto-review ask tightening during commit: 3, forwarded model authority remains bound to its prepared policy snapshot. - Exact-plan forwarded strict inline review: 3, authenticated one-shot authority remains scoped to its bound plan. - Unavailable screen recording: 3, deny before execution or durable grant mutation. - Tightened timeout fallback policy: 3, reevaluate fallback authority at commit. - Fallback without canonical plan: 3, reject unbound fallback provenance. - Explicit approval without canonical plan: 3, reject unbound explicit authority. - Delayed approval without policy snapshot: 3, require the prepared policy identity. - Allowlist revocation after prepare: 3, reject stale authority before committing. - Mixed fallback and explicit provenance: 3, refuse contradictory authority sources. - Durable allowlist timeout fallback: 3, positive control for an exact durable grant. - Revoked durable timeout source: 3, source downgrade removes fallback authority. - Mac fallback bridge: 3, forward fallback provenance without inventing explicit approval. - Fallback versus strict inline review: 3, timeout fallback cannot satisfy mandatory review. - Unknown approval provenance: 3, reject unsupported authority markers. - Benign awk durable grant: 3, a file-based grant must not reopen inline programs. - Make inline grant: 3, explicitly approved runtime payloads remain one-shot. - Windows cmd transport: 3, unwrap transport before deciding shell approval requirements. - Windows durable trust downgrade: 3, revalidate the exact durable source at commit. - Durable cwd replacement: 3, directory identity remains bound through execution. - Safe builtin with redundant exact grant: 1, builtin authorization must survive revocation of an unused grant. - Socket response loss: 2, 6d6a3f7, real completed execution must never replay after its reply is lost. Measurements and validation: - Executed tests: 90 -> 48, down 46.67%. - Shard test LOC: 3431 -> 2045, down 40.40%. - Covered statements: 357 -> 354 (-0.84%). - Covered branches: 438 -> 435 (-0.68%). Functions: 34 -> 34. - Only invoke-system-run-plan.ts drops coverage: 3 statements, 3 branches. These are removed preparation-only probes; no source file drops >5 statements. - Both Vitest coverage groups succeeded; no groups were excluded. - Blacksmith Testbox: both shard files pass (47 infra + 1 unit tests). Final file durations: 2.80s infra; 1.95s unit. - check:changed passes, including core-test types, boundary checks, all dead-export scans, and type-aware lint (0 warnings, 0 errors). - Local oxfmt, plain oxlint, and git diff --check pass. - No production or shared test-support changes; no bugs or flakes found. - Proof workflow: https://github.com/openclaw/openclaw/actions/runs/36738903333 * test(ai): deslop t0414 tests * test(commands): deslop t0423 tests * test(google): deslop t0416 tests * test(board): deslop t0409 tests * test(infra): deslop t0410 tests * test(gateway): deslop t0429 tests * test(doctor): deslop t0422 tests * test(signal): deslop t0426 tests * test: retain distinct regressions in batch d118
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Problem This Solves
This maintainer-requested test audit batch removes repeated test cases and fixture setup across installer, node execution, provider transport, model picker, realtime voice, board, worker pool, questions, Doctor, and Signal suites.
User Impact
No runtime behavior, public API, configuration, schema, or dependency changes. The test suite is smaller while retaining the campaign's identified security, lifecycle, transport, and historical regression cases.
Why This Change Was Made
Consolidate overlapping cases at their existing owner boundaries and remove obsolete split files. Remove the two CI inventory entries for deleted files whose retained cases moved into the surviving suites. No test routing, timeout, assertion baseline, or expected-failure changes.
All ten requested commits were replayed in order onto main at
ecb897146e5c47a6cde4e0d5552ce7d70c3700c3. No content conflicts, skipped commits, or dropped hunks. Current main's CI inventory changes were preserved by the clean three-way application.Diff split: runtime production +0 / -0; tests +5,313 / -16,197 (net -10,884 LOC); CI inventory tooling +0 / -2. Static test declarations decrease 649 → 356 (-293); table-driven executed-case counts are separate below. No changed path matches the current CODEOWNERS rules.
Evidence
Original in-shard validation
These are the source campaign's before/after measurements, not a newly measured whole-repository coverage claim. LOC counts cover changed test files; declarations count each static
it/testdeclaration once, including.eachonce.Measured statement/branch losses stay within 1% in each shard. No test groups were excluded. The t0420 report also includes an unchanged 164-line sibling, giving whole-shard LOC 3,431 → 2,045 with the same net reduction. The missing t0416 summary was reconstructed from successful before/after coverage JSON and its successful changed-check retry.
Coverage limitations: t0421's spawned shell/script paths are not measured by V8 (zero totals); t0423 measured
src/commands/**while the picker implementation lives undersrc/flows; t0422 measuredsrc/commands/**without migration implementation undersrc/infra. These totals do not establish coverage preservation of those production owners. Several shards intentionally retained enough distinct regression/security cases to miss the campaign's 50% reduction targets.Files by shard
test/scripts/test-install-sh-docker.test.ts.src/node-host/invoke-system-run.test.ts.packages/ai/src/providers/,openai-chatgpt-responses.cache.test.ts,openai-chatgpt-responses.encrypted-retry.test.ts,openai-chatgpt-responses.model-attestation.test.ts,openai-chatgpt-responses.retry.test.ts,openai-chatgpt-responses.sse-parse-error.test.ts,openai-chatgpt-responses.test.ts,openai-chatgpt-responses.tools.test.ts, andopenai-chatgpt-responses.websocket-errors.test.ts.src/commands/model-picker.default-agent.test.tsandsrc/commands/model-picker.test.ts.extensions/google/realtime-voice-provider.gemini38.test.tsandextensions/google/realtime-voice-provider.test.ts.src/gateway/server-methods/,board.content-kinds.test.ts,board.events.test.ts,board.github-actions.test.ts,board.plugin-capabilities.test.ts,board.runtime-boundaries.test.ts, andboard.test.ts.src/infra/worker-task-pool.logging.test.ts,src/infra/worker-task-pool.source-loader.test.ts,src/infra/worker-task-pool.test.ts, and one removed row inscripts/lib/ci-proof-test-inventory.mts.src/gateway/server-methods/question.host-consent.test.ts,src/gateway/server-methods/question.recovery.test.ts,src/gateway/server-methods/question.test.ts, and one removed row inscripts/lib/ci-proof-test-inventory.mts.src/commands/doctor-state-migrations.test.ts.extensions/signal/src/,client-container.handshake.loopback.test.ts,client-container.real-server.test.ts,client-container.test.ts, andclient-container.websocket.test.ts.Review corrections
Independent review raised ten findings. Four were accepted wholly or narrowly, restoring four executed cases (51 net test lines): automatic migration must leave default approvals untouched; manual model entry must honor the target agent's explicit primary; a successful nonroot installer must execute and clean up; and GitHub credentials rotated during an awaited fetch must prevent delivery. The original shard table above remains the historical campaign measurement. Final test LOC are t0421 2,661, t0423 1,248, t0409 2,137, and t0422 1,634; each gains one executed case. Static declarations increase only for the two restored standalone cases.
Six findings were rejected after source review: the BytePlus ownership mock remains hoisted; the inactive requester asserts abort and returns before the pending assertion; scoped legacy allowlist preservation and migration stamping remain covered; deleted shell-denial rows repeat shared authorization-owner coverage; pre-retired board request cases fail at the common admission guard rather than distinct write sites; and secret questions use the same tool-independent human-input recovery registration with separate secret-settlement tests. The GitHub race restoration retains only the missing post-fetch credential boundary, alongside existing session, ticket, and shared-owner coverage.
Replayed-tree validation
pnpm install --frozen-lockfile --prefer-offline: passed.node_modules/.bin/oxfmt --write <all surviving changed files>, plainoxlint -c .oxlintrc.json <changed TS/MTS files>, andgit diff --check: passed.tbx_01m3t0h4hebgxyfmwxb1twfevv:CI=1 pnpm testcovering all 19 surviving changed test files passed 446 tests, including the four restored cases. The installer reporter repeated its identical 81-test summary; it is counted once.The first focused attempt was killed with exit 137 during local source staging before executing tests; its ready lease was stopped. The initial separate changed gate was canceled before execution to apply review corrections. The corrected focused suite and changed gate share one fresh source preparation and one remote command. These preparation interruptions are not reported as test failures or passing checks.
The full changed-file gate also passed with exit 0 in the same Testbox command: 27 core typecheck groups, extension/script/root-test types, all dead-export scans, repository guards, and type-aware lint. Runtime lint reported zero warnings/errors. The wrapper recorded source tree
2d78b20713a1128dd74c6cb974fe75cc0c4c1579and a successful 43m49s remote command. Both task-owned leases are stopped. The backing Actions Testbox step may display cancellation when its successful one-shot lease is stopped; the wrapper's completed command result is the Testbox evidence. Hosted PR CI remains the merge gate.