openclaw - 💡(How to fix) Fix No tests for any file in src/cli#1 group [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#83905Fetched 2026-05-20 03:47:03
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
1
Timeline (top)
closed ×1commented ×1labeled ×1unsubscribed ×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-17e3589ff2-_f363ab05b3.

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

  • src/cli/argv.ts:1-1 (None)

  • src/cli/channel-auth.ts:1-1 (None)

  • src/cli/acp-cli.ts:1-1 (None)

Reasoning

The feature manifest lists zero tests. The argv.ts file contains intricate parsing logic (isHelpOrVersionInvocation, getCommandPositionalsWithRootOptions, buildParseArgv, shouldMigrateState) with numerous branching conditions. channel-auth.ts has auth-sensitive flows (login/logout, gateway fallback, config commit). These are high-value targets for regression: a one-character change to the positional-help detection logic or the FLAG_TERMINATOR (see Finding 1) would be invisible without tests. The hardcoded '"--"' bug (Finding 1) and the Commander attribute bug (Finding 3) are both undetectable at present.

Recommendation

Add colocated *.test.ts files for at least: (1) argv.ts covering isHelpOrVersionInvocation, getCommandPathWithRootOptions, buildParseArgv, shouldMigrateState with representative argv vectors; (2) acp-cli.ts covering option parsing including --no-prefix-cwd; (3) channel-options.ts covering cache reset and dedupe behaviour.

Why existing tests miss this

No tests exist; this is the gap being reported.

Suggested regression test

vitest suite in src/cli/argv.test.ts: table-driven tests over known argv vectors for each exported function, covering help/version flags, root-option skipping, FLAG_TERMINATOR boundary, and shouldMigrateState command whitelist.

Minimum fix scope

New test files; no production code change required.


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

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 No tests for any file in src/cli#1 group [1 comments, 2 participants]