Skip to content

test(core): remove residual duplicate assertions - #124116

Merged
steipete merged 1 commit into
mainfrom
test/remove-residual-core-duplicates
Aug 15, 2026
Merged

steipete merged 1 commit into
mainfrom
test/remove-residual-core-duplicates

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Removes residual test assertions and self-tests that duplicate stronger owner-boundary proof, compare a fixture with itself, assert implementation spelling, or preserve no independent contract.

The batch removes static owner-gate and import smokes, exact-object key reassertions, duplicate message-exit tests, repeated managed-media byte semantics/defaults, a session-icon self-copy, a node-fixture self-test, a direct avatar predicate test already covered at projection boundaries, two OnePassword source-string checks, and a stale CI tombstone assertion.

Why This Change Was Made

Each retained test now protects a distinct behavior or boundary: real owner authorization, executable CLI results, session protocol/RPC projection, managed-media routing and owner-level range semantics, avatar resolution/bootstrap projection, resolver lifecycle, and CI routing.

A node status E2E assertion was also made renderer-width independent after the broad proof run correctly wrapped hw: samsung across lines. It still asserts the hardware label, vendor, and model identifier separately.

User Impact

No runtime behavior changes. The suite has fewer self-validating and renderer-spelling assertions while retaining the real user and protocol boundaries.

Evidence

  • Full selected owner/boundary proof: 23 files, 1,145 tests passed and 3 skipped across nine Vitest shards.
  • The node status E2E initially exposed the width-dependent substring; after the invariant assertion repair, all 29 node basics cases passed and the complete selected proof passed.
  • coreTests, extensionTests, testRoot, and tooling changed gate passed through the documented trusted-source local fallback because no Crabbox/Testbox provider was ready; typechecks, formatting, full core lint, extension lint, dead-export scan, and dependency/plugin guards passed.
  • git diff --check passed.
  • Fresh complete-branch structured autoreview reported no accepted/actionable findings.

Production delta: 0. Tests: +2/-100, net -98. No docs, config, schema, protocol, dependency, or changelog change.

@clawsweeper

clawsweeper Bot commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui gateway Gateway runtime cli CLI command changes agents Agent runtime and tooling extensions: onepassword 1Password plugin size: S maintainer Maintainer-authored PR labels Aug 15, 2026
@steipete
steipete marked this pull request as ready for review August 15, 2026 08:47
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Aug 15, 2026
@clawsweeper

clawsweeper Bot commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 15, 2026, 4:52 AM ET / 08:52 UTC.

ClawSweeper review

What this changes

This PR removes duplicate test assertions and makes a node-status CLI assertion resilient to terminal line wrapping.

Merge readiness

⚠️ Ready for maintainer review - 1 item remains

Keep open: current main does not contain this test-only cleanup, and the removed checks have stronger owner-boundary coverage. No blocking correctness or security findings found.

Priority: P3
Reviewed head: 30899913ea58c0330d6d95259bbe6591647fdd79

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, source-backed cleanup with retained owner-boundary coverage and no actionable defects found.
Proof confidence 🌊 off-meta tidepool Not applicable: This maintainer-authored test-only cleanup has no changed user-visible runtime behavior requiring contributor real-behavior proof.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer-authored test-only cleanup has no changed user-visible runtime behavior requiring contributor real-behavior proof.
Evidence reviewed 5 items Current PR delta: The branch is nonempty against current main and changes only tests: +2/-100 lines, with no production files modified.
Managed-media range coverage remains at the owner: The managed-media handler retains ticketed byte-range coverage, while the shared byte-range suite covers partial and unsatisfiable HTTP responses; the removed Gateway E2E assertions duplicate those contracts.
Gateway owner restriction remains independently tested: Gateway tool-resolution coverage explicitly verifies that non-owner callers receive a denylist containing sessions, so removing the sessions-tool list-membership assertion does not remove the security boundary check.
Findings None None.
Security None None.

