8000 fix(code): name the default embedder and demote catalog noise (#1504) by xerj-org · Pull Request #1603 · xerj-org/xerj · GitHub
[go: up one dir, main page]

Skip to content

fix(code): name the default embedder and demote catalog noise (#1504) - #1603

Merged
xerj-org merged 1 commit into
mainfrom
cursor/code-catalog-embed-hint-44c7
Oct 17, 2026
Merged

xerj-org merged 1 commit into
mainfrom
cursor/code-catalog-embed-hint-44c7

Conversation

@xerj-org
Copy link
Copy Markdown
Owner

What this changes, and why

Field report #1504, two of the suggestions that are still open after #1508 (per-line journalctl and vsftpd records).

The vector leg did not say which embedder it was. xerj code --mode hybrid and --mode semantic print vector over N of M. The default embedder is lexical feature-hashing. A caller who read that line guessed neural. When a vector leg actually ran, the mode line now continues:

vector leg uses the node's embedder (default is lexical feature-hashing, not neural — start the node with --embed-mode neural for the built-in BERT)

It does not claim the running node is on that default. The client cannot see --embed-mode. BM25-only notes are unchanged.

Translation catalogs and minified bundles outranked the implementing file. lang/*.php, values / values-*/strings.xml, *.lproj/*.strings, *.po / *.pot, and *.min.js / *.min.mjs / *.min.css are stable-partitioned behind every other hit before the per-file and per-index caps. They stay in the result. A page that is only catalogs keeps its order. A PHP service file outside lang/ is not treated as a catalog.

Not in this PR: suggestion 2 (a defs boost or --code-only — that moves the measured BM25 ranking) and suggestion 5 (phrase-first log queries — that changes match semantics the ES-YAML suite pins). Suggestion 4 landed in #1508.

Evidence

cargo +1.97.1 test --profile quick -p xerj-common --lib -- xccode::
test result: ok. 84 passed; 0 failed; 0 ignored; 0 measured; 156 filtered out

New tests: semantic_mode_names_the_default_embedder_and_bm25_does_not (semantic note contains lexical feature-hashing and --embed-mode neural; the BM25 answer does not) and catalog_and_minified_hits_rank_behind_source (the implementing .kt, a service .php, and a doc fill a k=3 page ahead of lang/en.php, jssip.min.js, values-da/strings.xml, Localizable.strings, and gettext). The existing hybrid assertions still match: the hint is appended after the vector over N of M text they already check.

Checks

  • cargo +1.97.1 fmt --all -- --check
  • Scoped release build — not run; verified with --profile quick
  • cargo +1.97.1 test --profile quick -p xerj-common --lib -- xccode:: — 84 passed
  • cargo +1.97.1 clippy --profile quick -p xerj-common --all-targets -- -D warnings — clean
  • ES-YAML conformance suite — N/A: no engine query-semantics change
  • New ES-compatible YAML case — N/A
  • Docs — N/A: the mode line is the user-facing text
  • Audit: no durable state, no recovery-path change. Demotion is a stable partition of an already-fetched window; it cannot surface a file the fetch did not return.
  • Operational audit — N/A: no operational document or recipe changed

Not run: a release-profile build; a live xerj code against the AiPBX corpus from the report (the demotion is unit-tested on those path shapes).

Provenance

  • Written by: AI coding agent (Grok 4.7, Cursor cloud agent)
  • Verified (commands run, output observed): fmt check, the 84-test xccode:: run, clippy -D warnings on xerj-common.
  • Assumed (not tested, and what would falsify it): that the report's misses were inside the 10×k fetch window, so demotion can move them onto the page. Falsified if the implementing file was never in that window — demotion does not re-query. Also assumed the server embedder default is still lexical feature-hashing unless --embed-mode neural is set; the mode line would be wrong if that default changed and this string did not.

Refs #1504

Open in Web Open in Cursor 

Field report #1504: hybrid/semantic said "vector over N of M" and the
caller guessed the vectors were neural. The default embedder is lexical
feature-hashing. The mode line now says that, and names --embed-mode
neural, only when a vector leg actually ran. It does not claim the
running node is on the default — the client cannot see the flag.

The same report: lang/*.php catalogs, values*/strings.xml, *.lproj
strings, gettext, and minified bundles outranked the implementing file.
Those paths stay in the result, stable-partitioned behind every other
hit, so a fetched source file fills the page first. A page that is only
catalogs keeps its order.

Co-authored-by: xerj-org <xerj-org@users.noreply.github.com>
@cla-bot
cla-bot Bot commented Oct 17, 2026
Copy link
Copy Markdown

Thanks for this contribution — we'd like to merge it.

Before we can, we need a signed Contributor License Agreement from: @cursoragent

It is a one-time thing per contributor, not per pull request. Read CLA.md, then open a small pull request adding your GitHub username to .contributors — that pull request is your signature, since it is made from your own account.

Once it is merged, comment @cla-bot check here and this check will go green. If you believe you are already covered, comment @cla-bot check and it will re-verify.

8000 Copy link
Copy Markdown
Owner Author

@cla-bot check

@cla-bot cla-bot Bot added the cla-signed label Oct 17, 2026
@cla-bot
cla-bot Bot commented Oct 17, 2026
Copy link
Copy Markdown

Re-checking the CLA status for every commit author on this pull request…

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

0