Skip to content

refactor(cli): consolidate camera command tests - #200144

Merged
roboclaw-bot merged 2 commits into
mainfrom
openclaw/slop-camera-publish-20261116
Nov 16, 2026
Merged

roboclaw-bot merged 2 commits into
mainfrom
openclaw/slop-camera-publish-20261116

Conversation

@roboclaw-bot

Copy link
Copy Markdown
Collaborator

Related: #171994

What Problem This Solves

The camera CLI tests maintain a second mock-heavy registration harness for contracts that can run through the existing command-boundary suite.

User Impact

No user-visible behavior changes. Camera options, defaults, payload compatibility, validation order, output bytes, and terminal sanitization remain unchanged; no configuration, dependency, or migration changes are required.

Why This Change Was Made

Move the assertions into the existing Commander-to-Gateway boundary suite and retire the duplicate runtime, RPC, and no-op writer mocks. Real media writers now serve the retained success cases, with one test-owned temporary-root fixture that also cleans up failures before a path is logged. This is part of @vincentkoc's explicitly requested behavior-preserving cleanup campaign, not a repair of the unrelated baseline failures below.

Evidence

  • Baseline: 20/20 cases passed. Final keeper: 19/19 passed; one overlapping both-facing assertion joins the existing URL-snap case. All 13 former leaf contracts and seven existing keeper contracts remain. Production delta: zero; test/support delta: −72 lines.
  • Seven deliberate real-owner mutations were caught: facing normalization/defaults, numeric forwarding, preflight-before-publication, stopping before activating the second camera, Windows payload compatibility, and terminal sanitization. Source bytes were restored exactly. Deliberate assertion-failure and failure-before-logging probes both verified temporary-root removal.
  • Targeted format, lint, test typecheck, mock-export and assertion-safety guards passed. Unit siblings: 67/67 passed. A six-file run had 124 passing cases and one failure in the unchanged diagnostics-auth JSON staging case; the identical failure reproduces on the exact clean base (112 passing cases).
  • All seven removal-scan phases ran on the candidate and exact base: two passed; five remained red with identical findings and no new findings. Existing findings concern Google catalog export, continuation types/UI grouping, and worker-scheduling/cache-retention fixtures. No ignore or baseline was changed. The aggregate scans are not green.
  • Fresh independent Codex autoreview of the complete local change against 225d22fc502022fe84f0702f931042c54bab55f8, including unchanged owners and proof context: complete, scoped-clean at P0–P2, no actionable findings. Local ClawSweeper was unavailable through the admitted local entrypoints; hosted review will be requested once ready under the documented fallback.
  • Measured wall time: baseline 179.78 s including cold preparation; final keeper 48.80 s including cold worker generation (90 ms case bodies); cache-hit keeper in the sibling run approximately 1 s. These are different cache states, not a speedup comparison. CI timing remains pending.

No live-camera/hardware or full-suite success is claimed for this test-only cutover.

Thanks @vincentkoc.

Work sessions

Linked for team reference; these sessions aren’t public.

Worked on by

roboclaw-bot and others added 2 commits November 16, 2026 14:56
Move registration-layer assertions into the existing command-boundary suite, retire duplicate RPC/runtime/writer mocks, and use one failure-safe temporary-root fixture. Keep production behavior and all existing camera contracts unchanged.

Co-authored-by: vincentkoc <[email protected]>
Worked on by:
- @vincentkoc

Co-authored-by: vincentkoc <[email protected]>
OpenClaw-Publication: 4047b1eb-efa6-46c8-b4e5-4f52af37d47d
@clawsweeper

clawsweeper Bot commented Nov 16, 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.

@openclaw-barnacle openclaw-barnacle Bot added cli CLI command changes size: M labels Nov 16, 2026
@roboclaw-bot
roboclaw-bot merged commit f6d0c3e into main Nov 16, 2026
109 checks passed
@roboclaw-bot
roboclaw-bot deleted the openclaw/slop-camera-publish-20261116 branch November 16, 2026 15:12
@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

Merged via squash.

@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Nov 16, 2026
@clawsweeper

clawsweeper Bot commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR moves camera command contracts into the existing CLI boundary suite and removes the duplicate registration test harness.

Example: Run openclaw nodes camera snap --facing both when the back camera returns not-base64!.

  • Before: A separate registration harness checks that neither image is published.
  • After: The shared Commander-to-Gateway suite checks the same rejection and publication ordering using the real media writers.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) A focused and apparently correct consolidation supported by in-process preservation evidence and green CI; validation remains harness-based.
