pub(crate) visibility pass
Status: Partially implemented — unreachable_pub = "deny" is now enabled in the workspace lint baseline; remaining work is any intentional visibility cleanup found by fresh compiler/clippy evidence, not the old advisory-warning count.
Problem
jackin has a real library surface: crates/jackin/src/lib.rs publicly exports most top-level modules and crates/jackin/src/bin/role.rs consumes the library. That means a blanket "binary crate ⇒ convert everything to pub(crate)" pass would be wrong. The actual readability problem is narrower: some items are still wider than needed.
What shipped (2026-06-02)
- Lint enabled:
unreachable_pub = "deny"now lives in the root workspace lint table inCargo.toml. The old advisory pass is complete enough that CI treats new unreachable-public items as hard errors. - Some low-hanging-fruit items were narrowed, including
EnvLayerState,LaunchError,inspect_attach_outcome, andparse_session_countin the runtime launch/attach area. - Fresh audit correction: several older “fixed” bullets were too broad. Current code still has wider visibility on some previously named candidates, including planner types/functions in
crates/jackin-config/src/planner.rs,BUILTIN_ROLESincrates/jackin-config/src/app_config/roles.rs, and selected attach helpers incrates/jackin-runtime/src/runtime/attach.rs. Treat those as current candidates, not shipped facts.
Remaining work
Do not use the old advisory-warning snapshot; it predates the deny baseline. Re-audit from current compiler/clippy output before opening any follow-up, then scope the pass to concrete items that still leak wider visibility than needed.
The next pass should:
- Decide the intended library surface in
crates/jackin/src/lib.rs— what truly needs to staypubformain.rs,jackin-role, and tests. - Work through the private-module clusters (console services, runtime universe) where
pub(super)is the obvious narrowing. - Verify
cargo nextest runstill passes after each batch.
What stays pub
pub fn runand other intentionally exported library entrypoints used by sibling binaries- validation helpers consumed by
crates/jackin/src/bin/role.rs - any types that are deliberately part of the internal library boundary exposed from
crates/jackin/src/lib.rs
Caveats
Do not treat unreachable_pub as a turnkey "convert hundreds of bare pub items" script. It is a cleanup aid for the current exported shape, not a substitute for deciding what the library boundary should be.