Skip to content

v2.6.0: address 14 OpenClaw audit findings - #21

Merged
chenliuyun merged 3 commits into
mainfrom
fix/2.6.0-openclaw-findings
Apr 21, 2026
Merged

v2.6.0: address 14 OpenClaw audit findings#21
chenliuyun merged 3 commits into
mainfrom
fix/2.6.0-openclaw-findings

Conversation

@chenliuyun

@chenliuyun chenliuyun commented Apr 21, 2026

Copy link
Copy Markdown
Collaborator

Summary

Response to the external v2.5.1 smoke-test report (OpenClaw, 1016 cases,
96.8% pass). 14 of the 21 findings fixed in one minor bump; 2 reviewer
errors declined with rationale; 4 P3 items (daemon, standalone npx
MCP package, self-test, record/replay) parked on the v3.x roadmap.

  • P0 (correctness): param-validator covers setBrightness /
    setColor / Curtain setPosition (B-1); unknown deviceId exits 2
    by default with --allow-unknown-device escape hatch (B-3);
    capabilities subcommand leaves carry commandMeta and a flat
    path-lookup is published at the top (B-4); devices commands <type...>
    is truly variadic (B-7); setColor accepts rgb/hex/named colors (B-12).
  • P1 (usability): --filter key!=value (B-5); --flag=value
    equals form recognized everywhere (B-6); catalog list / catalog search (B-8); capabilities --used (B-9); scenes describe plaintext
    renders candidates (B-10).
  • P2 (robustness): --retry-on-5xx <n> for idempotent GETs (B-11);
    every terminal error routes through emitJsonError/handleError so
    --format=json failures stay parseable (B-14); ambiguous --name hint
    names both strategies (B-15); --table-style markdown empty rows
    render as _(empty)_ (B-16).

Two soft-breaking defaults — invalid params now exit 2 pre-network, and
unknown deviceId no longer passes through silently — are called out
in the ### Changed section of the CHANGELOG along with their escape
hatches (--skip-param-validation, --allow-unknown-device).

Full details: CHANGELOG entry for 2.6.0.

Test plan

  • npm run build:prod — clean
  • npm test — 985/985 pass (up from 959)
  • bash tmp/canary/par.sh — 50-concurrent real-API smoke (needs live token; run before tag)
  • Manual smoke (commands listed in the plan):
    • --dry-run setBrightness 101 → rc=2
    • --dry-run setColor "#FF0000" → rc=0, normalized 255:0:0
    • --dry-run turnOn ZZZZ000000ZZ → rc=2 + candidates
    • … ZZZZ000000ZZ turnOn --allow-unknown-device → rc=0
    • --filter "type!=Meter" --format=json
    • --format=json devices list
    • devices commands Bot Curtain → two sections
    • catalog list / catalog search Hub
    • capabilities --used --format=json
    • scenes describe ZZZ → plaintext Did you mean: …

chenliuyun added 3 commits April 21, 2026 00:01
Captures the style used for v2.5.1: release title is the version number
alone, body is one or two sentences plus a link to the matching CHANGELOG
section rather than a duplicated dump. Example included.
Response to the external v2.5.1 smoke-test report. Fourteen findings
grouped into three severity tiers — all in one minor bump.

P0 (correctness):
- param-validator covers setBrightness (int 1-100), setColor (rgb/hex/
  named), and Curtain setPosition single-value form (B-1).
- unknown deviceId in 'devices command' exits 2 by default with a
  candidate list; --allow-unknown-device restores pass-through (B-3).
- capabilities.subcommands[] leaves carry per-command meta, and a flat
  commandMeta path-lookup is published at the top level (B-4).
- 'devices commands <type...>' is truly variadic now — 'Bot Curtain'
  prints both sections, multi-word unquoted form still works (B-7).
- setColor accepts R:G:B, R,G,B, #RRGGBB, #RGB, and 16 CSS named colors;
  all normalize to R:G:B before hitting the API (B-12).

P1 (usability):
- '--filter key!=value' (neq) across list/batch/events tail. Substring
  by default; exact for 'category' (B-5).
- getFlagValue recognizes '--flag=value' everywhere (was silently
  dropped for --format/--timeout/--config/--fields/…) (B-6).
- catalog list alias for show; catalog search <keyword> fuzzy match (B-8).
- capabilities --used filters per-type summary to locally-cached
  devices (B-9).
- 'scenes describe <unknown>' plaintext branch renders 'Did you mean:
  …?' candidates (JSON branch already did) (B-10).

P2 (robustness):
- --retry-on-5xx <n> (default 2) transparently retries 502/503/504
  and request timeouts on idempotent GETs. Mutating calls never
  auto-retry (B-11).
- All terminal error paths route through emitJsonError/handleError so
  --format=json failures are always parseable (B-14).
- Ambiguous --name hint names both --name-strategy=fuzzy and =first
  (B-15).
- Empty results under --table-style markdown render as _(empty)_
  rather than a header-only skeleton (B-16).

Soft-breaking (flagged in CHANGELOG):
- Invalid setBrightness/setColor/setPosition now exit 2 before the
  network call. --skip-param-validation is the narrow escape hatch.
- Unknown deviceId exits 2 by default. --allow-unknown-device restores
  pass-through.

Rejected / deferred:
- B-2 (MCP error envelope) and B-13 (expand scope) are reviewer errors
  — current behavior is correct; README / plan note the rationale.
- B-17 / B-18 / B-19 / B-21 are v3.x track (roadmap in README).
- B-20 full rollout deferred; this minor only seeds humanHint in the
  two validators it touches.
- package.json / package-lock.json: 2.5.1 → 2.6.0.
- CHANGELOG: v2.6.0 entry — Added/Fixed/Changed, with the two
  soft-breaking defaults (stricter param validation, unknown-deviceId
  gate) called out under Changed.
- README: != operator row in the per-command filter table; updated
  parameter-validation paragraph to cover setBrightness / setColor /
  setPosition and the new escape hatches; catalog list/search;
  capabilities --used; devices expand scope clarification; Roadmap
  section for the v3.x track (B-17/18/19/21 parked there).
@chenliuyun
chenliuyun merged commit 6c6addf into main Apr 21, 2026
4 checks passed
@chenliuyun
chenliuyun deleted the fix/2.6.0-openclaw-findings branch April 21, 2026 00:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant