Skip to content

refactor: keep module roots to declarations and re-exports - #237

Merged
blackopsrepl merged 2 commits into
mainfrom
refactor/declaration-only-module-roots
Nov 10, 2026
Merged

blackopsrepl merged 2 commits into
mainfrom
refactor/declaration-only-module-roots

Conversation

@blackopsrepl

Copy link
Copy Markdown
Collaborator

Closes #234. Two commits: lint levels move to Cargo [lints] (with the test docs/fixtures those lints require), then every item and inline module body moves out of mod.rs/lib.rs. Evidence on 69d0457 (clean tree): syn module-root scan 0 files; make ci-local + make lint EXIT 0, 1725 tests passed, 0 failed, 116 result lines. First commit 569f5c9 checked on its own tree: fmt, clippy --all-targets --all-features -D warnings, file length, cargo test --workspace --all-features (1541 passed, 0 failed).

missing_docs, unreachable_pub, unsafe_code and clippy::type_complexity
levels moved from #![...] attributes in each crate's lib.rs to that
crate's Cargo [lints] table, so lib.rs holds declarations only.

Cargo lints cover every target of a package, including integration tests,
so the test crates now carry a //! description, their planning fixtures
document their public types and fields, the solver's shared test model
moves to tests/support/scalar_model.rs (loaded with #[path] and
#[allow(dead_code)] at each use) with pub(crate) items, and the
projected_publication fixture domain moves into its own file to stay under
500 lines. AGENTS and the facade WIREFRAME describe where the levels live.
Seventeen mod.rs/lib.rs files held more than module declarations and use
re-exports. Every item and inline module body now lives in its own file,
with public paths and behaviour unchanged:

- the solverforge facade modules (config, stats, domain, analysis,
  constraint, director, builder, heuristic, phase, console), the scoring
  stream::cross/chain/projected facades and the solver's hidden __bench and
  __private modules each get a file of the same name;
- the configurable_solvable test domains move into their own directories;
- the impl_arity_stream! dispatcher moves to arity_stream_macros/dispatch.rs,
  ListUndoJournal to heuristic/move/list_undo_journal.rs, the regret kernel's
  budgets and regret values to kernel/budgets.rs and kernel/choice.rs, and
  the descriptor and move test fixtures to fixtures.rs and
  snapshot_director.rs.

AGENTS states the rule for every mod.rs and lib.rs, with planning_model!
manifests and the proc-macro entry points as the only exceptions, and the
WIREFRAMEs list the new files.

Closes #234
@blackopsrepl
blackopsrepl merged commit 69d0457 into main Nov 10, 2026
7 checks passed
@blackopsrepl
blackopsrepl deleted the refactor/declaration-only-module-roots branch November 10, 2026 02:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor: module roots must hold only declarations and re-exports

1 participant