GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — id(repl): find/search/show/peek parsers silently swallow unknown and mistyped flags — a typo'd flag vanishes and its value becomes a query · Issue #2274 · developing-today/code

id(repl): find/search/show/peek parsers silently swallow unknown and mistyped flags — a typo'd flag vanishes and its value becomes a query #2274

New issue
Copy link
New issue
Copy link
Closed
#3092
Closed
id(repl): find/search/show/peek parsers silently swallow unknown and mistyped flags — a typo'd flag vanishes and its value becomes a query#2274
#3092
Copy link
Assignees
dezren39
Labels
app/idPackage/app: id (pkgs/ or apps/ in this repo)effort/sSmall: expected under 2 hours of workkind/bugSomething isn't working (prefixed form of the classic bug label)priority/normalOrdinary priority (the default)source/creatorFiled by the new-issue-creator jobtask/triageQueue packet kind: verify, reproduce, and route this item

Description

@dezren39
dezren39
opened on Oct 29, 2026
Issue body actions

Problem

The REPL's find/search/show/peek argument parsers silently swallow malformed flags. Both parsers return plain values (no Result), and any token they don't recognize is dropped without a word:

  • parse_find_args — pkgs/id/src/repl/runner.rs:627; the fall-through at :706 only collects tokens that do not start with -, so every unknown --flag vanishes.
  • parse_peek_args — runner.rs:1162; same fall-through at :1234.

Verified behavior (laptop probe, verbatim parsers extracted from main 5a34fa70, ~/git/fleet/probe-2026-10-29-laneB-replflags/)

Input Result
find report --bogus queries=["report"], no error — flag silently gone
find report --fist 2 (typo of --first) queries=["report", "2"] — the typo'd flag is dropped and its would-be value becomes a search query
find report --format yaml format="yaml" accepted verbatim; the match printers (helpers.rs print_match_cli/print_matches_cli, print_match_repl) fall through to the default format for any unknown value, so the user gets the default rendering with no hint their format was ignored
find report --dir / --exclude / --format (trailing, no value) silently no-op (runner.rs:659, :664, :701 guard on i + 1 < rest.len() and otherwise do nothing)
find report > output_file=Some(""), to_file=true (runner.rs:656 strip_prefix('>') accepts the empty path); the single-match path then calls ctx.get(name, Some(""))
peek report --bogus, peek report -o, peek report --lines same silent drops in parse_peek_args

Control: find report --all parses as expected (all=true).

Why it matters

The REPL is the interactive surface of id. A mistyped flag doesn't just fail to apply — it can change the query set (--fist 2 searches for 2), redirect output to an empty path, or render a different format than asked, all silently. Users have no way to tell their command wasn't the command that ran. The CLI side (clap) rejects unknown flags loudly; the REPL should not be the silent exception.

Distinct from #2009 (non-numeric --first/--last/--lines values becoming queries — a value-consumption bug in the same functions): this issue is about tokens the parsers never recognize at all, value-flags missing their value, and the bare > redirect.

Acceptance criteria

  • An unknown --flag in find/search/show/peek REPL commands produces a visible error or usage message naming the flag (triage pins: hard error vs warning-and-continue), and never silently alters the query set.
  • A value-flag (--dir, --format, --exclude, -o/--output, --lines/-n) with no following value is reported, not silently dropped.
  • A bare > (empty redirect target) is reported instead of setting output_file=Some("").
  • --format with a value outside {tag, group, union} is reported (or the printers stop falling through silently — triage pins which layer owns this).
  • Regression tests in runner.rs cover: unknown flag, typo'd flag with a following value, trailing value-flag, bare >, bad --format value; existing parser tests still pass.

Filed by new-issue-creator-code-b (Lane B), verified this run.

Activity

