openclaw - 💡(How to fix) Fix Broad CLI command surface has no test coverage [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#83877Fetched 2026-05-20 03:47:49
View on GitHub
Comments
1
Participants
2
Timeline
6
Reactions
1
Timeline (top)
labeled ×5commented ×1

Fix Action

Fix / Workaround

Severity: medium / Confidence: high / Category: test-gap Triage: test-gap Detected against: openclaw v2026.5.18 (latest stable at time of scan, 2026-05-18) Tooling: clawpatch 0.3.0 + acpx/claude-sonnet-4-5 via Brad Mills protocol


Standardized clawpatch finding. Persistent in v2026.5.18 (not resolved by upgrading from v2026.5.12). Finding ID: fnd_sig-feat-cli-command-0029f9d57b-_5467af03cd.

RAW_BUFFERClick to expand / collapse

Severity: medium / Confidence: high / Category: test-gap Triage: test-gap Detected against: openclaw v2026.5.18 (latest stable at time of scan, 2026-05-18) Tooling: clawpatch 0.3.0 + acpx/claude-sonnet-4-5 via Brad Mills protocol

Evidence

  • extensions/browser/src/cli/browser-cli-actions-input/register.element.ts:41-226 (registerBrowserElementCommands)

  • extensions/browser/src/cli/browser-cli-actions-input/register.navigation.ts:14-67 (registerBrowserNavigationCommands)

  • extensions/browser/src/cli/browser-cli-actions-input/register.form-wait-eval.ts:14-103 (registerBrowserFormWaitEvalCommands)

Reasoning

The three test files cover only: download/waitfordownload outer timeout sizing, dialog --accept/--dismiss conflict, wait command outer timeout, and readFields field normalization. Completely untested at CLI level: click, click-coords, type, press, hover, scrollintoview, drag, select (all of register.element.ts), navigate and resize (register.navigation.ts), fill and evaluate (register.form-wait-eval.ts), and upload (register.files-downloads.ts). This represents 12 of 16 commands with zero CLI-layer tests. The input validation and body-building logic for each untested command can regress silently.

Recommendation

Add a register.element.test.ts and extend existing test files to cover at minimum: (1) that each command sends the expected body kind to callBrowserRequest, (2) requireRef rejects blank ref with exit 1, (3) the NaN coordinate guard once added. Use the existing test-support helpers (createBrowserProgram, getBrowserCliRuntime) that are already set up.

Why existing tests miss this

No test file exists for register.element.ts or register.navigation.ts at all. The form/files tests only cover timing and conflict behavior, not the primary success paths or input validation.

Suggested regression test

it('sends click body with correct ref', async () => { const program = createActionInputProgram(); await program.parseAsync(['browser', 'click', 'e42'], { from: 'user' }); const [, req] = mocks.callBrowserRequest.mock.calls.at(-1); expect(req.body).toMatchObject({ kind: 'click', ref: 'e42' }); }); it('rejects blank ref', async () => { const program = createActionInputProgram(); await program.parseAsync(['browser', 'click', ' '], { from: 'user' }); expect(getBrowserCliRuntime().exit).toHaveBeenCalledWith(1); });

Minimum fix scope

New register.element.test.ts; extensions to register.form-wait-eval.test.ts for fill/evaluate; extensions to register.files-downloads.test.ts for upload.


Standardized clawpatch finding. Persistent in v2026.5.18 (not resolved by upgrading from v2026.5.12). Finding ID: fnd_sig-feat-cli-command-0029f9d57b-_5467af03cd.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix Broad CLI command surface has no test coverage [1 comments, 2 participants]