Land R-I23 of Cut 1's eighth fix batch: make the resolver's bypass a
compile error Soul pass 8 proved the FrozenSymlinkFs port (R-I14) was an honour system one level up from the counter it replaced: restoring the S5-1 cubic bug as `candidate.canonicalize()?` in resolve_frozen_source_symlink's Normal arm left all 193 tests green, and open_frozen_symlink_frame was still calling fs::read_link directly, proving the convention leaks. - Add `read_link` to FrozenSymlinkFs and route open_frozen_symlink_frame and validate_frozen_source_symlink's root resolution through it. - Move every function the resolver can reach into a `frozen_symlink_port` submodule with `#![deny(clippy::disallowed_methods)]`; drivers.rs blanket-allows the lint at the top of the file since most of the crate has legitimate, unrelated reasons to call these methods (host.rs and provisioning.rs get the same blanket allow). Everything the module exports is re-exported so every existing caller and test keeps its bare name. - Add clippy.toml listing Path::canonicalize, fs::canonicalize, fs::symlink_metadata and fs::read_link as disallowed, each with a reason pointing at the port. - Add .github/workflows/lint.yml: this repo had no CI surface at all before this batch, so "denied in CI" had nowhere to attach. - Update validate_frozen_source_symlinks_resolves_a_long_component_chain_ with_a_linear_call_count's formula and doc: read_link and the now-ported root canonicalize add two calls per resolution (components + 4, not + 2), and the doc no longer claims the count can't catch its own regression -- R-I23 is what catches it now (R-I24). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
parent
a46b9976cd
commit
43dc318f12
5 changed files with 161 additions and 25 deletions
21
.github/workflows/lint.yml
vendored
Normal file
21
.github/workflows/lint.yml
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
name: lint
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
clippy:
|
||||
# R-I23 (Self's ruling, Cut 1's eighth fix batch, F1): this repo had no
|
||||
# CI surface at all before this batch, so "denied in CI" had nowhere to
|
||||
# attach. This is that surface: `clippy.toml`'s `disallowed-methods`
|
||||
# list only stops a bypass of the frozen-symlink resolver's
|
||||
# `FrozenSymlinkFs` port (see `src/drivers.rs`, `frozen_symlink_port`)
|
||||
# if something actually runs clippy with the lint promoted to an error.
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
components: clippy
|
||||
- run: cargo clippy --all-targets --all-features -- -D clippy::disallowed_methods
|
||||
Loading…
Reference in a new issue