Repository navigation
fix(gateway): move apply_search_intent_overrides to module scope (E0425) - #185
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@coderabbitai fix-ci commit |
|
✅ Coding Agent task started: View task and status The task will inspect the CI failures, validate its fix, and commit the fix to this branch automatically.
⏭️ Checks skipped: 1 · already failing on `auto/round-2026-10-21T0230Z` (not caused by this PR)
|
0721e79 to
d40c73f
Compare
Root cause: the function was extracted but left DEFINED INSIDE handle_search (a local fn). build_intent (module scope, called by /intent) references it, causing error[E0425] at compile time. Fix: moved the fn definition to module scope (after handle_search closes), preserving both call sites: - handle_search (line ~16150) - build_intent (line ~14106) The body is extracted verbatim (q_lower binding + full override chain), reusing the round branch's existing logic. Also fixed a pre-existing test conflict: the how-to override (Override 8) was collapsing ALL 'how to...' queries to 'how-to', but intent_matches_search_for_non_transactional_queries expects technical-implementation queries like 'how to build a rest api in rust' to stay 'technical'. Added a technical-implementation how-to signal (reusing the existing howto_mid_signals technical-build vocabulary) so these queries are classified as 'technical' instead of being collapsed to the generic how-to bucket.
d40c73f to
3f99f54
Compare
Root cause: the
apply_search_intent_overridesfunction was extracted but left DEFINED INSIDEhandle_search(a local fn).build_intent(module scope, line ~14106) calls it →error[E0425]: cannot find functionapply_search_intent_overridesin this scope.Fix: moved the fn definition to module scope (after
handle_searchcloses), keeping both call sites intact:handle_search(line ~16150)build_intent(line ~14106)The body, gates, order, and confidence floors are unchanged (extracted verbatim). The orphan stale comment that referenced the old inline location was removed.
This resolves the compile error so
cargo test --lockedcan proceed on the round branch.