Skip to content

fix(cli): machine error classification, click option bugs, query handling edge cases #548

Closed

Description

@Sinity

Cluster: CLI correctness

Findings from the post-hoc bot review audit (#544).

CONFIRMED

  1. machine_errors.py (3 findings):

    • wants_json() docstring says it checks sys.argv but actually checks os.environ
    • --print-path misclassified as machine flag
    • _MACHINE_FLAGS tuple missing entries
  2. commands/products.py (3 findings):

    • Click.Option(is_flag=True, default=None) creates three-state tristate
    • param_decls includes bare "json_mode" causing double-dash requirement
    • Bare help param name shadows Click built-in
  3. helper_summary.py: str(check.status) used as dict key instead of enum member

  4. click_option_groups.py (3 findings):

    • _validate_provider_tokens hardcodes param_hint="--provider"
    • Skips provider normalization for empty values
    • Produces bare --provider in help regardless of the field
  5. check_workflow.py (2 findings):

    • _runtime_only_requested returns False for preview/vacuum
    • _run_blob_store_check prints to stdout despite JSON mode
  6. commands/run.py: --reparse flag fires regardless of --stage sequence constraints

  7. root_request.py: append_query_terms doesn't call coerce_query_terms

  8. query_verbs.py (3 findings):

    • show/open ID fast-path skips provider validation
    • ctx.parent referenced without None check
    • Bare id parameter could collide with Python built-in
  9. helpers.py: latest_mtime sentinel at 0.0 means epoch-start timestamps are indistinguishable from "no file"

  10. schema_command_support.py: _privacy_level silently defaults to "standard" with no user feedback

  11. query_progress.py: NaN/Inf not rejected in environment threshold

  12. mcp/server_prompts.py (2 findings):

    • compare_conversations lacks resolve_id
    • extract_code uses to_list()[:N]

Ref #544

Activity

  1. added a commit that references this issue on May 7, 2026
    d693836
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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