Repository navigation
Add the frontier confirmer: lsp.live checks grep.live's top-k hops (K26-1) - #197
Merged
Merged
Conversation
…26-1)
The engine half of K26 (G1), unreachable until K26-2 wires a key: after
the gate and the beam, and before the reranker frontier, the kept hops
whose only witnesses are grep.live text proposals with a site are taken
in hop-value order, cut at the call's top_k, and sent in one call to a
FrontierConfirmer:
- Confirmed (the definition at the site is the source node): the hop
keeps its value, its witness becomes Lsp and conf rises to at least 90.
- Refuted (a definition that is another node): the hop is dropped and
still corroborates at 0.
- Unknown (no answer, an error, the deadline, the call cap): unchanged,
fail-open; a walk never ends on the confirmer.
Calls: the confirmer reports what it used (Confirmation { verdicts,
calls }); the engine clamps it to the pop's remaining external calls and
charges it there. Totals confirm_*, confirm_ms, the expand event's
confirm field, start.confirm; a handle records the setting only when it
is on (a default handle's bytes and hash are unchanged), and a resume
under the other value is refused. LspLive::confirmer asks definition at
each site.
Tests (7): a confirmed mention, a refuted one, unknown and failed calls,
the top_k and call caps, compiler- and lsp-witnessed hops never proposed,
the handle check, and the lsp.live confirmer over a fake backend. Eight
mutations (relabel, refuted kept, no top_k, no clamp, verdict count,
witness filters, the confirmer's cap) each fail a test.
Checks: lci-maps traverse:: and lsp_live:: 261, Unit, clippy -D
warnings, fmt.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…k test - The lsp.live confirmer refutes only when an answered place is held by a different symbol. An answer that only its file can hold (an import or re-export line, a symbol the index lacks, an id-scheme mismatch) is Unknown, not Refuted; a file node as the source is confirmed by a place in that file. - confirm.rs doc: relabel changes the witness, the grep.live offer, the witness list and the confidences, not the claims, so corroboration grouping still reads a mentions claim, and fusion and the hop value are computed before the hook (K26-2 decides the grouping). - The deadline case runs on a paused tokio clock with a 60 s walk deadline instead of a real 100 ms wait. Tests: an_answer_only_the_file_holds_is_unknown_not_refuted (5 cases), a_confirmer_the_deadline_cuts_changes_nothing; two mutations fail the new test. lci-maps traverse:: and lsp_live:: 263, Unit, clippy -D warnings, fmt. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
The engine half of roadmap row K26 (G1):
grep.liveproposes andlsp.liveconfirms the top-k frontier. This PR islci-mapsonly. Nothing calls it until K26-2 adds the[run_profile.walk] confirmkey and the app wiring, so no answer, golden or handle changes.Where it runs.
traverse/confirm.rsaddsFrontierConfirmer,Proposal,VerdictandConfirmation. The hook inexpandruns after the gate and the beam, before the reranker frontier.What is proposed. Kept hops whose only witnesses are
grep.livetext proposals with a site, in hop-value order and cut at the call'stop_k. They go to the confirmer in one call.Verdicts:
Lspand its confidence rises to at least 90.Call charging. The confirmer reports the calls it used. The engine clamps that to the pop's remaining
max_external_callsand charges it to the pop.min(max_calls, proposals), because what it made is unknown.failed: "deadline".Reporting. Totals
confirm_*andconfirm_ms, theexpandevent'sconfirmfield, andstart.confirm.Handles. A handle records
confirm {top_k, identity}only when the confirmer is on, so a default handle's bytes and hash are unchanged. A resume under the other value is refused.The
lsp.liveconfirmer.LspLive::confirmersendsdefinitionat each site:It records nothing in the map's cost log, so hop pricing does not move.
Tests (7) cover:
top_kand call caps;lsp.liveconfirmer over a fake backend.Eight mutations each fail a test.
Checks:
cargo test -p lci-mapswith thetraverse::andlsp_live::filters: 261 passed.-D warningsand fmt.Narrow slice, so per d520 CI's
test (windows-latest)is the Full gate. A Fable review runs alongside.🤖 Generated with Claude Code