Skip to content

Plan 348: stricter Rust lints and a rustdoc check - #16

Open
Matteeh wants to merge 1 commit into
mainfrom
claude/project-thread-ilib08
Open

Matteeh wants to merge 1 commit into
mainfrom
claude/project-thread-ilib08

Conversation

@Matteeh

@Matteeh Matteeh commented Nov 3, 2026

Copy link
Copy Markdown
Owner

Requested by Mathias · project thread

Adds the change folder openspec/changes/348-rust-lints-strict. This PR only holds the plan. Nothing under crates/, Cargo.toml or scripts/ changes until the change is approved and run.

What the change does

  • Denies unwrap_used, allow_attributes_without_reason, dbg_macro, todo, unimplemented, print_stdout, print_stderr and string_add in [workspace.lints.clippy], and sets allow-unwrap-in-tests = true in clippy.toml.
  • Adds RUSTDOCFLAGS="-D warnings" cargo doc --workspace --no-deps to scripts/verify-rust.sh, between clippy and the tests.
  • Before turning either on, it fixes every current hit, one crate per task: 356 unwraps (4 in harnesses src, the rest in test helpers), 19 allow(dead_code) with no reason, 13 String + &str, and 4 rustdoc warnings.
  • Adds a dated amendment to ADR 023.

Tasks

23 tasks: 1 clippy setting, 17 clippy fix tasks (one per crate), 3 rustdoc fixes, then the lint flip with the ADR amendment, then the verify script step.

osq lint

osq lint 348-rust-lints-strict reports valid. The warnings it leaves:

  • About 110 "owned by rust-X, which has no delta". Tasks 2 to 21 edit tests and docs that 18 other capabilities own, and none of their behaviour changes. The proposal's Assumptions says this.
  • 3 "verify names neither an existing path nor a package script" for cargo rustdoc, which the languages verify list doesn't know about.
  • 1 "verify test imports nothing in scope" for task 23. Its test reads the script, as tests/rust-ci.test.ts already does.

After merging

osq approve 348


Generated by Claude Code

Plan change 348: deny unwrap_used, allow_attributes_without_reason,
dbg_macro, todo, unimplemented, print_stdout, print_stderr and
string_add in the workspace lints, add a rustdoc check to
verify-rust.sh, and fix every current hit crate by crate first.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0127zo32rmpUfq5NcxHgFJN4
@Matteeh Matteeh self-assigned this Nov 3, 2026

Matteeh commented Nov 3, 2026

Copy link
Copy Markdown
Owner Author

The cargo check fails on approve_steered::steered_worktree_refusals (osq-feature-approve) with index.lock: File exists in the test's worktree. This PR didn't cause it. The diff only adds markdown under openspec/changes/348-rust-lints-strict/, and the same test fails on main at 7015dd2 in the push run after 347 landed and in both weekly runs since (run 41467249799). That run also shows mutants failing on the same test and parity failing on validate_matches_openspec.

No fix exists yet. I can't re-run jobs from here.


Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants