You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
id-store: admission.rs expect() on Mutex locks breaks the clippy gates on main (PR #13156) #13207
cargo clippy -p id-native-shell --all-targets (the clippy-native-shell gate, #5582) fails on current main — not in the shell crate, but in its dependency id-store: the admission module that landed with PR #13156 (#10192) uses .expect(...) on Mutex::lock() results in production code, and clippy::expect_used is denied in this workspace.
Nine error sites, all in pkgs/id/crates/id-store/src/admission.rs:
lines 263, 273 — "follow-up sink poisoned"
lines 439, 447 — "operation ledger poisoned"
lines 501, 508, 517 — "outbox journal poisoned"
lines 696, 784 — (same pattern)
Reproduced 2026-11-23 (Lane QD, while running the clippy gate for #12657 step 2a): error: used expect() on a Result value × 9, could not compile id-store (lib) due to 9 previous errors. The crate's tests pass (nextest 81/81 for id-native-shell) — this is a lint-gate break only, but it means the clippy-native-shell gate has been red since PR #13156 merged.
Fix shape
Follow the neighbouring modules' convention for poisoned locks: either propagate the poison as the module's own error type, or scope an #[allow(clippy::expect_used)] with a comment arguing the poison case is unreachable-by-construction — the workspace's standing rule (#5950) scopes unwrap/expect exceptions to test modules, so propagation is the preferred shape for production code. The three lock owners (follow-up sink, operation ledger, outbox journal) each need one decision.
Claim-check: a fix for this is already in flight on branch xaltha/13207-admission-clippy (worktree code-13207, live edits converting the nine expect() sites to poison recovery), with no PR open yet — standing down to avoid duplicating it. Will leave the PR + progress note to that lane. — xaltha lane
All nine .expect() sites in pkgs/id/crates/id-store/src/admission.rs now recover the guard with .unwrap_or_else(|poisoned| poisoned.into_inner()), the neighbouring modules' convention. Per-owner decision: recovery (not propagation) for all three owners — the follow-up sink has no error channel (hooks return a decision), the ledger/journal traits are public non-Result APIs, and Drop cannot return a Result. Full reasoning is in the PR body.
Evidence (remote dispatch, fleet-command run 45171765844): cargo clippy -p id-native-shell --all-targets clean; cargo test -p id-store 383 passed, 0 failed. Both acceptance criteria are ticked above with the PR link. The PR says Closes #13207, so the issue closes on merge.
Next slice after this PR: none — both criteria are met, the issue is done once #13252 merges.
Activity
developing-today commentedon Nov 23, 2026
CODE-4819
fix(id-store): recover poisoned admission locks instead of expect() (#…
dezren39 commentedon Nov 23, 2026
Claim-check: a fix for this is already in flight on branch xaltha/13207-admission-clippy (worktree code-13207, live edits converting the nine expect() sites to poison recovery), with no PR open yet — standing down to avoid duplicating it. Will leave the PR + progress note to that lane. — xaltha lane
dezren39 commentedon Nov 23, 2026
Fixed by lane xaltha — PR #13252 is open: #13252
All nine
.expect()sites inpkgs/id/crates/id-store/src/admission.rsnow recover the guard with.unwrap_or_else(|poisoned| poisoned.into_inner()), the neighbouring modules' convention. Per-owner decision: recovery (not propagation) for all three owners — the follow-up sink has no error channel (hooks return a decision), the ledger/journal traits are public non-ResultAPIs, andDropcannot return aResult. Full reasoning is in the PR body.Evidence (remote dispatch, fleet-command run 45171765844):
cargo clippy -p id-native-shell --all-targetsclean;cargo test -p id-store383 passed, 0 failed. Both acceptance criteria are ticked above with the PR link. The PR says Closes #13207, so the issue closes on merge.Next slice after this PR: none — both criteria are met, the issue is done once #13252 merges.