[codex] reduce module visibility (#16978)

## Summary
- reduce public module visibility across Rust crates, preferring private
or crate-private modules with explicit crate-root public exports
- update external call sites and tests to use the intended public crate
APIs instead of reaching through module trees
- add the module visibility guideline to AGENTS.md

## Validation
- `cargo check --workspace --all-targets --message-format=short` passed
before the final fix/format pass
- `just fix` completed successfully
- `just fmt` completed successfully
- `git diff --check` passed
This commit is contained in:
pakrym-oai
2026-04-07 08:03:35 -07:00
committed by GitHub
parent 89f1a44afa
commit 413c1e1fdf
129 changed files with 695 additions and 496 deletions
+10 -7
View File
@@ -1,11 +1,11 @@
pub mod amend;
pub mod decision;
pub mod error;
pub mod execpolicycheck;
pub(crate) mod amend;
pub(crate) mod decision;
pub(crate) mod error;
pub(crate) mod execpolicycheck;
mod executable_name;
pub mod parser;
pub mod policy;
pub mod rule;
pub(crate) mod parser;
pub(crate) mod policy;
pub(crate) mod rule;
pub use amend::AmendError;
pub use amend::blocking_append_allow_prefix_rule;
@@ -22,6 +22,9 @@ pub use policy::Evaluation;
pub use policy::MatchOptions;
pub use policy::Policy;
pub use rule::NetworkRuleProtocol;
pub use rule::PatternToken;
pub use rule::PrefixPattern;
pub use rule::PrefixRule;
pub use rule::Rule;
pub use rule::RuleMatch;
pub use rule::RuleRef;