Skip to content

fix(gateway): move apply_search_intent_overrides to module scope (E0425) - #185

Merged
Likhithsai2580 merged 3 commits into
auto/round-2026-10-21T0230Zfrom
fix/auto-intent-override-fn-scope-20261021
Oct 21, 2026
Merged

Likhithsai2580 merged 3 commits into
auto/round-2026-10-21T0230Zfrom
fix/auto-intent-override-fn-scope-20261021

Conversation

@Likhithsai2580

Copy link
Copy Markdown
Member

Root cause: the apply_search_intent_overrides function was extracted but left DEFINED INSIDE handle_search (a local fn). build_intent (module scope, line ~14106) calls it → error[E0425]: cannot find function apply_search_intent_overrides in this scope.

Fix: moved the fn definition to module scope (after handle_search closes), 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 --locked can proceed on the round branch.

@coderabbitai

coderabbitai Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 024b91b4-1f4f-44f7-8b41-859642b9b13e

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Likhithsai2580

Copy link
Copy Markdown
Member Author

@coderabbitai fix-ci commit

@coderabbitai

coderabbitai Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

✅ 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.

Note: Fixing CI failures is a beta feature and may encounter errors. Expect some limitations and changes as we gather feedback and continue to improve it.

⏭️ Checks skipped: 1 · already failing on `auto/round-2026-10-21T0230Z` (not caused by this PR)
  • GitHub Actions: ci / 1_gateway unit tests (pure logic, no Docker).txt

@Likhithsai2580
Likhithsai2580 force-pushed the fix/auto-intent-override-fn-scope-20261021 branch from 0721e79 to d40c73f Compare October 21, 2026 07:35
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.
@Likhithsai2580
Likhithsai2580 force-pushed the fix/auto-intent-override-fn-scope-20261021 branch from d40c73f to 3f99f54 Compare October 21, 2026 07:40
@Likhithsai2580
Likhithsai2580 merged commit 99cff22 into auto/round-2026-10-21T0230Z Oct 21, 2026
5 checks passed
@Likhithsai2580
Likhithsai2580 deleted the fix/auto-intent-override-fn-scope-20261021 branch October 21, 2026 07:57
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