openclaw - 💡(How to fix) Fix tasks audit --limit accepts partially numeric values [1 pull requests]

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…

Fix Action

Fixed

Code Example

$ OPENCLAW_STATE_DIR=$(mktemp -d) node --import tsx src/entry.ts tasks audit --json --limit 1abc
{
  "count": 0,
  "filteredCount": 0,
  "displayed": 0,
  "filters": {
    "severity": null,
    "code": null,
    "limit": 1
  },
  ...
}
RAW_BUFFERClick to expand / collapse

Observed problem

On current origin/main (e3b77d6d2c), openclaw tasks audit --json --limit 1abc is accepted as if the limit were 1.

Real behavior proof from the source CLI:

$ OPENCLAW_STATE_DIR=$(mktemp -d) node --import tsx src/entry.ts tasks audit --json --limit 1abc
{
  "count": 0,
  "filteredCount": 0,
  "displayed": 0,
  "filters": {
    "severity": null,
    "code": null,
    "limit": 1
  },
  ...
}

Current behavior

The tasks audit CLI accepts a partially numeric --limit value and silently truncates it via integer parsing.

Expected behavior

tasks audit --limit should require a positive integer token. Values like 1abc, 1.5, 0, and -1 should be rejected before running the audit.

Duplicate searches performed

I checked open and closed issues/PRs for:

  • tasks audit --limit
  • parsePositiveIntOrUndefined
  • Limit displayed findings
  • parseInt limit CLI
  • tasks audit recent open and closed PRs

Closest matches were general task-audit false-positive work, gateway-rpc --timeout validation (#54646), message-format limit handling (#79593), and broad command-validation work (#83391), but none covered this tasks audit --limit parsing path.

Candidate fix shape

Use a strict positive-integer parser for the tasks audit --limit option in both the registered Commander path and the lean JSON route, then add focused regressions that invalid partial values do not reach tasksAuditCommand or tasksAuditJsonCommand.

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…

FAQ

Expected behavior

tasks audit --limit should require a positive integer token. Values like 1abc, 1.5, 0, and -1 should be rejected before running the audit.

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 tasks audit --limit accepts partially numeric values [1 pull requests]