How this fits together

OpenClaw’s CLI, Gateway, protocol, and bundled-plugin tests guard runtime behavior at their owning boundaries. This change removes local assertions that duplicate those boundary checks, reducing maintenance noise without changing production behavior.

flowchart LR
A[Runtime behavior] --> B[Owner-boundary tests]
B --> C[Duplicate local assertions]
C --> D[Focused CI selection]
D --> E[Regression confidence]
Loading

Before merge

  • Complete next step (P2) - No repair is indicated; the protected maintainer label leaves this PR in normal maintainer merge review.
Agent review details

Security

None.

PR surface

Tests -98. Total -98 across 14 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 14 2 100 -98
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 14 2 100 -98

Review metrics

Metric Value Why it matters
Production versus test delta production 0; tests +2/-100 (net -98) The patch reduces test maintenance surface without changing runtime code, configuration, dependencies, or schemas.

Technical review

Best possible solution:

Land the focused deletion after normal exact-head CI, keeping behavioral coverage at the Gateway, protocol, CLI, and projection owners rather than restoring implementation-coupled assertions.

Do we have a high-confidence way to reproduce the issue?

Not applicable: this PR changes regression coverage rather than addressing a reported runtime failure.

Is this the best way to solve the issue?

Yes. The patch removes assertions already enforced at stronger runtime, protocol, and projection boundaries, while preserving the meaningful behavior checks.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 4fc375654d34.

Labels

Label changes:

  • add P3: This is low-risk test-suite cleanup with no production behavior change.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer-authored test-only cleanup has no changed user-visible runtime behavior requiring contributor real-behavior proof.

Label justifications:

  • P3: This is low-risk test-suite cleanup with no production behavior change.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer-authored test-only cleanup has no changed user-visible runtime behavior requiring contributor real-behavior proof.

Evidence

What I checked:

Likely related people:

  • steipete: Recent main history covers the managed-media and CLI test-owner surfaces relevant to this cleanup. (role: recent area contributor; confidence: high; commits: 2adbdd75c6fc, 49e1ea2c9f3f; files: src/gateway/managed-image-attachments.test.ts, src/cli/program/message/helpers.test.ts)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@steipete

Copy link
Copy Markdown
Contributor Author

Land-ready proof for 30899913ea58c0330d6d95259bbe6591647fdd79:

  • Full selected owner/boundary proof: 23 files, 1,145 tests passed and 3 skipped across nine Vitest shards.
  • The broad proof exposed one width-dependent node-table substring; after splitting the hardware label, vendor, and model assertions, all 29 node basics cases and the complete selected proof passed.
  • coreTests, extensionTests, testRoot, and tooling changed gate passed through the documented trusted-source local fallback because no Crabbox/Testbox provider was ready; typechecks, formatting, full core lint, extension lint, dead-export scan, and dependency/plugin guards passed.
  • git diff --check passed.
  • Fresh complete-branch structured autoreview reported no accepted/actionable findings.
  • Exact-head hosted CI passed: https://github.com/openclaw/openclaw/actions/runs/31875355798
  • Native OPENCLAW_TESTBOX=1 scripts/pr prepare-run 124116 passed, reusing hosted exact-head gates; no Testbox lease was required.
  • ClawSweeper exact-head workflow completed successfully: https://github.com/openclaw/clawsweeper/actions/runs/31875410294. Its durable comment remains in the publication placeholder state after a bounded wait, with no published findings or rank-up moves; repository policy says not to block landing on a late publisher.

Production delta: 0. Tests: +2/-100, net -98. No behavior, docs, config, schema, protocol, dependency, or changelog change.

@steipete
steipete merged commit 447393d into main Aug 15, 2026
259 checks passed
@steipete
steipete deleted the test/remove-residual-core-duplicates branch August 15, 2026 09:06
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling app: web-ui App: web-ui cli CLI command changes extensions: onepassword 1Password plugin gateway Gateway runtime maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant