Skip to content

feat(search): enable dual-substrate auto-gating by default (opt-out via ADEN_LEXICON_OFF)#39

Merged
RioPlay merged 1 commit into
mainfrom
feat/lexical-default-on
Jun 19, 2026
Merged

feat(search): enable dual-substrate auto-gating by default (opt-out via ADEN_LEXICON_OFF)#39
RioPlay merged 1 commit into
mainfrom
feat/lexical-default-on

Conversation

@RioPlay

@RioPlay RioPlay commented Jun 19, 2026

Copy link
Copy Markdown
Owner

What

Flips the dual-substrate retrieval levers (merged in #38) from opt-in to on by default, with an opt-out.

  • Default: query_index auto-gates by detected text (prose -> grounded OEWN expansion, code -> PPMI rerank), routed by query shape + corpus substrate.
  • ADEN_LEXICON_OFF disables entirely; ADEN_LEXICON_EXPAND / ADEN_PPMI_RERANK still force a single lever.

Why (end-to-end OFF vs ON bench, shipped binary)

Domain OFF ON
Prose synonym-bridge R@1 0/15 15/15
Code rank-of-gold rrf_fuse @18, cosine @20 rrf_fuse @1, cosine @5 (MRR 0.009 -> 0.100; harness 0.216 -> 0.289)

No regression: the code lever reranks the hybrid base (never worse than hybrid), and both levers are grounded + corpus-gated, so they no-op where they would not help (prose lever needs the OEWN store; absent it, retrieval is unchanged).

Safety

  • cargo test --workspace: 0 failures with default-on active.
  • clippy clean; cargo deny unaffected (no dep changes).
  • Behavior depends on a user-local OEWN store only for the prose lever; absent (e.g. CI), it degrades to plain retrieval, so it is deterministic where it matters.

Docs updated: docs/retrieval-levers.adoc, README, CHANGELOG.

…ia ADEN_LEXICON_OFF)

End-to-end OFF vs ON bench with the shipped binary confirmed it never regresses and clearly
helps: prose synonym-bridge R@1 0/15 -> 15/15; code rank-of-gold improved (rrf_fuse 18 -> 1,
cosine_similarity 20 -> 5; harness MRR 0.216 -> 0.289). query_index now auto-gates by default
(routed by query shape + corpus substrate); ADEN_LEXICON_OFF disables, ADEN_LEXICON_EXPAND /
ADEN_PPMI_RERANK still force a single lever. Grounded + corpus-gated, so it no-ops where it
would not help. Docs (retrieval-levers/README/CHANGELOG) updated.
@RioPlay RioPlay merged commit 81ae089 into main Jun 19, 2026
6 checks passed
@RioPlay RioPlay deleted the feat/lexical-default-on branch June 19, 2026 16:58
RioPlay added a commit that referenced this pull request Jun 20, 2026
commands.adoc:
- asm --depth default: 3 → 2 (matches code)
- mcp install: add missing --surface <essential|standard|full> flag
- viz: add missing --scope and --resolution flags; remove bogus -j alias
- heal: add structured flag table (--propose/--fix/--gc/--since/--apply/--watch)
- status: document savings estimate output block

ai-integration.adoc:
- Replace two-tier Core/Extended model with three-tier Essential/Standard/Full
- Fix tool assignments: search/list/communities/impact-diff were in wrong tier
- Fix env var: ADEN_MCP_FULL=1 → ADEN_MCP_SURFACE=standard|full (legacy alias noted)
- Document --surface flag at install time

retrieval-levers.adoc:
- Fix polarity: auto-gating is OFF by default, opt-in via ADEN_LEXICON_ON
- Reframe ADEN_LEXICON_OFF as kill switch, not primary disable mechanism
- Fix rerank trigger: code_anchor_fraction → query_looks_codey (query text only)
- Fix NL-over-code behavior: expands only, does not rerank
- Document PR #39/PR #40 revert history in status section

architecture.adoc:
- Add aden-paths node to Mermaid crate diagram
- Remove duplicate aden-mcp Phase 2 row (already shipped as Phase 0)

security-model.adoc:
- Replace CanPerform (not a valid EdgeType) with Invokes in semantics example
- Update malicious-contract-injection threat: moot since store-first (ADR-003)

.agent/quick-ref.adoc:
- Add --features watch caveat to aden watch entry

crates/aden-cli/src/commands/init.rs:
- Fix misleading "Knowledge graph built in .aden/store." message; store is
  in per-user data dir since ADR-003

docs/adr-008-current-implementation-state.adoc (new):
- Document current scope extensions beyond original ADRs: Wave 3 edges
  (Supersedes/Justifies/AssociatedWith), GEN_LOGIC_VERSION=4, store-first
  architecture, MCP three-tier surface, dual-substrate retrieval (opt-in)

Co-authored-by: RioPlay (Ernest Hamblen) <rioplay@rioplay.dev>
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.

1 participant