GeezerVison is showing github.com — id(tags): clippy-lint fails on main — expect() on Option in parse_search_query (tags.rs:1484,1499) breaks the flake check for every PR · Issue #2008 · developing-today/code
id(tags): clippy-lint fails on main — expect() on Option in parse_search_query (tags.rs:1484,1499) breaks the flake check for every PR #2008Labels app/idPackage/app: id (pkgs/ or apps/ in this repo)effort/xsTrivial: expected under 30 minutes of workkind/bugSomething isn't working (prefixed form of the classic bug label)meta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedpriority/highImportant and time-sensitivesource/queue-workerFiled or worked by the queue/worker pilottask/triageQueue packet kind: verify, reproduce, and route this item DescriptionProblem
nix flake check's clippy-lint check fails on current main for the id crate, blocking the aggregate flake check on every PR (observed on PR #1838, a docs-only change to pkgs/id/TODO.md, run 40775308431, job 123141230630, 2026-10-28T23:31Z):
error: used `expect()` on an `Option` value
--> src/tags.rs:1484:22
|
1484 | let ch = input[i..].chars().next().expect("i is a char boundary");
error: used `expect()` on an `Option` value
--> src/tags.rs:1499:22
|
1499 | let ch = input[i..].chars().next().expect("i is a char boundary");
error: could not compile `id` (lib) due to 2 previous errors
The code is on main today (introduced by #1743, commit 35726e8: parse_search_query in pkgs/id/src/tags.rs), and the crate denies clippy::expect-used on the command line (-D clippy::expect-used), so this is a hard error, not one of the ~150 tracked warnings in #803.
Fix
Replace both expect("i is a char boundary") calls with a non-panicking boundary step (e.g. let Some(ch) = ... else { break }), preserving the parser's behavior — i is maintained as a char boundary by construction, so the None arm is unreachable in practice but must not panic.
Acceptance
clippy-lint flake check passes on main.
parse_search_query behavior unchanged (existing tags/search tests pass).
Acceptance criteria
- The
clippy-lint flake check passes on main (both expect() sites in parse_search_query, pkgs/id/src/tags.rs, replaced with non-panicking char-boundary handling).
parse_search_query behaviour is unchanged: the existing tags/search tests pass in CI.
- The work is delivered via a branch + PR (no direct push to main); verification runs in GitHub Actions CI, not on the sandbox.
- Evidence (CI links or check output) is recorded on this issue before it is closed.
Activityadded kind/bugSomething isn't working (prefixed form of the classic bug label) app/idPackage/app: id (pkgs/ or apps/ in this repo) on Oct 29, 2026developing-today commented on Oct 29, 2026 dezren39 commented on Oct 29, 2026 Intake review
- Related: introduced by fix(id/tags): parse_search_query separates terms on general whitespace (#1609) #1743 (commit 35726e8, per the issue body); distinct from the ~150 tracked clippy warnings in id phase-8: P8.8 clippy/lint sweep deferred — ~150 clippy warnings remain with no tracking issue #803 — this one is a hard
-D clippy::expect-used error on main. No open or merged PR fixing tags.rs clippy was found at intake (checked open PRs and recent main commits at 2026-10-29T00:3xZ).
- Notes: the fix is fully spelled out in the issue (replace both
expect("i is a char boundary") calls with a let Some(ch) = ... else { break } step). Because clippy-lint is part of the aggregate flake check, every PR currently inherits this failure — hence priority/high despite the xs size.
- Risks: low. The
None arm is unreachable by construction (i is maintained as a char boundary); the replacement must not change parser behaviour on malformed input.
- Suggested approach: single small PR on a fleet branch, push, and let the PR's flake check be the verification; merge when
clippy-lint is green.
🤖 Agent note · state: filed
- Agent: fleet monitor (repo-fleet-monitor)
- Session / ID: repo-fleet-monitor run 2026-10-28 19:19 CDT
- Found via: monitor reconciliation (intake enrichment, protocol §5)
- Task: intake enrichment — acceptance criteria, normalized labels, this review
- Expectation: effort/xs; done when the AC section, labels, and this note are on the issue
- Links: n/a
developing-today commented on Nov 3, 2026 agent-note:v1
state: reviewed (coverage loop-back)
Coverage pass 2026-11-03, loop-back review: this issue was re-reviewed (drift / overlap / already-handled / stale / blockers / ordering) so every open issue in the four repos is reviewed and in the system. Verdict: still live; in the system as task 7257 (triage, queued, priority 50) in repo-health-code-pilot. Labels audited and synced. If it is already handled at current main, its triage closes it with evidence; if oversized, the triage files the split; blockers belong on this issue.
Found via: coverage loop-back 2026-11-03 dezren39 commented on Nov 3, 2026 dezren39 commented on Nov 3, 2026 🤖 Agent note · done
- Agent: queue worker (repo-worker-code), lane code-g
- Session / ID: task 7257
- Found via: queue claim
- Task: Triage verdict for issue id(tags): clippy-lint fails on main — expect() on Option in parse_search_query (tags.rs:1484,1499) breaks the flake check for every PR #2008: already fixed on main — no fix PR needed.
- Evidence:
- Commit
6f00e7e00 (2026-10-29, "id: rustfmt meta_client.rs and drop expect() in tags search parser (id: pkgs/id/src/meta_client.rs is not rustfmt-clean on main — every PR inherits three failing fmt checks #2151)") replaced both input[i..].chars().next().expect("i is a char boundary") sites in pkgs/id/src/tags.rs with the exact non-panicking form this issue prescribes: let Some(ch) = ... else { break }; — verified from the commit diff.
- Current
main (9380bf6) pkgs/id/src/tags.rs: grep 'expect(' returns zero hits in the whole file; parse_search_query keeps the char-boundary invariant comment and the let-else guards at both former sites.
- The fixing commit landed 2026-10-29, one day after this issue was observed (2026-10-28 run on PR docs(id): replace TODO.md rollup themes with issue pointers (#1294) #1838), and every later tags.rs commit (through f576a6c, 2026-11-02) kept the code panic-free.
- With no
expect() remaining in the crate file, the -D clippy::expect-used failure mode named here cannot recur from these sites; parser behavior was unchanged by the fix (same control flow, None arm unreachable by construction, now break).
- Expectation: closing issue id(tags): clippy-lint fails on main — expect() on Option in parse_search_query (tags.rs:1484,1499) breaks the flake check for every PR #2008 as already fixed with the evidence above; task 7257 completes as
already_done.
- Links: commit 6f00e7e00
MetadataMetadataapp/idPackage/app: id (pkgs/ or apps/ in this repo)effort/xsTrivial: expected under 30 minutes of workkind/bugSomething isn't working (prefixed form of the classic bug label)meta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedpriority/highImportant and time-sensitivesource/queue-workerFiled or worked by the queue/worker pilottask/triageQueue packet kind: verify, reproduce, and route this item DevelopmentNo branches or pull requestsIssue actions
|