refactor: isolate optional imports and remove dead state - #13
Merged
Conversation
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.
Search and Intelligence package facades mixed optional-backend probes with public reexports, creating E402 pressure and child-to-facade initialization back-edges. Twelve unused locals also looked like unfinished behavior even though repository output contracts showed they were unsupported state.
This is Slice 2 of the approved three-PR stacked-to-main chain. It restructures optional availability and removes only evidence-backed dead state; mechanical cleanup and Ruff policy remain in Slice 3.
Optional dependency boundaries
_availability.py; core BM25/types/preparation exports remain usable without FAISS.Evidence-backed F841 dispositions
All twelve approved locals were removed without inventing Built columns, internal-only call filtering, stack-driven setup behavior, AST prompt content, or other latent features. Each row has a named output anchor and a rollback probe that reproduces its original Ruff finding while preserving behavior.
Verification
Measured on
refactor/ruff-optional-f841-slice-2at509220e:uv lock --check, andgit diff --check: PASS.No build, dependency-version, lockfile, CI, Ruff-policy, suppression, or unsafe-fix change is included. No global Ruff-zero claim is made.
Review trail
Commit structure
Four conventional commits separate optional boundary architecture, display/diagram state, context/setup/graph state, and remaining Intelligence/prompt state. Shared optional-surface tests remain with the structural commit.
Follow-ups noted — not implemented here
Slice 3 will correct the remaining accidental import ordering and mechanical E741/F541 findings, prove the literal pre-policy Ruff-zero gate, then align and pin reproducible local/CI Ruff policy.