Status: ✅ Resolved on main — fixed by PR #157, commit 7073d25. Verified against a freshly-fetched origin/main before editing this issue.
Description
engine-core/src/core/access.rs, state.rs, guards.rs, and zk_hooks.rs existed on disk with full implementations and their own #[cfg(test)] unit tests, but core/mod.rs never declared them as modules. Rust silently excludes undeclared files from the crate — these modules were never compiled, never tested, and never linted as part of any cargo invocation.
Affected Component
engine-core/src/core/mod.rs
Original Behavior (Bug)
core/mod.rs declared only:
pub mod control_plane;
pub mod engine;
pub mod proxy;
access.rs, state.rs, guards.rs, zk_hooks.rs sat in the same directory but were absent from this list. cargo build/cargo test never touched them, and core/control_plane.rs's references to crate::core::zk_hooks::* failed to resolve (E0433: could not find zk_hooks in core).
Expected Behavior
Every .rs file intended to be part of the crate is declared as a module and participates in cargo build, cargo test, and cargo clippy.
Root Cause
The four files were added in commit 364f6f5 ("Core Development – Hardened Foundation", #149) but the corresponding pub mod declarations were never added to core/mod.rs — lost in the same merge history that left several other engine-core files with duplicated/conflicting content (see PR #157's description for the full scope of that corruption).
Resolution
core/mod.rs now declares all six modules:
pub mod access;
pub mod control_plane;
pub mod guards;
pub mod proxy;
pub mod state;
pub mod zk_hooks;
zk_hooks.rs has no #[test] functions of its own — it's exercised through control_plane.rs's register_proof/get_proof, which are covered by core/tests.rs. access.rs, state.rs, and guards.rs each ship their own dedicated unit tests, which now run as part of the crate for the first time.
Verification
$ git show origin/main:engine-core/src/core/mod.rs
pub mod access;
pub mod control_plane;
pub mod guards;
pub mod proxy;
pub mod state;
pub mod zk_hooks;
$ cargo build -p engine-core
Finished — control_plane.rs's zk_hooks references resolve cleanly
$ cargo test -p engine-core core::access
running 6 tests ... test result: ok. 6 passed; 0 failed
$ cargo test -p engine-core core::state
running 5 tests ... test result: ok. 5 passed; 0 failed
$ cargo test -p engine-core core::guards
running 4 tests ... test result: ok. 4 passed; 0 failed
$ cargo test --workspace
test result: ok. 78 passed; 0 failed; 0 ignored
Definition of Done
Description
engine-core/src/core/access.rs,state.rs,guards.rs, andzk_hooks.rsexisted on disk with full implementations and their own#[cfg(test)]unit tests, butcore/mod.rsnever declared them as modules. Rust silently excludes undeclared files from the crate — these modules were never compiled, never tested, and never linted as part of anycargoinvocation.Affected Component
engine-core/src/core/mod.rsOriginal Behavior (Bug)
core/mod.rsdeclared only:access.rs,state.rs,guards.rs,zk_hooks.rssat in the same directory but were absent from this list.cargo build/cargo testnever touched them, andcore/control_plane.rs's references tocrate::core::zk_hooks::*failed to resolve (E0433: could not find zk_hooks in core).Expected Behavior
Every
.rsfile intended to be part of the crate is declared as a module and participates incargo build,cargo test, andcargo clippy.Root Cause
The four files were added in commit
364f6f5("Core Development – Hardened Foundation", #149) but the correspondingpub moddeclarations were never added tocore/mod.rs— lost in the same merge history that left several otherengine-corefiles with duplicated/conflicting content (see PR #157's description for the full scope of that corruption).Resolution
core/mod.rsnow declares all six modules:zk_hooks.rshas no#[test]functions of its own — it's exercised throughcontrol_plane.rs'sregister_proof/get_proof, which are covered bycore/tests.rs.access.rs,state.rs, andguards.rseach ship their own dedicated unit tests, which now run as part of the crate for the first time.Verification
cargo build -p engine-coresucceeds;control_plane.rs'szk_hooks::register_proof/get_proofcalls resolve.cargo test -p engine-coreruns and passes the previously-dead tests:core::access(6),core::state(5),core::guards(4).cargo test --workspacereports 78 passed, 0 failed — the newly-included tests are part of that total.Definition of Done
main(PR Fix merge-corrupted engine-core, jest/eslint setup, repo cruft #157,7073d25).cargo clippywarnings introduced by the newly-compiled modules specifically (4 pre-existing, unrelated warnings remain onmain— see [BUG] Three competing #[contract] entry points collide on WASM export, breaking the release build #161 for detail)..github/workflows/ci.yml'scargo teststep runs at the workspace root of this virtual-manifest workspace, which tests all members by default — no CI change was needed for this fix specifically. (CI's separate lack of coverage forengine-bridge/dashboardis unrelated and tracked in [BUG] CI never runs engine-bridge or dashboard test/lint/build #158.)