Repository navigation
Conversation
…13207) The clippy-native-shell gate (#5582) fails on main: admission.rs uses .expect() on Mutex::lock() at nine sites, and clippy::expect_used is denied workspace-wide. Each site now recovers the guard with unwrap_or_else(|poisoned| poisoned.into_inner()), the neighbouring modules' convention (id-core transport_advertisement.rs, id-sync protocol.rs, id-web lib.rs, id-store store_traits.rs). Per-owner decision (issue asked for one each): - FollowUpSink (request/drain): no error channel — PrepareHook::prepare returns a decision, so propagation would change the public hook API. - MemoryOperationLedger / MemoryOutboxJournal: public traits with non-Result signatures, and retry_outbox returns Vec, not Result; changing them is an API break for the follow-on #10192 wiring. - InFlightGuard::drop: Drop cannot return a Result at all. Recovery preserves the pipeline's idempotent-binding and at-least-once semantics: std collections stay structurally valid after a panic. Closes #13207
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 2 minutes. View limit details
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. |
Open
2 tasks done
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
The
clippy-native-shellgate (#5582) fails on main:pkgs/id/crates/id-store/src/admission.rsuses.expect()onMutex::lock()at nine sites, andclippy::expect_usedis denied workspace-wide. Each site now recovers the guard with.unwrap_or_else(|poisoned| poisoned.into_inner())— the neighbouring modules' convention (id-coretransport_advertisement.rs,id-syncprotocol.rs,id-weblib.rs,id-storestore_traits.rs).Per-owner decision (the issue asked for one each):
request/drain): no error channel —PrepareHook::preparereturns a decision, so propagation would change the public hook API.Resultsignatures, andretry_outboxreturnsVec, notResult; changing them is an API break for the follow-on Implement ordered lifecycle hooks and fixed acceptance gate #10192 wiring.Dropcannot return aResultat all.Recovery preserves the pipeline's idempotent-binding and at-least-once semantics: std collections stay structurally valid after a panic. No API change, no new test file — the clippy gate itself is the failing-first oracle (it fails on main with the 9 errors, passes after).
Evidence
cargo clippy -p id-native-shell --all-targets→ 9×error: used expect() on a Result value,could not compile id-store (lib) due to 9 previous errors.xaltha/13207-admission-clippy@cbfe87ed6:cargo clippy -p id-native-shell --all-targets— clean, finished dev profile in 3m 03s (only pre-existing pedantic/nursery warnings elsewhere, e.g. an unusedVerifierimport in id-core; no diagnostic touches admission.rs).cargo test -p id-store— 383 passed, 0 failed across 16 suites (lib 271 + integration + doc-tests).rustfmt --checkclean on the touched file.fleet queue dispatchitself is blocked by the TLS UnknownIssuer defect (fleet: repo-queue dispatch fails with TLS UnknownIssuer behind the egress proxy (Rust TLS ignores SSL_CERT_FILE) #13185), so this went through thefleet-command.ymlworkflow fallback. Two earlier runs failed on runner infra, not the code (nixbld group when run as root; root-ownedCARGO_HOMEgit cache under the vscode user) — fixed with the runuser-vscode form + chown of$CARGO_HOME. That infra wart is worth a follow-up on the fleet workflow, not this PR.Merge Danger
Low. One file, mechanical change, no API change. Behaviour change is strictly narrower: a poisoned lock now recovers the guard instead of panicking the pipeline run. If reviewers prefer a
Poisonedvariant onLifecycleRejectioninstead, that is a follow-up API change, not a blocker for this gate fix.Closes #13207
{ "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-23T12:31:11Z", "session_id": null, "lane": null, "host": "htch-runtime", "worktree": "/home/hatch/workspace/github-work/code-13207", "model": null, "lane_start_issues": [], "workspace_ref": { "kind": "worktree", "id": "/home/hatch/workspace/github-work/code-13207", "repo": "developing-today/code", "branch": "xaltha/13207-admission-clippy", "sha": "cbfe87ed643e72eee7b9badcd295f4a1e38fbe64" }, "auth_subject": "xaltha", "stamped_by": "fleet 0.1.0 (native)" } }Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.