Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion crates/uffs-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,16 @@ edition.workspace = true
license.workspace = true
repository.workspace = true
authors.workspace = true
readme.workspace = true
# Per-crate README override. Inheriting `readme.workspace = true`
# resolves to the workspace-root README via `../../README.md`, which
# cargo flags with the "readme appears to be a path outside of the
# package" warning even though the archived crate already contains a
# copy. Pointing at this crate's own `README.md` (alongside this
# manifest) ships the right doc on the crates.io detail page and
# silences the warning. Permitted by manifest-audit invariant 3.5 via
# `KnownExceptions::readme_override_ok` (see
# `scripts/ci/manifest-audit/src/audit.rs`). Issue #240.
readme = "README.md"
keywords.workspace = true
categories.workspace = true

Expand Down
10 changes: 9 additions & 1 deletion crates/uffs-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,15 @@ edition.workspace = true
license.workspace = true
repository.workspace = true
authors.workspace = true
readme.workspace = true
# Per-crate README override. Inheriting `readme.workspace = true`
# resolves to the workspace-root app README (`../../README.md`), the
# wrong artifact for this library crate's crates.io / docs.rs page and
# the source of cargo's "readme appears to be a path outside of the
# package" warning. Pointing at the crate's own `README.md` (alongside
# this manifest) ships the right doc and silences the warning. Permitted
# by manifest-audit invariant 3.5 via `KnownExceptions::readme_override_ok`
# (see `scripts/ci/manifest-audit/src/audit.rs`). Issue #240.
readme = "README.md"
# Per-crate keywords + categories override (Phase 1 §3.5 escape hatch
# via `KnownExceptions::keywords_override_ok` / `categories_override_ok`
# in `scripts/ci/manifest-audit/src/audit.rs`). This is the thin
Expand Down
10 changes: 9 additions & 1 deletion crates/uffs-mcp/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,15 @@ edition.workspace = true
license.workspace = true
repository.workspace = true
authors.workspace = true
readme.workspace = true
# Per-crate README override. Inheriting `readme.workspace = true`
# resolves to the workspace-root app README (`../../README.md`), the
# wrong artifact for this library crate's crates.io / docs.rs page and
# the source of cargo's "readme appears to be a path outside of the
# package" warning. Pointing at the crate's own `README.md` (alongside
# this manifest) ships the right doc and silences the warning. Permitted
# by manifest-audit invariant 3.5 via `KnownExceptions::readme_override_ok`
# (see `scripts/ci/manifest-audit/src/audit.rs`). Issue #240.
readme = "README.md"
# Per-crate keywords + categories override (Phase 1 §3.5 escape hatch
# via `KnownExceptions::keywords_override_ok` / `categories_override_ok`
# in `scripts/ci/manifest-audit/src/audit.rs`). This crate ships an
Expand Down
10 changes: 9 additions & 1 deletion crates/uffs-mft/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,15 @@ edition.workspace = true
license.workspace = true
repository.workspace = true
authors.workspace = true
readme.workspace = true
# Per-crate README override. Inheriting `readme.workspace = true`
# resolves to the workspace-root app README (`../../README.md`), the
# wrong artifact for this library crate's crates.io / docs.rs page and
# the source of cargo's "readme appears to be a path outside of the
# package" warning. Pointing at the crate's own `README.md` (alongside
# this manifest) ships the right doc and silences the warning. Permitted
# by manifest-audit invariant 3.5 via `KnownExceptions::readme_override_ok`
# (see `scripts/ci/manifest-audit/src/audit.rs`). Issue #240.
readme = "README.md"
keywords.workspace = true
categories.workspace = true

