Repository navigation
fix(tasks): reject invalid CLI filter values - #124520
Merged
Merged
Conversation
Contributor
|
🦞👀 Pull request received. I will update this pull request when review starts. |
steipete
marked this pull request as ready for review
August 16, 2026 09:01
Contributor
Author
|
Merged via squash.
|
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Aug 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Problem This Solves
Fixes an issue where closed-set CLI filters silently accepted invalid values and reported empty task, TaskFlow, audit, or model results. In human mode this could confidently tell an operator that no tasks or models existed after a typo.
The same sweep found
browser console --level: unknown values were accepted, and the documentedwarnvalue was treated asinfobecause the collector only recognizedwarning.Why This Change Was Made
Task runtimes/statuses now come from canonical tuples in the task registry domain, with a distinct TaskFlow status tuple because flows genuinely own
waitingandblocked. Task and TaskFlow audit codes remain producer-owned and feed one de-duplicated system-audit vocabulary. Both Commander handlers and the route-first JSON task path validate before reading registry state, while help text is generated from those same owners.models list --providerremains dynamic: after config, manifest metadata, and configured entries are loaded, it canonicalizes the requested id and checks it against the already-loaded installed/configured provider inventory before any model registry/catalog discovery. A known provider with no rows remains a successful empty result.User Impact
Invalid task, TaskFlow, audit, model-provider, and browser-console filters now name the accepted values or recovery command and exit non-zero. Lowercase task enums remain exact-match, matching the existing audit and Commander enum behavior;
RUNNINGis rejected rather than silently normalized.Successful JSON shapes are unchanged. Valid filters that match no rows still exit 0, and valid filters with rows still return them.
Evidence
Before, each reported value exited 0 with an empty result. After the isolated built-artifact run:
tasks list --status bogus --jsontasks list --status RUNNING --jsontasks list --runtime bogus --jsontasks flow list --status bogus --jsontasks audit --severity boguswarn or error, exit 1tasks audit --code bogus-codemodels list --provider bogus --jsonbrowser console --level bogus --jsonerror, warn, or info, exit 1Must-not-break proof in the same isolated state:
tasks list --status running --json-> unchanged empty task payload, exit 0.empty-providerwithmodels: [], thenmodels list --provider empty-provider --json->{ "count": 0, "models": [] }, exit 0.models list --provider openai --json-> one model row, exit 0.No background tasks foundorNo models found.Validation:
warnalso includedinforows.node scripts/check-changed.mjson Blacksmith Testboxtbx_01m04rfn0dzc5n2mkdey4cs74r: clean.pnpm buildon the same Testbox: clean.OPENCLAW_STATE_DIR=$(mktemp -d),OPENCLAW_SKIP_CHANNELS=1, directdist/entry.js; no live operator state or Gateway port used.AI-assisted: yes. The implementation and evidence above were inspected and verified.