refactor(core): remove fabricated e2ee/ai/plugin modules #261

Merged
KofTwentyTwo merged 1 commits from story/m6-delete-fabricated-modules into dev 2026-07-31 14:52:51 +00:00
KofTwentyTwo commented 2026-07-31 14:51:38 +00:00 (Migrated from github.com)

Summary

Closes/relates to #244. An audit found crates/nuncio-core/src/e2ee.rs, ai.rs, and plugin.rs were pure fabrication dressed as working engines:

  • verify_openpgp_signature / verify_smime_signature did no real cryptography (returned "Valid" from a substring check / for any non-empty bytes).
  • ai.rs returned canned strings with no Ollama call.
  • plugin.rs executed no code.

These implement the explicitly-deferred features #79 (E2EE), #80 (plugins), #81 (local AI). They were pub-exported from nuncio-core/src/lib.rs but wired nowhere else in the workspace, and their tests asserted on the fabricated output rather than real behavior. Deferred features must be absent, not fake-present.

What was deleted

  • crates/nuncio-core/src/e2ee.rs (156 lines, including its #[cfg(test)] tests)
  • crates/nuncio-core/src/ai.rs (145 lines, including its #[cfg(test)] tests)
  • crates/nuncio-core/src/plugin.rs (135 lines, including its #[cfg(test)] tests)
  • Corresponding pub mod declarations and pub use re-exports in crates/nuncio-core/src/lib.rs:
    • pub mod ai; / pub mod e2ee; / pub mod plugin;
    • pub use ai::{ActionItem, AiEngineError, LocalAiEngine, ThreadSummary};
    • pub use e2ee::{E2eeEngine, E2eeError, EncryptionType, SecurityBadge, SignatureStatus};
    • pub use plugin::{PluginError, PluginHook, PluginManifest, PluginRuntime};

No other files, fixtures, or types were orphaned by this deletion — nothing else existed solely to serve these modules.

Verification of no external references

Workspace-wide grep for every symbol these modules exported (E2eeEngine, E2eeError, EncryptionType, SecurityBadge, SignatureStatus, LocalAiEngine, AiEngineError, ThreadSummary, ActionItem, PluginRuntime, PluginError, PluginManifest, PluginHook) and for the module paths (e2ee::, ai::, plugin::) across *.rs/*.proto/*.toml confirmed the only references outside the three deleted files were the lib.rs declarations/re-exports removed in this PR. Zero external references found — confirming the audit.

Test plan

  • cargo fmt --all -- --check — clean
  • cargo check-all (clippy --all-targets --workspace -D warnings) — zero warnings
  • cargo test-all — all green: 436 passed → 429 passed (7 tests removed with the deleted modules), 0 failed, 0 ignored, both before and after
  • Pre-commit hook (runs the same fmt/clippy/test gate) passed on commit
test result: ok. 429 tests across workspace crates; 0 failed; 0 ignored
## Summary Closes/relates to #244. An audit found `crates/nuncio-core/src/e2ee.rs`, `ai.rs`, and `plugin.rs` were pure fabrication dressed as working engines: - `verify_openpgp_signature` / `verify_smime_signature` did no real cryptography (returned "Valid" from a substring check / for any non-empty bytes). - `ai.rs` returned canned strings with no Ollama call. - `plugin.rs` executed no code. These implement the explicitly-deferred features #79 (E2EE), #80 (plugins), #81 (local AI). They were `pub`-exported from `nuncio-core/src/lib.rs` but wired nowhere else in the workspace, and their tests asserted on the fabricated output rather than real behavior. Deferred features must be absent, not fake-present. ### What was deleted - `crates/nuncio-core/src/e2ee.rs` (156 lines, including its `#[cfg(test)]` tests) - `crates/nuncio-core/src/ai.rs` (145 lines, including its `#[cfg(test)]` tests) - `crates/nuncio-core/src/plugin.rs` (135 lines, including its `#[cfg(test)]` tests) - Corresponding `pub mod` declarations and `pub use` re-exports in `crates/nuncio-core/src/lib.rs`: - `pub mod ai;` / `pub mod e2ee;` / `pub mod plugin;` - `pub use ai::{ActionItem, AiEngineError, LocalAiEngine, ThreadSummary};` - `pub use e2ee::{E2eeEngine, E2eeError, EncryptionType, SecurityBadge, SignatureStatus};` - `pub use plugin::{PluginError, PluginHook, PluginManifest, PluginRuntime};` No other files, fixtures, or types were orphaned by this deletion — nothing else existed solely to serve these modules. ### Verification of no external references Workspace-wide grep for every symbol these modules exported (`E2eeEngine`, `E2eeError`, `EncryptionType`, `SecurityBadge`, `SignatureStatus`, `LocalAiEngine`, `AiEngineError`, `ThreadSummary`, `ActionItem`, `PluginRuntime`, `PluginError`, `PluginManifest`, `PluginHook`) and for the module paths (`e2ee::`, `ai::`, `plugin::`) across `*.rs`/`*.proto`/`*.toml` confirmed the only references outside the three deleted files were the `lib.rs` declarations/re-exports removed in this PR. Zero external references found — confirming the audit. ## Test plan - [x] `cargo fmt --all -- --check` — clean - [x] `cargo check-all` (clippy `--all-targets --workspace -D warnings`) — zero warnings - [x] `cargo test-all` — all green: **436 passed → 429 passed** (7 tests removed with the deleted modules), 0 failed, 0 ignored, both before and after - [x] Pre-commit hook (runs the same fmt/clippy/test gate) passed on commit ``` test result: ok. 429 tests across workspace crates; 0 failed; 0 ignored ```
Sign in to join this conversation.