Engine walkthrough cleanups + Cargo.toml heading harmonization#322
Open
martsokha wants to merge 4 commits into
Open
Engine walkthrough cleanups + Cargo.toml heading harmonization#322martsokha wants to merge 4 commits into
martsokha wants to merge 4 commits into
Conversation
Wire: `ner: Option<bool>` / `llm: Option<bool>` on
`RecognizerParams`, replacing plain `bool`.
Semantics:
- `None` (default, omitted on the wire): softly-on. Attaches
the deployment's lineup when non-empty; skips silently when
empty. Requests that used to send `{}` no longer explode on
deployments without NER/LLM configured.
- `Some(true)`: explicit opt-in. Attaches; errors when the
lineup is empty (or has zero matches for the modality on
LLM). Explicit intent surfaces the misconfiguration.
- `Some(false)`: explicit opt-out. Skips.
`attach_ner_lineup` and `attach_llm_lineup` take the toggle
directly and own the dispatch — per-modality entries just pass
`spec.recognizers.{ner,llm}` through, no more `if flag` blocks.
Rename `tests/custom_patterns.rs` → `tests/patterns.rs`.
- `insert_body(report, group)` → `group.insert_into_body(report)` - `insert_part(report, id, group)` → `group.insert_as_part(report, id)` - `collect_overrides_into(out, group)` → `group.collect_overrides_into(out)` - `encode_redacted(handle, body)` → `body.encode_redacted_from(handle)` Reads more naturally at the call site (the group is the natural receiver — it's the polymorphic thing dispatched on). Trims the `pipeline/mod.rs` import block: six-fn glob down to `take_body`, `take_part`. `take_body` / `take_part` stay free — receiver would be elide-owned `Report`.
- **`impl From<elide_core::Error> for nvisy_core::Error`** — map
elide's per-operation error into the runtime's shared
vocabulary, preserving the elide `ErrorKind` semantically via
a nearest-match onto `nvisy_core::ErrorKind`. Delete
`pipeline::orchestrator::compile_err` and its `COMPONENT`
const; `?` now composes across the seam. Trim two
`.map_err(|err| Error::internal(...))` blocks in
`pipeline::mod`. Add `elide-core` as a direct dep of
`nvisy-core`.
- **`#[allow(unused_mut)]`** — remove both from
`pipeline::orchestrator`. Replace the `let mut orchestrator`
pattern with cfg-gated shadowing `let orchestrator = { ... }`
blocks. Respects the standing no-`allow`-attrs memo.
- **Visibility harmonization** — `attach_llm_lineup` in
`analyzer::recognizer::llm` was `pub(crate)`; siblings use
`pub(in crate::analyzer)`. Match. `override_attribution` +
`attach_override` in `anonymizer::compile::selector` were
`pub(crate)` but only used within `compile/`; tighten to
`pub(super)`.
Every per-crate `[dependencies]` (and `[dev-dependencies]`) now uses the exact section-heading vocabulary from the workspace root: `Elide crates`, `Elide extensions`, `Internal crates`, `Serialization`, `Derive macros and error handling`, `Primitive datatypes`, `Encoding and hashing`, `Test utilities`, `Async runtime and parallelism`, `Observability`, `AI / LLM frameworks`. Same order across every crate; no per-line justification comments, matching the root's shape. Dep contents unchanged except reordering within groups.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Four small quality passes from a walkthrough of `nvisy-engine`:
Test plan
🤖 Generated with Claude Code