Proof confidence 🦐 gold shrimp (3/6) No shipped-entry-point proof is required for this test-only consolidation; the PR reports baseline, candidate, mutation, and cleanup probes, supported by successful exact-head CI.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Test only · Worth it: Yes · Fix scope: Complete
Reason: The maintainer-authored direction has concrete maintenance value: retire a duplicate harness while preserving camera behavior contracts and strengthening use of real media writers.

Merge readiness

✅ Ready for maintainer review

This PR is a useful, scoped test consolidation with no actionable correctness or security findings; the reviewed head is mergeable and its CI gate passes.

Priority: P3
Reviewed head: 89c023be6513e49a61520560f8542cdc27ddf79a

Before merge

None.

Findings

None.

Agent review details

How this fits together

The camera CLI translates Commander options into node Gateway requests, validates returned media, and prints saved paths or camera listings; this PR changes only the tests surrounding that flow.

flowchart LR
  A[Command arguments] --> B[Commander registration]
  B --> C[Node RPC adapter]
  C --> D[Mock Gateway responses]
  D --> E[Media validation and writers]
  E --> F[Test owned temporary files]
  B --> G[Captured runtime output]
Loading

Technical review

Best possible solution:

Keep the camera contracts in the existing command-boundary suite, with real writers and one test-owned temporary-root cleanup mechanism.

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

There is no reported runtime defect to reproduce; source inspection confirms the duplicate harness and transferred contracts.

Is this the best way to solve the issue?

The change follows the existing test owner, preserves distinct failure cases, and replaces path-by-path cleanup with the repository's established temporary-directory tracker.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against b9d11df14f80.

Provenance checked

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

PR surface

Tests -72. Total -72 across 2 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 2 141 213 -72
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 141 213 -72

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Labels

Label changes:

  • add P3: This is behavior-preserving test maintenance with no production or configuration changes.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P3: This is behavior-preserving test maintenance with no production or configuration changes.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed November 16, 2026, 10:12 AM ET / 15:12 UTC.

vincentkoc added a commit that referenced this pull request Nov 16, 2026
…tgres-compaction-watched-prompt-20261116

* commit '9e810f7101557b006d5ff223d955f14dc43329f0': (23 commits)
  chore(ui): refresh control ui locales (#200164)
  fix(update): stop reporting unset git config keys as failing checks (#200153)
  test: consolidate redundant coverage (198793, part 2) (#198936)
  revert: skills-used full-transcript scan on every chat history page (#200159)
  refactor(sessions): follow the chat by key for stored delivery references (#200099)
  fix(update): bridge 2026.11.5-beta.4 updaters (#200152)
  fix(gateway): avoid filesystem stalls during catalog refresh (#200136)
  fix(ci): match update refusal probe to selected candidate (#200043)
  fix(agents): keep read-only steering carriers when publishing suppressed user envelopes (#200156)
  test: consolidate suites while retaining recovery owners (#198933)
  test: consolidate redundant coverage (198789, part 2) (#198932)
  refactor(cli): consolidate camera command tests (#200144)
  fix(cli): avoid initializing provider runtime during cleanup (#200139)
  fix(ui): show mobile destinations without the drawer exit delay (#198879)
  chore(ui): refresh control ui locales (#200146)
  fix(knowledge): keep historical claims distinct and reject changed retries (#200140)
  fix(ui): align dropdown arrows on mobile New Session
  improve(sessions): archive inactive transcripts by default (#199899)
  refactor(agents): own background commands and yield waits by the chat (#200097)
  fix(models): guessed non-chat models leave the default picker instead of being refused (#200102)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 17, 2026
* refactor(cli): consolidate camera command tests

Move registration-layer assertions into the existing command-boundary suite, retire duplicate RPC/runtime/writer mocks, and use one failure-safe temporary-root fixture. Keep production behavior and all existing camera contracts unchanged.

Co-authored-by: vincentkoc <[email protected]>

* refactor(cli): consolidate camera command tests

Worked on by:
- @vincentkoc

Co-authored-by: vincentkoc <[email protected]>
OpenClaw-Publication: 4047b1eb-efa6-46c8-b4e5-4f52af37d47d

---------

Co-authored-by: vincentkoc <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli CLI command changes P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: M 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