feat(localize): ground task literals in ranked primary evidence - #602
Merged
Conversation
The bounded/scoped localization rework left four helpers without callers: - buildFileSymbolIndexForOrderedPathsContext: callers moved to the scoped variant that threads request/session scope into the projection. - hasFreshSearch: the freshness gate is now folded into the graph-free attributedFileConsumption lookup that replaced it. - enrichTextMatches: every caller passes a request context and scope through enrichTextMatchesContext. - lowerRanges: every caller lowers through lowerRangesContext. Fold the surviving doc comments onto the functions that kept the callers, and reach the embedded reader through the promoted selector in the bounded fault test.
…mission lanes The final-response primary block previously filled from graph rank after at most two single-seat task passes, and a row admitted through leading-file completeness or a body mention could never claim a seat at all. A declaration the task names now competes for the open seats in score order regardless of its admission lane, on a substantive identifier match only; adjacency neighbors stay supporting and the ranked order keeps the final seat. Merged re-observations also keep the strongest provenance label instead of first-write-wins, so a literal observation survives a later graph-hop merge.
…ask-named declarations Round-two replay showed the substring predicate reseating rows on shared prose words while the golds it was built for sat outside evidence entirely. Naming now means the raw task carries the row's identifier or owner as a case-sensitive whole word, and the same predicate promotes a task-named declaration from a page file into evidence with its own task_mention provenance — the page may not show a declaration in an outline while the caller's own report names it and evidence stays silent.
Qualified names carry namespace and package chains, and the repository's own name sits in almost every namespace and almost every task, so matching any segment named the whole page on namespace-bearing languages. Only the immediate declaring owner now counts, and a segment equal to the repository identifier never does.
…f displacing ranked seats A ranked seat is a proven conversion; a task-named row is a hoped-for one. The task-aligned pass now runs after the ranked fill and may only extend the block by two bounded extra seats, never claim a ranked one. The two writers of supportingOnly are separated: a leading-file-depth row may still earn a task-named seat, while a post-terminal supplemental row stays supporting no matter how well it matches the task.
The quoted-recall lane tuned so far feeds a document index and can never find a string inside a function body; the trigram lane can, but eight independent gates kept it from running or from being seated. This change lets the body lane do its job end to end: - a ranked candidate no longer marks a quoted term covered just because the task also names that candidate; coverage means the term is visible in the candidate's own declaration text - every admitted literal competes for the bounded grep budget, longest first, instead of collapsing to a single term; the wall grows with the term count and per-file diversity rises to three - ambiguity is evidence quality, not company: a complete search settling a handful of owners proves each of them, and only saturation or owner-cap overflow leaves them unproven - primary eligibility is per-row for caller-quoted literals; the page-level anchor kill switch now governs only the inferred bare-literal lane - settled content-exact rows on code definitions earn the same final-cut reservation as grep-lane owners, and a lone extra settled site may take the second slot while a crowded field may not - the primary block reserves two literal seats when the second brings a second proven file Two settled registration sites now terminal-claim with both presented, matching what a caller reading the grep output would conclude.
…ral recall An issue names its subject far more often than it quotes it: measured over the sealed-miss population, a distinctive identifier-shaped prose token reaches the gold file three times as often as a quoted literal does. Mined camel-case, underscore, dotted, and digit-bearing tokens — plus long plain words — now feed the same bounded source-literal recall as quoted terms, behind them in the term budget and under the same declaration-coverage test. A dotted citation also contributes its final segment, since a member written as owner.method is greppable only by the method name. Pages whose task quotes nothing are no longer blind to source bodies.
Long plain words reach gold files too, but they are hub vocabulary: their grep pages map to dozens of owners and the admitted rows displace real evidence under the bounded page. Camel-case, dotted, underscore, and digit-bearing tokens carry the citation signal without the noise.
…se-grep-gap * origin/main: (142 commits) Exempt Python dunders from dead-code analysis store_sqlite: normalize native separators in generated dir columns store_sqlite: space WAL auto-checkpoints at 8k pages for index-write bursts store_sqlite: three-phase seeded reindex benchmark Update internal/semantic/tstypes/fact_spool.go ci(deps): bump github/codeql-action/upload-sarif store_sqlite: guard the json transport against unmarshalable payloads resolver: scope page_load to the pass clock resolver: split commit_apply interior timings store_sqlite: bind resolved-conversion updates as one json_each relation resolver: attribute pass interior time and churn shapes tstypes: true up spool capacity hints and page-cap/deadline comments resolver: note razor marker removals; make retention counters mean what they log fix(indexer): use incremental contract cleanup on untrack fix(mcp): cache index health scans fix(agents): register the OpenCode MCP server at user scope feat(agents): install the Gortex sub-agents for Codex CLI style: gofmt the init wizard test test(agents): regenerate the render goldens for the widened fence fix(uninstall): remove Claude Code's per-community skills too ... # Conflicts: # docs/agents.md # internal/mcp/overlay_view.go
…ve Stop hooks on uninstall The stricter linter set that landed on main flags row iteration without an Err check, unchecked rollbacks and flushes, an unused helper, a per-loop regexp compile, and a nil context; each gets the explicit form. The codex render golden reflects the widened hook matchers this branch installs, and the uninstall recogniser map gains the Stop event so the hooks this branch writes are the hooks removal can find again.
The store_sqlite package under race and coverage sits just under the old twenty-minute wall on Linux runners, and the localization projection tests this branch adds push it past. Thirty minutes matches how long the suite actually needs; the per-test alarms still catch a genuine hang early.
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.
What
Localization pages now ground the literals a task carries — quoted strings, backticked spans, and distinctive unquoted identifier-shaped tokens — in ranked PRIMARY evidence, the way a caller running a text search and reading the results would.
Retrieval
Seating
Terminality
Two settled production registration sites now terminal-claim with both presented, instead of holding the session open as advisory.
Notes for review
internal/mcp/overlay_view.gomerges this branch's bounded overlay extraction with main'sExtractBufferadmission lifecycle: bounded extractors keep their budgeted path, legacy extractors now go through the lifecycle for crash isolation.