Repository navigation
fix(search): rank JSON object keys below executable definitions - #4724
Closed
ScriptedAlchemy wants to merge 2 commits into
Closed
ScriptedAlchemy wants to merge 2 commits into
ScriptedAlchemy wants to merge 2 commits into
Conversation
JSON top-level object members are extracted as Const symbols to support configuration resolution, but they are data keys rather than executable definitions. Their name matches previously received the same privileged source-role tier as code declarations, crowding capped symbol pages. Keep JSON keys searchable, with their original lexical score, while reserving ProductionDefinition for actual non-JSON code definitions. Leave test-file precedence and exact/lexical authorization unchanged. Add role classification checks and a mixed JSON/Rust/test corpus regression through the real sealed lexical artifact. The bounded winner heap must select the code definition, and a configuration-scoped query must still retrieve the JSON key. Refs #4451: the larger multiword ranking and corpus acceptance is separate from this JSON-key source-role fix.
|
Apply the exact rustfmt change from the repository gate failure while retaining the test assertion and candidate-ranking behavior.
Owner
Author
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.
Root cause
Refs #4451 (JSON-key result flooding, a partial item).
The JSON extractor intentionally emits top-level configuration object members as
Constnodes: the TypeScript/package configuration resolver depends on their sealed signatures. The search source-role classifier nevertheless promoted a same-name JSON key toProductionDefinition, the same priority tier as executable functions or symbols. In a capped lexical/exact candidate page, numerous JSON keys can displace actual code definitions irrespective of BM25 score.Focused change
package.json,tsconfig.json, and JSON-scoped searches still need their keys..jsonasProductionOther, even when the key itself matches. This is the existing source-role authority that both lexical and exact winner selection consume, so ranking and emitted evidence stay consistent.Regression coverage
K=1) result; JSON still appears in the uncapped result and in an explicitly JSON-directory-scoped search.Validation and limits
Source-level review completed for the current
masterand the complete two-file commit diff. Blob identity, no trailing whitespace, and final-newline checks completed. The Rust/Bazel tests, rustfmt and full suites have NOT executed: this execution environment has no Bazel or Rust toolchain or repository checkout. Hosted CI must validate the isolated PR branch before merge, especially the source-tier unit test and//crates/tracedecay-query:search_quality_suite.This patch addresses JSON object-key priority, not the full multiword
fetchWidgetAutoTagItemsForwardTotalacceptance or ranking measurements on the reported ~7k-file repository. #4710 separately repairs multiword subtoken candidate admission, #4702 handles CLI refusal wording, and the stale MCP description/privacy items have landed separately. Keep #4451 open until the full user journey is verified.The existing PR-repair automation owns CI repair and authorized merges. This issue sweep does not modify or race with those PR branches.