Repository navigation
The prompt hook sends a bug report's first pick at a medium or high risk label when the pick model words the answer high or medium - #2172
Merged
Conversation
The tests state the rule and fail: the prompt hook holds a picked answer to the retrieval_risk label, which bands the search's scores before the pick model reads the candidates. A pick worded low, an answer with no word, an abstention, a first pick that fails the place test and a named LOOM_PROMPT_PACK_MIN_CONF keep their rules. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
… pick model words them high or medium retrieval_risk bands the scores of the search, which ran before any model read the candidates. The pick model reads them against the report, so its word is the later reading: the hook no longer drops a high or medium answer for a medium or high label. A pick worded low still sends nothing, an answer with no word keeps the label as its gate, an abstention sends nothing, LOOM_PROMPT_PACK_MIN_CONF is a floor under every answer when set, and the place test is unchanged. The SDK pointer helpers ask for no pick and are unchanged. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…-risk rule name the pick beside it A bug report's answer the pick worded `high` or `medium` is sent at any risk label, and one it worded `low` is sent under no gate. Seven lines still gave the label, or a named confidence, as the whole rule: - docs/features/integrations/claude-code.md: the paragraph on a search with no semantic leg and an uncalibrated namespace, and the hook table's cell, which listed `LOOM_PROMPT_PACK_MIN_CONF` as a third way in where it replaces the other two. - docs/operations/code-index-operations.md: the calibration step. - hooks/HOOKS.md: `LOOM_PROMPT_PACK_MIN_CONF=0.5` does not send an answer the pick worded `low`; the environment table's unset gate. - lib/pointers-status.mjs: the `pointers` line of the status check, with its pinned test string and the generated Codex copy. - server/settings/catalog.py: the comment on `code_search_low_risk_from`, with the three files generated from it. Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com> Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
… holds a low pick back at a named confidence The `/loom:loom-status` bullet of the Claude Code page gave the low-risk label as the whole rule for pointers. It now ends as the status line it paraphrases does: a bug report also gets pointers when the server's pick words its answer `high` or `medium`. The hook reference and the page say that a named `LOOM_PROMPT_PACK_MIN_CONF` does not send an answer the pick worded `low`. Every `low` case ran with no confidence named, so nothing held that. One assertion does now. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
The server serves the picks first and the rest of its ranking after them, and the reply does not say how many picks there are. These tests hold a picked answer at a medium or high label to the one unit the reply proves is the model's, and fail on the code as it is. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
…k alone The server serves the picks first and the rest of its ranking after them, and the reply carries no pick count. A picked answer at a medium or high label passed as its first three results, so where the model picked fewer than three the others were units it read and did not choose, with neither the label nor the model's word behind them. pointerBlock now caps a picked answer that only the model's word admits at one unit, the one the reply proves a pick: the server clears the word on a page that opens with another unit. Where the low-risk label or a named confidence admits the answer, it sends its first three as before. The comments and pages that said such an answer is sent at any risk now say what is sent there, and name the two labels, so none reads as covering an abstention. The setting comment's three generated outputs, the Codex copy and the source pins are renewed. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
…n with the picks The reply holds the picks first and the rest of the ranking after them, and carries no pick count, so "at most three of the picks" said more than the hook knows. The pick-word table and the plugin README now say at most the first three results, which open with the picks. The README's cause-sentence paragraph names the third reason the sentence can name a definition with no pointer: at a medium or high risk only the first pick is listed. The hook test's comment keeps the two silent cases apart: a `low` answer sends nothing at any label, and only an answer with no word is gated by the label. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
… word alone admits the answer A picked answer that a set LOOM_PROMPT_PACK_MIN_CONF admits sends its first three results at any risk label, so the pages no longer say a medium or high risk always sends one. The hooks page says the hook sends the answer's first results, which open with the picks, as the other pages do, and the sentence on a search with no semantic leg names what the variable sends. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
…s a pick The comment on `pointerBlock`, the Claude Code page and HOOKS.md said the reply does not say how many picks there are. Its `score_explanation` text does hold a count. The count is taken before the server gives each definition one slot and cuts the page at `top_k`, so it does not say which units of the page are picks, and the first unit stays the only one the reply proves a pick. The texts now say that. A reply with no word is sent as any other request's: the two sentences that tied it to the low-risk label were wrong with `LOOM_PROMPT_PACK_MIN_CONF` set, and are gone. One test comment states the rule at a low label instead of comparing it with the code before. The Codex copy is regenerated and the two sender pins of `lib/prompt-pack.mjs` are renewed; only a comment changed in that file. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
… beside that search The list of causes (a server with no embedding model, or a vector leg that failed or missed its deadline) followed a colon after the pick's words, so it read as a gloss on `high` or `medium`. It now sits in parentheses after "A search with no semantic leg", as in the hook reference. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
…mment name the unset variable the first-pick rule holds under Three sentences said a picked answer sends its first pick at a medium or high risk label, with no condition. That is the gate with LOOM_PROMPT_PACK_MIN_CONF unset. With the variable set, the confidence it names is the only gate: an answer that meets it sends its first results at any label, and a picked answer under it sends nothing. Each sentence now says "with LOOM_PROMPT_PACK_MIN_CONF unset", as the hook page and the Claude Code page already do. The configuration reference, the settings-file schema and the settings-file template are regenerated from the setting's comment. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
…, and one test holds the first-pick rule The PASS line of the `pointers` check said a bug report gets pointers when the pick words its answer high or medium. With `LOOM_PROMPT_PACK_MIN_CONF` set, an answer under that confidence sends nothing, picked or not, so the line, its pinned test string and the page's bullet now open with the unset variable, as the other texts that state the rule do. `pointerBlock` cannot tell a page with one pick from a page with three, so the test of a page holding units the model did not pick repeated the one above it. Its one assertion of its own, that the block's text names no other unit, moves into that test, which now also holds both words at a named confidence. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
…s the Claude Code page does On `high` or `medium` the hook sends at most the first three results, which open with the picks, or the first pick alone where only the word admits the answer. The page said it sends the picks, and the reply names no pick count. The sentence links to the Claude Code page's pick section, which holds the rule in full. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
10 tasks done
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.
Related: #2105
Changelog category (leave one):
Changelog entry (one or two sentences a user of Loom can read without the diff; the release pull request collects these into the release notes):
For a bug report whose server pick is worded
highormedium, the Claude Code and Codex plugins' prompt hook sends the first pick where the index labels the answermediumorhighrisk; that label used to drop the answer. A pick wordedlow, an answer with no pick word, an abstention and a setLOOM_PROMPT_PACK_MIN_CONFkeep their rules.Why
For a bug report the hook asks
code.searchfor the listwise pick. The server's pick model reads one line for each of the first 100 ranked units against the report, puts the definitions it would change first and says one word,pick_confidence. The hook then held the answer to three gates in a row: the word (lowsends nothing), the index's risk label (anything butlowsends nothing) and the place test on the first pick.The label and the word judge the same answer at different times.
retrieval_riskbandsretrieval_confidence, which is computed from the scores of the search, before any model reads a candidate. The pick model has read the candidates against the report when it sayshighormedium, so its word is the later reading and the one made with more of the evidence. Holding that answer to the earlier reading dropped picks the model stood behind. It did so most where the label says least: a code namespace nobody calibrated, and a search whose vector leg did not run, which readsmediumfor every answer.The change is in
acceptandpointerBlock(lib/prompt-pack.mjs).accepttakespicked, and with no confidence named a picked answer passes without the label being read.pointerBlockcaps an answer that passes that way at one unit.What is sent past the label: the first pick, alone. The server serves the picks first and the rest of its ranking after them (
_pick_units). No field of the reply names how many picks there are and no unit is marked as one. Thescore_explanationtext does hold a count (rerank=pick(<word>, picks=<n>)), but it is taken before the server gives each definition one slot and cuts the page attop_k(_diversify), so the first n units of a page are not always the n picks. The model may pick one unit and sayhigh, and then the second and third units of the page are ones it read and did not choose. At a low-risk label those units go out on the label, as they do with no pick. At amediumorhighlabel nothing stands behind them: the label does not admit them and the model's word is not about them. The reply proves one unit to be a pick, the first: the server clears the word on a page that opens with another unit. So an answer that only the word admits sends that unit and no other. Amediumanswer says one of its picks probably is the place, not that the first is; it is cut to the first as well, because the first is the only pick the reply identifies.What counts as a pick word.
pick_confidenceis exactly the stringhighormedium.pointerBlockalready used that test to choose the picked rules ofplaces(the first pick decides), so one condition selects both.lowsends nothing, as before. Every other value is no word. When no pick answered (no pick model, a call skipped, cut, failed or refused, a page whose first unit is not the pick's first) the reply carries nopick_confidencefield. The hook reads an empty string, and a string that is none of the three, the same way as the absent field. An answer with no word keeps its gate: the label, orLOOM_PROMPT_PACK_MIN_CONFwhen that is set.Design calls:
abstainapart from the confidence, and the hook reads that flag before the label.LOOM_PROMPT_PACK_MIN_CONFis a floor under a picked answer too. The operator named that number for every answer. The alternative, letting a picked answer pass a named confidence, would make the setting gate only answers with no pick and would leave no way back to the old rule without a new setting. As written there is one:LOOM_PROMPT_PACK_MIN_CONFat the deployment's low-risk cut-off (LOOM_CODE_SEARCH_LOW_RISK_FROM, 0.7 by default) holds every answer to the label's band again.score_explanationis not read. It is free text, and it counts the picks before the page is ordered and cut, so it does not say which units of the page are picks. A field that marks the picks of the page would let the hook send every pick past the label. That is a new response field, with its SDK tables and a server release the hook would wait for. This change needs neither and sends what today's reply can prove. Such a field can follow on its own.Scope and risk
accept,pointerBlock), the comments and documentation that state them, the generated Codex copy, and the two plugin manifests.pointersline of/loom:loom-status(lib/pointers-status.mjs, with its test's pinned string, and the bullet ofdocs/features/integrations/claude-code.mdthat paraphrases it), which now opens with the unsetLOOM_PROMPT_PACK_MIN_CONFthe rule holds under, and the comment onLOOM_CODE_SEARCH_LOW_RISK_FROMinserver/settings/catalog.py, from whichdocs/reference/configuration.md,schemas/loom-settings.schema.jsonandloom.example.yamlare generated.docs/architecture/code-index-architecture.mdstates the hook's rule in one sentence besidepick_confidence. It now reads as the pick-word table of the Claude Code page does and links to that section.lowrule, the cause sentence's own rule (highonly), the request the hook sends, what the server does (only that one setting's comment changes), and the SDK pointer helpers. The SDK helpers never ask for the pick: they sendrerank: "none", or with server defaults name no reranker, and a deployment's default reranker is never the pick. So they get no pick word, and they do not read the field; the shared fixtureintegrations/claude-code-plugin/tests/fixtures/pointer-block.jsonis unchanged and all three renderers still pass every case.mediumorhighnow gets one pointer, the first pick, and the cause sentence under ahighpick, where it got nothing. A wrong first pick the model wordedhighormediumreaches the session there; the label hid it before. The block still calls its lines candidates to check, and a first pick that fails the place test still sends nothing.main's behaviour, and there the label or the operator's number admits them.low. The tests here hold the rule; how often the model's word is right is a property of the server's pick model and is not something a unit test shows.tests/unit/session_content_senders.json: the sha256 pins ofhooks/loom-prompt-pack.mjsandlib/prompt-pack.mjs(both plugins) are renewed. Neither file's request builders changed, so nothing new is sent.docs/features/integrations/claude-code.md) are re-aligned by the formatter: one cell in each grew.Compatibility, rollout and rollback
pick_confidenceandretrieval_riskas the server already serves them, so the change needs no server release.LOOM_PROMPT_PACK_MIN_CONFset to the deployment's low-risk cut-off keeps the label's band as the gate for every answer. Both manifests go to 1.2.181; 1.2.179 and 1.2.180 are held by open pull requests.Tests
The first commit holds the tests alone, and they fail on
main's code: four tests, each with ahighormediumpick at amediumorhighlabel that sends nothing. The one-pointer rule came from review: its tests are a commit of their own too, and fail on the commit before them, which sent three.tests/prompt-pack.test.mjsaccept: a picked answer passes at amediumand ahighlabel; an abstention, an empty answer and a named confidence above the answer's still refuse it.pointerBlock, at both labels:highandmediumsend the first unit alone, and the block's text names none of the page's other units;lowsends nothing; no word ("", an absent field, a string that is none of the three) sends nothing; a first pick that fails the place test sends nothing under either word. An abstention carryinghighsends nothing. With a confidence named, a picked answer under it sends nothing, one at it sends its first three under either word, an answer with no word at it sends every result, and an answer the pick wordedlowsends nothing at a confidence that passes.highpick at amediumlabel, and not for an abstention.tests/prompt-pack-hook.test.mjsruns the hook process against a local server with a two-unit reply: at both labels a bug report whose reply sayshighormediumgets the first unit and not the second;lowand no word print nothing; at a low label the second unit is printed too;LOOM_PROMPT_PACK_MIN_CONF=0.6over a reply at 0.5 prints nothing.What I ran:
file-context-read.test.mjs("a server that never answers holds a read for the lookup bound") on my machine, which was busy with other work. This change touches neither that file nor the hook it runs. The file passes alone, and the whole set passes two files at a time, the run above.claude plugin validate integrations/claude-code-plugin --profile directory --strictfails on my machine's CLI (2.1.337) with one warning about the plugin'sbin/folder, which this change does not touch;claude plugin validate .passes.make format lint typecheckand the two prompt-pack test files again; the full node set ran on the commit before it.AI assistance in the code (leave one; writing this description with AI is fine):
AI-generated (an agent wrote most of the diff): Claude Code. I read every caller of
accept, the server code that sets and clearspick_confidence, and each documentation line that stated the old rule, and ran the checks above.I can explain every line of this diff and how it interacts with the rest of Loom.
Checklist
make test-unitand applicable integration results are reported by CI; a full local run is not required before pushing.docs/reference/configuration.mdand thedocs/reference/tables (python scripts/codegen/docs_reference.py), the reach manifest,schemas/schema.sql(make schema-dump), the Codex plugin copies (python3 scripts/codegen/agent_plugin_sync.py) and the standalone skill bundles (python3 scripts/codegen/standalone_skills.py).main; no merged migration is edited. (No migration.)hooks/,lib/,bin/,skills/,.mcp.json, the Codexplugin-defaults.json) bumps both plugin manifests' version, and no other open PR uses that version.npm --prefix frontend run build) and its tests pass, iffrontend/changed. (Not changed.)docs/describe the system as it now is, and this description names any operator steps and wire changes.tests/unit/test_public_copy.py).git commit -s), as CONTRIBUTING.md asks.🤖 Generated with Claude Code