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
Browse filesBrowse the repository at this point in the historyBrowse files
authored
chore(hygiene): tighten test panics, error context, PSP USB lint policy (#165)
* chore(hygiene): tighten test panics, propagate error context, lint policy for PSP USB crates
Three small, behavior-preserving cleanups picked up from the pre-launch
backlog:
* Replace the `assert!(matches!(...))` + `let-else { unreachable!() }`
test pattern with a single `let-else { panic!("expected ...", x) }`.
The let-else already panics on mismatch, so the leading assert is
redundant. Drops ~116 `unreachable!()` calls in non-target source
(165 → 49) and shortens 30 test files. The `assert_text!` macro in
oasis-terminal/src/test_helpers.rs already follows this shape; doc
comment updated to match.
* Two test panic!() callers were discarding the underlying error: the
text-editor SDI lookup and the radio source poll error case. Capture
`e` so test failures print what actually went wrong.
* The four standalone PSP USB crates (`oasis-usb-vbus-psp`,
`oasis-usb-client-psp`, `oasis-usb-debug-psp`, `oasis-usb-trace-psp`)
declare their own `[workspace]`, so they inherit none of the parent's
clippy policy. Add a `[lints]` section to each mirroring the workspace
policy (`undocumented_unsafe_blocks`, `unsafe_op_in_unsafe_fn`, etc. —
all `warn` to track the parent), so unsafe-block discipline starts
surfacing on those builds too.
Verified locally: `cargo build --workspace --tests`,
`cargo test --workspace`, `cargo clippy --workspace -- -D warnings`,
`cargo fmt --all -- --check` all pass.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* fix: address AI review feedback (iteration 1)
Automated fix by Claude in response to AI review feedback.
Iteration: 1/5
Co-Authored-By: AI Review Agent <noreply@anthropic.com>
---------
Co-authored-by: AI Agent Bot <ai-agent@localhost>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: AI Review Agent <ai-review-agent@localhost>
0 commit comments