Skip to content

fix: resolve build.warnings gate fallout from #5891 migration#5960

Merged
bug-ops merged 1 commit into
mainfrom
fix/5894-cargo-build-warnings-gate
Jul 10, 2026
Merged

fix: resolve build.warnings gate fallout from #5891 migration#5960
bug-ops merged 1 commit into
mainfrom
fix/5894-cargo-build-warnings-gate

Conversation

@bug-ops

@bug-ops bug-ops commented Jul 10, 2026

Copy link
Copy Markdown
Owner

Summary

  • Allow the linker_messages rustc lint via [workspace.lints.rust] so a plain cargo build/cargo run succeeds on macOS/arm64, where repo-wide build.warnings = "deny" (.cargo/config.toml, ci: migrate lint-warning gate from RUSTFLAGS to build.warnings #5891) unconditionally denied Apple ld's __eh_frame section too large warning.
  • Fix 39 pre-existing rustdoc private_intra_doc_links/redundant_explicit_links warnings across 11 crates, surfaced by the same migration widening the documented local rustdoc gate beyond what it enforced pre-ci: migrate lint-warning gate from RUSTFLAGS to build.warnings #5891 (the earlier count of 37/10 crates was masked by sccache; zeph-acp's 3 sites were missing).
  • Tighten .github/workflows/ci.yml's rustdoc job RUSTDOCFLAGS to explicitly deny both fixed lint classes (previously only rustdoc::broken_intra_doc_links was denied, relying on build.warnings for the other two — which the job's own CARGO_BUILD_WARNINGS: allow override disabled), so the cleanup has a standing regression guardrail in CI and local dev instead of a one-time sweep.

Root cause

.cargo/config.toml's build.warnings = "deny" applies to every cargo invocation and is wider than the old RUSTFLAGS/RUSTDOCFLAGS combination it replaced — it independently denies all local-package rustdoc lints and all linker diagnostics, not just what the documented gate commands explicitly named. Cargo 1.97's build.warnings is a plain string, not a table — no category-level granularity exists, so both fixes use Rust's own per-lint suppression/denial mechanism underneath it instead.

Note on governance docs

.claude/rules/branching.md and .claude/CLAUDE.md were also updated locally to prefix the rustdoc-gate command with CARGO_BUILD_WARNINGS=allow plus the two new --deny flags, matching this PR's CI change exactly. These files are not git-tracked in this repository (excluded via the repo owner's global ~/.gitignore_global, confirmed never in this repo's git history), so they do not appear in this diff and will not ship to other clones via git. The repo owner should apply the equivalent change to their local copies (and to ~/.claude/CLAUDE.md, their global config) manually.

Test plan

  • cargo build --features full succeeds with zero env var overrides on macOS/arm64
  • Introduced a synthetic warning (unused import) — confirmed build.warnings=deny still fails the build (fix is scoped precisely to linker_messages, not a blanket allow)
  • RUSTFLAGS="-D warnings" RUSTDOCFLAGS="--deny rustdoc::broken_intra_doc_links --deny rustdoc::private_intra_doc_links --deny rustdoc::redundant_explicit_links" cargo doc --no-deps --workspace --features "desktop,ide,server,chat,pdf,scheduler" exits 0 with no env override, proving all 39 sites are genuinely fixed, not papered over
  • Reverted one fixed site temporarily and confirmed the new CI RUSTDOCFLAGS guardrail actually catches the regression, then reverted cleanly
  • cargo test --doc --workspace --features "desktop,ide,server,chat,pdf,scheduler" — doc-test pass count unchanged, all edits are narrative-only
  • cargo nextest run --config-file .github/nextest.toml --workspace --features "desktop,ide,server,chat,pdf,scheduler" --lib --bins — 12630 passed, 0 failed
  • cargo +nightly fmt --check and cargo clippy --profile ci --workspace --all-targets --features "desktop,ide,server,chat,pdf,scheduler,testing" -- -D warnings — clean
  • fy lint on the modified ci.yml block — 0 new errors

Closes #5894, closes #5895

Allow the linker_messages rustc lint via [workspace.lints.rust] so plain
cargo build/run succeeds on macOS/arm64, where build.warnings = "deny"
(.cargo/config.toml, #5891) unconditionally denies Apple ld's eh_frame
section-size warning. Fix 39 pre-existing rustdoc private_intra_doc_links/
redundant_explicit_links warnings across 11 crates, surfaced by the same
migration widening the local rustdoc pre-commit gate beyond what it
enforced pre-#5891. Tighten ci.yml's rustdoc job RUSTDOCFLAGS to deny both
lint classes explicitly so the cleanup has a standing regression
guardrail in CI and local dev, not just a one-time sweep.

Closes #5894, #5895
@github-actions github-actions Bot added documentation Improvements or additions to documentation skills zeph-skills crate memory zeph-memory crate (SQLite) bug Something isn't working channels zeph-channels crate (Telegram) rust Rust code changes core zeph-core crate dependencies Dependency updates ci CI/CD configuration size/M Medium PR (51-200 lines) labels Jul 10, 2026
@bug-ops
bug-ops enabled auto-merge (squash) July 10, 2026 22:08
@bug-ops
bug-ops merged commit 937ddc8 into main Jul 10, 2026
43 checks passed
@bug-ops
bug-ops deleted the fix/5894-cargo-build-warnings-gate branch July 10, 2026 22:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working channels zeph-channels crate (Telegram) ci CI/CD configuration core zeph-core crate dependencies Dependency updates documentation Improvements or additions to documentation memory zeph-memory crate (SQLite) rust Rust code changes size/M Medium PR (51-200 lines) skills zeph-skills crate

Projects

None yet

1 participant