GeezerVison is showing github.com — style(id-directory): clear clippy::assert_is_empty sites, drop the P8.8 allows (#803 slice) by developing-today-fleet[bot] · Pull Request #15403 · developing-today/code
Conversation
Refs #803 — next clippy sweep slice after PR #15400, following the census in #803 (comment) (id-directory: 6 sites).
Change
- Convert the 6
assert!(x.is_empty()) sites in id-directory tests to assert_eq!(x, [] as [Elem; 0]), the pattern established by PR id: clear the two 1.99 clippy lints in id-client/id-events/id-grants/id-groups/id-pg (#803) #15400:
directory.rs: friends_of ×2 → [String; 0]
directory_log.rs: loaded.skipped ×2 → [Skipped; 0]
directory_view.rs: deliveries ×2 → [DeliveryView; 0]
- Drop
assert_is_empty = "allow" and chunks_exact_to_as_chunks = "allow" from id-directory's [lints.clippy] table. No assertion weakened; no new dependencies; rust-toolchain.toml untouched.
Census / negative control
On a throwaway branch with only the allows dropped (sites unconverted), per-package cargo clippy -p id-directory --all-targets --keep-going reports exactly 6 assert_is_empty warnings at the sites above and 0 chunks_exact_to_as_chunks (fleet runs 45759475846 + 45760986080; branch deleted after). The other is_empty() asserts in the crate (BTreeMap requests/idp_bindings, &BTreeSet final_heads, Vec<Seen> annex) do not trigger the lint and are untouched.
Verification (remote, fleet-command on developing-today/fleet, run 45761741616)
cargo clippy -p id-directory --all-targets --keep-going -- -D clippy::assert_is_empty -D clippy::chunks_exact_to_as_chunks → CLIPPY_RC=0, 0 assert sites left, 0 errors.
cargo test -p id-directory → TEST_RC=0, 293 passed / 0 failed.
#803 stays open: 326 of the two lints' sites remain across id-worlds (88), id root (75), id-sync (68), id-store (43), id-cli (41), id-web (11).
{
"direct_parent": null,
"links": [],
"lineage": {
"design": null,
"roadmap_item": null,
"priority": null
},
"pm_meta": 1,
"provenance": {
"queue_id": null,
"scheduled_start": null,
"picked_up_at": null,
"work_started_at": null,
"created_at": "2026-11-26T05:50:12Z",
"session_id": null,
"lane": null,
"host": "htch-runtime",
"worktree": "/home/hatch/workspace/issue-803/wt-dir",
"model": null,
"lane_start_issues": [],
"workspace_ref": {
"kind": "worktree",
"id": "/home/hatch/workspace/issue-803/wt-dir",
"repo": "developing-today/code",
"branch": "felix/803-clippy-id-directory",
"sha": "cf75f972586ccfe490a854b2ee527d05dee5a3f5"
},
"auth_subject": "felix",
"stamped_by": "fleet 0.1.0 (native)"
}
}
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
….8 allows (Refs #803)
Convert the 6 assert!(x.is_empty()) sites in id-directory tests to
assert_eq!(x, [] as [Elem; 0]) in the PR #15400 pattern (friends_of x2,
loaded.skipped x2, deliveries x2) and remove the assert_is_empty /
chunks_exact_to_as_chunks allows from the crate lint table. Census
(negctl branch, allows dropped only): exactly these 6 sites fire for
assert_is_empty and 0 for chunks_exact_to_as_chunks; the BTreeMap/
BTreeSet is_empty asserts do not trigger the lint.
Important
Review skipped
Bot user detected.
To trigger a single review, invoke the @coderabbitai review command.
Run configuration
-
- Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: defaults
- Review profile: CHILL
- Plan: Advanced
- Run ID:
38f6adee-65c9-447d-8d40-b58b5731fa91
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Share
-
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Nov 26, 2026
developing-today-fleet Bot
pushed a commit
that referenced
this pull request
Nov 26, 2026
…sus sites + 3 post-census additions on current main)
assert!(x.is_empty()) -> assert_eq!(x, [] as [T; 0]) following the merged
slices (#15400/#15403/#15412/#15491/#15522/#15525/#15529/#15535).
Negative control (run 45831946171, current main, warning mode, JSON
counts): id-core 3 (social_object_contract.rs:346 + navigation.rs:1456,1488
— navigation.rs is a new file added after the census base), id-web 3
(collab.rs:4207,4358 + collab.rs:4058 added after the census base),
id-import-notion 5, id-caps 2, id-events 5. chunks_exact_to_as_chunks 0
everywhere. Also adds temporary census/gate/test scripts under
pkgs/id/census-803-final/ (verification only, removed before the PR).
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|