Title: 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 · GitHub
Open Graph Title: 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
X Title: 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
Description: Problem 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-2...
Open Graph Description: Problem 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 ...
X Description: Problem 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, ...
Opengraph URL: https://github.com/developing-today/code/issues/2008
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"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","articleBody":"## Problem\n\n`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):\n\n```\nerror: used `expect()` on an `Option` value\n --> src/tags.rs:1484:22\n |\n1484 | let ch = input[i..].chars().next().expect(\"i is a char boundary\");\nerror: used `expect()` on an `Option` value\n --> src/tags.rs:1499:22\n |\n1499 | let ch = input[i..].chars().next().expect(\"i is a char boundary\");\nerror: could not compile `id` (lib) due to 2 previous errors\n```\n\nThe code is on `main` today (introduced by #1743, commit 35726e8e: `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.\n\n## Fix\n\nReplace 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.\n\n## Acceptance\n\n- `clippy-lint` flake check passes on main.\n- `parse_search_query` behavior unchanged (existing tags/search tests pass).\n\n## Acceptance criteria\n\n- 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).\n- `parse_search_query` behaviour is unchanged: the existing tags/search tests pass in CI.\n- The work is delivered via a branch + PR (no direct push to main); verification runs in GitHub Actions CI, not on the sandbox.\n- Evidence (CI links or check output) is recorded on this issue before it is closed.\n","author":{"url":"https://github.com/dezren39","@type":"Person","name":"dezren39"},"datePublished":"2026-10-29T00:02:01Z","url":"https://github.com/developing-today/code/issues/2008"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:2e5a76f0-7b48-5941-cdd7-727405d5da6c |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 940C:B0F20:6CF187:9223FC:6B062D05 |
| html-safe-nonce | a9317f203084df08f9fbccd5e0627908992fd74afa7a538370b011d09d237e8f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NDBDOkIwRjIwOjZDRjE4Nzo5MjIzRkM6NkIwNjJEMDUiLCJ2aXNpdG9yX2lkIjoiODk2NjA2Njg0MzM0OTI3MTA5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 5e67a912e6acd6e36a0724891937382d1783acc8f000e0750768925843e197bb |
| hovercard-subject-tag | issue:6089817121 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/developing-today/code/2008/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e7690b50915f695fc48473c6e99d6d86fc07b9fbd05c2fbcba076b0a133a3b5b/developing-today/code/issues/2008 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e7690b50915f695fc48473c6e99d6d86fc07b9fbd05c2fbcba076b0a133a3b5b/developing-today/code/issues/2008 |
| og:image:alt | Problem 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 ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | dezren39 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 7f961de5dd5c5d4aca24d33f8b3ffb3fb8b2ef53d0a4f32f01f0a790e512f6d3 |
| turbo-cache-control | no-preview |
| go-import | github.com/developing-today/code git https://github.com/developing-today/code.git |
| octolytics-dimension-user_id | 26439447 |
| octolytics-dimension-user_login | developing-today |
| octolytics-dimension-repository_id | 627308783 |
| octolytics-dimension-repository_nwo | developing-today/code |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 627308783 |
| octolytics-dimension-repository_network_root_nwo | developing-today/code |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 494ea0bb1e0feef734a83e2628697647755e8864 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width