Repository navigation
test(agents,codex,config): remove low-value tests (batch d083) - #160309
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: blocked before merge. Reviewed September 28, 2026, 6:48 AM ET / 10:48 UTC (Revision 2). ClawSweeper reviewWhat this changesThe branch consolidates and removes agent-tool, embedded-runner, Codex app-server, and configuration tests, while updating a CI planner fixture and shrinking a max-lines baseline. Merge readiness⛔ Blocked before merge - 7 items remain Keep this PR open. Current main still has the larger test suite, and the earlier ring-zero import-boundary finding is resolved. One distinct authorization-origin guard was removed without equivalent producer-side coverage. Priority: P3 Review scores
Verification
How this fits togetherOpenClaw assembles agent tools from run and configuration facts, then passes plugin-tool context into message-action checks before a channel effect. These test suites and the CI planner verify that path and related Codex app-server behavior. flowchart LR
A[Run facts and config] --> B[Agent tool assembly]
B --> C[Plugin tool context]
C --> D[Message action checks]
D --> E[Channel effect]
F[Test suites] --> B
F --> C
F --> D
F --> G[CI result]
Before merge
Findings
Agent review detailsSecurityNeeds attention: Production authorization code is unchanged, but removing its producer-side origin tests leaves a concrete security regression gap. PR surfacePR surface statistics unavailable: the file list is incomplete. Review metricsNone. Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Copy recommended automerge instructionTechnical reviewBest possible solution: Keep the consolidated suites while preserving one compact test at agent-tool assembly that checks fail-closed origin projection and trusted operator provenance. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR removes and consolidates tests. The coverage gap is visible in the pinned diff and surviving test boundaries; no runtime failure is claimed. Is this the best way to solve the issue? No. The consolidation is useful and the follow-up repairs address the earlier finding, but the plugin-origin producer still needs a focused guard. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 14f65626bd25. LabelsLabel changes:
Label justifications:
EvidenceSecurity concerns:
Acceptance criteria:
What I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
Addressed the import-boundary finding in 5997840: the original 18-line ring-zero guard is restored byte-for-byte and is no longer part of the PR diff. It protects a different import boundary from Code Mode. Its focused Testbox run passed with the adjacent runtime suite (16 tests). The same follow-up repairs the CI planner's inventory-dependent negative-control fixture without changing worker policy or weakening the mutation-rejection assertion. All 217 planner tests passed, including both previously failing hybrid cases, and the targeted changed-file gate passed. The final three-file rerun passed 233 tests. Details and run links are in the updated PR body. The diff contains only tests and one shrinking max-lines baseline entry. There are no production configuration/default, schema, or persistent-data changes requiring migration proof. |
…law#160309) * test(codex): deslop t0052 tests * test(agents): deslop t0046 tests * test(agents): deslop t0042 tests * test(codex): deslop t0053 tests * test(config): deslop t0063 tests * test(agents): deslop t0048 tests * test(config): deslop t0056 tests * test(agents): deslop t0043 tests * test(agents): deslop t0047 tests * test(config): deslop t0058 tests * test(agents): retain requester yield regression matcher * test: retain independent planner and import boundary checks
What Problem This Solves
Duplicate scenario matrices, helper-level replays, copied inventories, and repetitive fixtures add maintenance and CI cost across agent tools, embedded attempts, Codex attempts, and config tests.
User Impact
No user-visible or production behavior changes. This batch simplifies the test suite while retaining distinct regression, security, authority, lifecycle, and configuration contracts.
Why This Change Was Made
Replays all ten validated campaign commits onto main, refreshed to
69a2b5094badde281f943a399f1f36807d0acf80after the initial validation. All applied in order without textual conflicts or skipped commits. Focused validation exposed one semantic replay conflict: t0048 removedGENERIC_NO_CLAIM_ERROR, but a newer retained requester-yield regression still uses it. Restored that existing matcher, preserving the newer regression unchanged. The later rebase was also conflict-free and preserved the batch diff exactly. The max-lines baseline merged automatically and only removes the obsoleteagent-tools.schema.test.tsexception. Hosted CI also exposed an inventory-dependent negative-control fixture intest/scripts/ci-node-test-plan.test.ts: pruning files legitimately changes compact packing, so an assumed serial row can disappear. The control now uses an explicit typed already-serial admission with an independently expected policy; its child-pin rejection and the real before/after planner comparisons remain intact. This follow-up is +31/-12 test lines, adds no test declarations, and changes no planner policy. Accepted review feedback also retains the original 18-line ring-zero import-boundary test from main; it is a distinct module-evaluation contract and is no longer changed by this PR.The final diff touches 99 test files: +6,985 / -24,362 lines, net -17,377 test LOC. Production and shared test-support LOC: +0 / -0. Tooling: one baseline line removed. No matching CODEOWNERS-owned paths are changed.
Shard evidence
Coverage below is the original in-shard before/after evidence, not a fresh combined-branch coverage measurement. Every shard stayed within the 1% covered-statement and covered-branch loss gate, with no excluded groups. Declaration counts count source
it/testsites in changed files, including parameterized declarations; executed test cases are reported separately.Total source declaration reduction: 597 (final landing reduction 596 after retaining the import-boundary test); original shard executed cases 1,485 → 739. Shard LOC totals include their full measured file sets; the source-commit reductions total 17,416 lines; retaining the two-line matcher, the 18-line import-boundary guard, and the 19-line net fixture repair leaves a final reduction of 17,377 lines. Landing adjustments: t0046 is -1,908 test LOC and -68 declaration sites; t0048 is -2,598 test LOC and -97 declaration sites. Other shard deltas are unchanged.
Per-shard changed files and coverage totals
Brace notation lists exact filename suffixes.
extensions/codex/src/app-server/run-attempt.{continuity-media,durable-context,dynamic-tools,final-media,generation-finalization,hooks,input-attachments,media-lifetime,model-attribution,native-background-outcome,native-config}.test.tssrc/agents/agent-tools.{memory-flush-writer,model-provider-collision,policy,read.host-operations,read.host-write-integrity,read.windows,read.workspace-mutations,read.workspace-root-guard,read.workspace-root-lazy,runtime,safe-bins}.test.tssrc/agents/embedded-agent-runner/run/attempt.{model-diagnostic-events,model-diagnostic-lifecycle,model-diagnostic-observation,prompt-helpers,queue-message,sessions-yield,settled-turn-finalization-context,skills-policy}.test.tsextensions/codex/src/app-server/run-attempt.{native-followup-custody,native-hook-fallback,native-hook-relay-retention,native-hook-relay,notification-burst,plugin-refresh,protocol-validation,question-refresh,reasoning-effort,receipt,settlement}.test.tssrc/config/io.{audit,best-effort,clobber-snapshot,compat,context.plugin-metadata,cron-owner-refusal,eacces,factory,health-state,load-env-restore,meta}.test.tssrc/agents/openclaw-tools.{agents,camera,decision,media-factory-plan,media-workspace,nodes-workspace-guard,plugin-context,registration,requester-yield,scheduled-widget,session-context}.test.tsandsrc/agents/openclaw-tools.browser-plugin.integration.test.tssrc/config/config.{acp-binding-cutover,agent-concurrency-defaults,backup-rotation,compaction-settings,env-vars,gateway-node-pairing-auto-approve,gateway-node-plugin-tools,gateway-tailscale-bind,hooks-module-paths,hooks-session-mode,identity-avatar}.test.tssrc/agents/embedded-agent-runner/run/attempt.{spawn-workspace.bootstrap-marker,spawn-workspace.bootstrap-warning,spawn-workspace.cache-ttl,spawn-workspace.context-engine,spawn-workspace.context-injection,spawn-workspace.sessions-spawn,spawn-workspace.timeout,stop-reason-recovery,subagent-runtime-facts,subscription-cleanup}.test.tsandsrc/agents/embedded-agent-runner/run/attempt.test.tssrc/agents/agent-tools.{scheduled-exec-target,schema,session-permissions,unicode-read-workspace,workspace-outside,workspace-paths}.test.tsandconfig/max-lines-baseline.txtsrc/config/config.{schema-regressions,secrets-schema,skills-entries-config,talk-validation,tools-alsoAllow,web-search-provider}.test.tsDistinct authority, symlink/hardlink/path-escape, rollback, cancellation, redaction, FIFO, generation, and protocol-validation regressions remain. The t0052 report attributes its two six-statement drops to named harness fallback and context-engine projection sibling tests. t0046's branch loss is narrowly within the gate. Some shards deliberately stop short of the aspirational 50% reduction to preserve meaningful contracts.
Evidence
oxfmt --write <changed TS files>, plainoxlint -c .oxlintrc.json <changed TS files>, andgit diff --check <pinned base>passed.4d53e58b6793e32424ad0dbe3b2e32019f87faeb:CI=1 pnpm install --frozen-lockfile --prefer-offline && CI=1 pnpm test <all 88 surviving changed test files>passed 721 tests with three existing platform skips across seven Vitest groups (329.49s).tbx_01m3kfz2jz77tfshgdhxs3g2p2.dataImageClipboardFiledefinition; incorporated main's existing fixbb05e779e2athrough the conflict-free rebase, then reran all focused tests.OPENCLAW_TESTBOX=1 node scripts/check-changed.mjs -- <all 100 changed paths>executed inside the same Testbox with the remote-child marker and passed. This includes 25 core test typecheck groups, extension test typechecking, all dead-export scans, core/extension/scripts type-aware lint, formatting, boundaries, and ratchets. No checks were skipped; temp-directory migration warnings were non-blocking.tbx_01m3kd4az1xf7eem60mwb4nn1handtbx_01m3kebwrm7ynf3t8dyt085v3f.test/scripts/ci-node-test-plan.test.ts(failed job). This was traced to an inventory-dependent negative-control input, not treated as a pre-existing-main exception. Auto-merge was disabled while repairing it.CI=1 pnpm test test/scripts/ci-node-test-plan.test.ts: 217 passed. Its targetedcheck-changedgate also passed, including root-test typechecks, dead exports, and lint.CI=1 pnpm test src/agents/agent-tools.ring-zero-context.import-boundary.test.ts src/agents/agent-tools.runtime.test.ts test/scripts/ci-node-test-plan.test.ts: 233 passed. Both previously failing hybrid cases pass, and the import guard passes.tbx_01m3knwd64btq7hatdx4an2b55, stopped after proof. The final tested treeba70d83e0a9b5162ea63075abac58a232f74aa37was verified against the committed tree.