Expand Down
10 changes: 9 additions & 1 deletion crates/uffs-text/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,15 @@ edition.workspace = true
license.workspace = true
repository.workspace = true
authors.workspace = true
readme.workspace = true
# Per-crate README override. Inheriting `readme.workspace = true`
# resolves to the workspace-root app README (`../../README.md`), the
# wrong artifact for this library crate's crates.io / docs.rs page and
# the source of cargo's "readme appears to be a path outside of the
# package" warning. Pointing at the crate's own `README.md` (alongside
# this manifest) ships the right doc and silences the warning. Permitted
# by manifest-audit invariant 3.5 via `KnownExceptions::readme_override_ok`
# (see `scripts/ci/manifest-audit/src/audit.rs`). Issue #240.
readme = "README.md"
# Per-crate keywords + categories override (Phase 1 §3.5 escape hatch
# via `KnownExceptions::keywords_override_ok` / `categories_override_ok`
# in `scripts/ci/manifest-audit/src/audit.rs`). This crate ships
Expand Down
10 changes: 9 additions & 1 deletion crates/uffs-time/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,15 @@ edition.workspace = true
license.workspace = true
repository.workspace = true
authors.workspace = true
readme.workspace = true
# Per-crate README override. Inheriting `readme.workspace = true`
# resolves to the workspace-root app README (`../../README.md`), the
# wrong artifact for this library crate's crates.io / docs.rs page and
# the source of cargo's "readme appears to be a path outside of the
# package" warning. Pointing at the crate's own `README.md` (alongside
# this manifest) ships the right doc and silences the warning. Permitted
# by manifest-audit invariant 3.5 via `KnownExceptions::readme_override_ok`
# (see `scripts/ci/manifest-audit/src/audit.rs`). Issue #240.
readme = "README.md"
# Per-crate keywords + categories override (Phase 1 §3.5 escape hatch
# via `KnownExceptions::keywords_override_ok` / `categories_override_ok`
# in `scripts/ci/manifest-audit/src/audit.rs`). This is a library
Expand Down
46 changes: 36 additions & 10 deletions scripts/ci/manifest-audit/src/audit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,21 @@ impl KnownExceptions {
// Adding an entry here requires the crate to actually have a
// `README.md` alongside its `Cargo.toml` — cargo will emit a
// packaging error otherwise.
let readme_override_ok: BTreeSet<&'static str> =
["uffs-text", "uffs-time"].into_iter().collect();
//
// All 6 crates of the publishable subset carry their own
// `README.md` (#237 + #239) and the explicit override silences
// the cosmetic `cargo package` warning about `../../README.md`
// being outside the package — see issue #240.
let readme_override_ok: BTreeSet<&'static str> = [
"uffs-cli",
"uffs-client",
"uffs-mcp",
"uffs-mft",
"uffs-text",
"uffs-time",
]
.into_iter()
.collect();

// Per-crate `keywords` + `categories` override allow-list.
// The four library crates listed below ship a public surface
Expand Down Expand Up @@ -838,17 +851,30 @@ workspace = true

#[test]
fn readme_override_on_allowlisted_crate_is_suppressed() {
// `uffs-time` is on the allow-list and uses the conventional
// `readme = "README.md"` same-name pattern — must not fire.
// Every crate in the 6-member publishable subset is on the
// allow-list and uses the conventional `readme = "README.md"`
// same-name pattern — none must fire. Iterating the whole set
// (not just `uffs-time`) guards against a future regression
// that silently drops one crate from `readme_override_ok`.
let text = MEMBER_CLEAN.replace("readme.workspace = true", "readme = \"README.md\"");
let m = parse_member(&text).unwrap();
let d = disc("crates/uffs-time/Cargo.toml", &m);
let exc = KnownExceptions::new();
let findings = audit_metadata_fields(&d, "uffs-time", &exc);
assert!(
findings.is_empty(),
"allow-listed readme override should be suppressed; got: {findings:?}"
);
for id in [
"uffs-cli",
"uffs-client",
"uffs-mcp",
"uffs-mft",
"uffs-text",
"uffs-time",
] {
let path = format!("crates/{id}/Cargo.toml");
let d = disc(&path, &m);
let findings = audit_metadata_fields(&d, id, &exc);
assert!(
!findings.iter().any(|f| f.detail.contains("`readme`")),
"allow-listed readme override should be suppressed for `{id}`; got: {findings:?}"
);
}
}

#[test]
Expand Down
Loading