openclaw/qa/scenarios
Teddy Tennant 996c928205
fix(auto-reply): show usage for invalid approval decisions (#137877)
## What Problem This Solves

`/approve abc constructor` and `/approve abc __proto__` returned a failed-submission error instead of usage. The parser read inherited object properties as decisions. It also misread `constructor` when used as an approval ID before a valid decision.

## Why This Change Was Made

Both supported argument layouts now check that a decision is a declared alias before reading its value. The ten aliases and downstream authorization and resolver behavior remain unchanged.

Downstream validation already rejected these values before making a Gateway request. This change gives the caller the normal usage reply at parsing.

## User Impact

Unknown decisions return the usage reply. Valid decisions still resolve pending exec and plugin approvals. An approval ID such as `constructor` also works when followed by a declared decision.

## Evidence

Verified candidate `b03792933d42978e969d9da25748f15fa0f79326` against pinned main `d3a2fb0296`, using separate installs and state on one isolated Linux Testbox.

- Real source Gateway and QA channel: baseline returns the invalid-decision submission error; candidate returns usage. The expanded matrix records 54 cases per pin, including every alias in both layouts, real pending exec/plugin records, duplicates, conflicts, unknown and expired IDs, whitespace, and prototype-like IDs.
- Real Telegram Test Server user and bot: the same before/after behavior, with one lease shared by both pins within each pair. Fast approval commands make zero provider requests. Owner records and resolution events confirm valid decisions take effect once and invalid inputs leave pending approvals unchanged.
- Separate controls cover the named account, unauthorized sender, disabled approval capability, disabled text/native commands, foreign-bot commands, and a real Gateway client missing approval scope. Disabled text handling follows normal deterministic model dispatch without resolving the pending approval.
- Fresh-pending syntax controls preserve whitespace and extra-token behavior. The earlier timed duplicate probe is retained separately because it crossed the existing resolved-entry grace window.
- All 71 focused approval/parser tests and 134 QA catalog tests passed. Changed-file formatting and lint passed. [Exact-head CI](https://github.com/openclaw/openclaw/actions/runs/33940306696) is green.

`toString` and `valueOf` were already rejected after lowercasing; they are preservation controls. Normal channel delivery may update message state. The approval invariant concerns decision and grant effects; audit-row absence is not treated as proof of absence. No execution-identity diagnostics or production approvals were enabled for this proof.

AI-assisted.

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-09-09 00:49:19 +05:30
..
agents test(qa): verify terminal fallback receipts and visible acknowledgments (#138598) 2026-09-04 14:18:18 -07:00
channels fix(auto-reply): show usage for invalid approval decisions (#137877) 2026-09-09 00:49:19 +05:30
character
cli fix(qa): preserve prepared runtime during suites (#130345) 2026-08-29 17:25:32 -07:00
config fix(qa): give hot-reload maintenance proofs their own budgets (#139580) 2026-09-05 19:37:45 -07:00
goals refactor(context-engine): simplify compaction and turn handoffs (#133678) 2026-08-30 22:08:27 -07:00
jsonl-replay
media docs(providers): split the OpenAI provider page by reader job (#141224) 2026-09-09 02:46:25 +08:00
memory fix(gateway): preserve config receipts across reload supersession (#131545) 2026-08-28 00:00:53 -07:00
models fix(qa): preserve monotonic gateway log cursors (#137622) 2026-09-04 21:15:00 +08:00
observability feat(gateway): hot reload diagnostics service settings (#138556) 2026-09-04 19:09:45 -07:00
personal
plugins test(qa): align plugin lifecycle maturity proofs (#141964) 2026-09-08 01:11:48 -07:00
runtime fix(release): restore verification inputs and supported upgrade proof (#140981) 2026-09-07 11:47:27 -07:00
scheduling refactor: share heartbeat and cron execution with reply runtime (#139624) 2026-09-07 14:58:09 -07:00
security refactor(qa): remove gateway child test facade (#122693) 2026-08-12 09:03:40 -07:00
tools
ui fix(qa): restore Gateway credential scenario selection (#141555) 2026-09-07 14:10:50 -07:00
workspace fix(codex): keep progress cards out of chat history (#130022) 2026-08-26 02:28:31 -07:00
index.yaml fix(qa): finish aggregate suites without shared cache races (#120816) 2026-08-10 03:32:04 +08:00