Next
  1. developing-today commented on Oct 29, 2026

    @developing-today
    developing-todayBot
    on Oct 29, 2026 – with developing.today
    Contributor
    More actions

    CODE-1135

  2. dezren39
    added
    queue/queuedHas a queued queue task
    source/creatorFiled by the new-issue-creator job
    task/triageQueue packet kind: verify, reproduce, and route this item
    status/needs-triageNot yet triaged; needs a first look
    priority/normalOrdinary priority (the default)
    app/idPackage/app: id (pkgs/ or apps/ in this repo)
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    effort/sSmall: expected under 2 hours of work
    on Oct 29, 2026
  3. dezren39 commented on Oct 29, 2026

    @dezren39
    dezren39
    on Oct 29, 2026
    MemberAuthor
    More actions

    🤖 Agent note · filed

    • Agent: new-issue-creator (new-issue-creator-code-b)
    • Session / ID: new-issue-creator-code-b cron run 2026-10-29T11:26Z
    • Found via: filed this run
    • Task: Filed id(repl): find/search/show/peek parsers silently swallow unknown and mistyped flags — a typo'd flag vanishes and its value becomes a query #2274 — REPL find/search/show/peek parsers (runner.rs parse_find_args:627 / parse_peek_args:1162) silently drop unknown flags, typo'd-flag values become queries, trailing value-flags no-op, bare > sets an empty output path. Verified with a laptop probe of the verbatim parsers (main 5a34fa7).
    • Expectation: effort/s — triage pins error vs warning UX and which layer owns --format validation, then routes the fix.
    • Links: queue packet packet-2274-triage.json (repo-health-code-pilot)
  4. github-actions
    assigned
    dezren39
    on Oct 29, 2026
  5. dezren39
    added
    queue/claimedQueue worker lifecycle state
    status/in-progressQueue worker lifecycle state
    and removed
    status/needs-triageNot yet triaged; needs a first look
    queue/queuedHas a queued queue task
    on Oct 31, 2026
  6. 4 remaining items

  7. dezren39
    added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    status/in-progressQueue worker lifecycle state
    and removed
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    queue/queuedHas a queued queue task
    on Oct 31, 2026
  8. dezren39 commented on Oct 31, 2026

    @dezren39
    dezren39
    on Oct 31, 2026
    MemberAuthor
    More actions

    🤖 Agent note · picked up

    • Agent: repo-worker-code, OpenChamber scheduled lane
    • Session / ID: queue task 4318
    • Found via: atomic queue claim
    • Task: Revalidate parser issue and check for existing work before implementing.
    • Expectation: Fix and verify if unowned; otherwise park.
    • Links: id(repl): find/search/show/peek parsers silently swallow unknown and mistyped flags — a typo'd flag vanishes and its value becomes a query #2274
  9. dezren39
    removed
    status/in-progressQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    on Oct 31, 2026
  10. dezren39 commented on Oct 31, 2026

    @dezren39
    dezren39
    on Oct 31, 2026
    MemberAuthor
    More actions

    🤖 Agent note · handed off

    • Agent: repo-worker-code, OpenChamber scheduled lane
    • Session / ID: queue task 4318
    • Task: Opened PR fix(id): reject malformed REPL flags #3092 at 06fc155; queue task completed as pr_opened.
    • Verification: 25 targeted REPL tests passed; git diff --check passed. Workspace-wide cargo fmt --check reports unrelated formatting differences. Only a neutral CodeRabbit check was visible at handoff; CI not verified.
    • Links: fix(id): reject malformed REPL flags #3092
  11. dezren39
    added a commit that references this issue on Nov 2, 2026

    fix(id): let --exclude take hyphen-prefixed patterns (#2274)

    763816a
  12. dezren39
    closed this as completedin #3092on Nov 2, 2026
  13. dezren39 commented on Nov 2, 2026

    @dezren39
    dezren39
    on Nov 2, 2026
    MemberAuthor
    More actions

    🤖 Agent note · done

    • Agent: queue worker (repo-worker-code), lane A shift
    • Session / ID: task 6012 (repo-queue-worker-shift, 2026-11-02 08:04 CST run)
    • Found via: queue claim (task 6012, the Consolidate open PRs #3092 and #4072: both rewrite the id REPL argument parsers in runner.rs and overlap #4116 PR-set shepherd)
    • Task: Verified id(repl): find/search/show/peek parsers silently swallow unknown and mistyped flags — a typo'd flag vanishes and its value becomes a query #2274's behavior on main after the set landed: PR fix(id): reject malformed REPL flags #3092 merged as 72774b5 (2026-11-02T14:08:43Z). On current main, both parse_find_args and parse_peek_args in pkgs/id/src/repl/runner.rs now bail on unknown flags, error on missing values via required_value, error on a bare >, carry invalid --format as format_error, and accept hyphen-prefixed --exclude patterns via required_pattern — with tests test_find_rejects_malformed_flags_and_redirects and test_peek_rejects_malformed_flags_and_missing_values in the tree. Closing as fixed.
    • Expectation: done — no further work; the id workflow run for main is queued behind the current CI runner backlog and will confirm in CI.
    • Links: PR fix(id): reject malformed REPL flags #3092 (merged), PR fix(id/repl): reject nonnumeric result limits #4072 (merged, sibling id(repl): a non-numeric --first/--last/--lines value silently becomes a search query — 'find report --first two' searches for 'two' too, truncated to 1 #2009), issue Consolidate open PRs #3092 and #4072: both rewrite the id REPL argument parsers in runner.rs and overlap #4116
  14. dezren39 commented on Nov 2, 2026

    @dezren39
    dezren39
    on Nov 2, 2026
    MemberAuthor
    More actions

    🤖 Agent note · done

    • Agent: queue worker (repo-worker-code), lane code-b
    • Session / ID: task 6151
    • Found via: queue claim
    • Task: task 6151 (resume PR fix(id): reject malformed REPL flags #3092, disposition Codex P2, merge) verified already done: PR fix(id): reject malformed REPL flags #3092 MERGED 2026-11-02T14:08:43Z (merge 72774b5, via task 6012); Codex P2 4432040016 was fixed by commit 763816a "fix(id): let --exclude take hyphen-prefixed patterns (id(repl): find/search/show/peek parsers silently swallow unknown and mistyped flags — a typo'd flag vanishes and its value becomes a query #2274)" with regression tests for --exclude -draft in pkgs/id/src/repl/runner.rs; issue id(repl): find/search/show/peek parsers silently swallow unknown and mistyped flags — a typo'd flag vanishes and its value becomes a query #2274 CLOSED.
    • Expectation: task 6151 completed with outcome already_done; no new work needed.
    • Links: PR fix(id): reject malformed REPL flags #3092 · issue id(repl): find/search/show/peek parsers silently swallow unknown and mistyped flags — a typo'd flag vanishes and its value becomes a query #2274
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @dezren39
    dezren39

Labels

app/idPackage/app: id (pkgs/ or apps/ in this repo)effort/sSmall: expected under 2 hours of workkind/bugSomething isn't working (prefixed form of the classic bug label)priority/normalOrdinary priority (the default)source/creatorFiled by the new-issue-creator jobtask/triageQueue packet kind: verify, reproduce, and route this item

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.