Skip to content

Distinguish parser budget exhaustion from unresolved and runtime-dependent syntax #996

Closed

Description

@yashrajp22

The tool-misuse parser exposes one boolean bounded-parse hook. Its callers report every true result as static_parse_limit, although the helper can stop because of a numeric span/depth/expansion budget, unresolved quoting, unsupported reconstruction, or runtime-selected command behavior. Some paths also conservatively flag an executable command string without exceeding any numeric span.

Expected behavior:

  • Record the limitation where the parser knows its cause, with a stable allowlisted check and cause subtype.
  • Distinguish a measured budget limit from an unresolved boundary, proven malformed input, unsupported syntax and runtime-dependent inspection.
  • Attach source file/line provenance and known observed/effective limits with units. A bounded prefix count must not be presented as the total unknown expression size.
  • Preserve the existing boolean hook and incomplete-analysis/security behavior for callers.
  • Preserve provenance across normalized text, declared-marker views, multiline/Unicode/CRLF input and scanner windows.
  • Never log command text, model payloads or arbitrary untrusted diagnostic fields.

Main inspected: e14c450. This issue concerns honest parser diagnostics and source attribution; existing language-boundary fixes remain separate. Resource measurement projection is tracked in #993.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions