Repository navigation
Done
Labels
enhancementNew feature or request
Description
Company
ClickHouse
Component
Code index
Use case
A PR-review agent ran 14 complete sessions on two ClickHouse PRs (#135745, #124680), with Loom on and off, on the same commit and binary. With Loom, sessions cost 13–23% more, took the same time and found the same bugs. Most of that cost came from a client bug, now fixed. The rest comes from the shape of Loom's answers:
- The agent treats
code.review_briefas a to-do list. On #135745, sessions with the brief took 96–108 turns, against 64–79 without, and reached the same verdict.- 6 of the 10 touched functions listed were
REGISTER_FUNCTION(×3),create(×2) andisDeterministic, all with fan-in 0. - Test links such as
tests for FunctionGetMacro::create: test.py, test.py (+4521)carry no signal and print no path. code.test_gatelisted 25 obligations, including the generic00534_functions_bad_arguments*suites.- For a small, well-tested PR the brief ran to 3.8k characters, when the useful answer was "covered, no gaps".
- 6 of the 10 touched functions listed were
code.test_gateandcode.tests_forread the indexed head. On an older PR the head already holds later fixes: one session on #124680 found the regression test added by a later fix.- Clients cannot tell when Loom is degraded. In three windows over two weeks, between 40% and 100% of calls failed (one window: 1,618 of 1,618), and reviews produced without Loom looked normal.
- The agent made 0–3 Loom calls per session. Every answer was correct, but grep over a page-cached tree answers a plain lookup in 0.13 s. The answers grep cannot give are callers through overrides, whether a function is actually tested, and which later PR changed these lines.
- About 20 of the 30 memories recalled for #135745 were PR summaries of 1.5–2k characters each. They push the actionable lessons (false positives, maintainer preferences) down the block.
- The client reported every recalled memory as used through
run.complete(memories_used=…)while a prompt cap hid them from the model. Thoseusedandevidenceevents now rank rows the model never read, and Loom has no way to take back a run's credit.
What works: recall relevance (the top hit was the exact precedent, #121398), correct index answers, and a code.review_brief point read of about 100 ms.
Describe the solution you'd like
In priority order:
code.review_briefanswers with a verdict. A top-level verdict (for examplecovered_no_gaps) before any lead. Registration, factory and constructor hunks are collapsed out of the touched symbols. Test links keep the strongest evidence class and always print paths.code.test_gatetests are ranked by evidence class and cut, so generic suites that reach every function drop out.at: <merge_sha>oncode.test_gateandcode.tests_for. They answer as of that commit, so a replay or backfill sees only what a reviewer had at merge.- A degraded signal. One
degradedfield on any response served from a fallback or a partial read, and a status op clients can poll for current incidents. - Answers grep cannot give, by default.
code.symbolandcode.greplead with callers through overrides, measured test coverage and the later PRs that changed the lines. - A kind facet on memory search, and compact PR summaries. A filter that asks for lessons first, and a short form of each PR summary.
- Retracting a run's usage credit. An op that cancels the
used,evidenceandharmevents a run or a time window wrote, as compensating events, somemory_usage_totalscorrects itself and the history stays readable. Separately, consider crediting only what a client reports it delivered to the model, not what it recalled.
Describe alternatives you've considered
sectionsandtoken_budgetoncode.review_briefshorten the brief but leave it a list of leads.code.callers,code.coverage_claimandcode.symbol_historyanswer the grep-proof questions, but each is a separate call that an agent skips when grep is as fast.memory.outcomewithnegativerecords harm; it does not undousedorevidencecredit.
Where the need comes from
I hit this need myself
Additional context
Each item is one pull request. Two PRs can show cost and behaviour; they cannot show that Loom never helps find bugs.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or request
Activity
A replay keeps degraded, each note is listed once, and ops.incidents …
Concurrent ops.incidents polls share one read, and a brief whose read…
A brief with an unread diff and a failed overrides probe say so in de…
A merged brief lists the functions a PR adds, and a refused read is a…
Code and memory read fallbacks note what they served, and ops.inciden…
Caches judge an answer by its own notes, and ops.incidents counts fol…
A fallback an op's own field reports is in degraded too
Later pages name only their pool's notes, and grep and memory pages c…
Gates whose grant read fails say so, and memory.search names only the…
1 remaining item
Added-namespace gates note an unread grant; ops.incidents says whethe…
ops.incidents' request share leaves out its own polls; an unread regi…
Tracker gates note a grant they could not read
A failed status count is kept briefly and named; an unread record tra…
A published summary answers while a failed count is kept
A kept failed count survives the memo's size eviction
Every broad except in the code and memory apps notes or is listed
A cached as-of names its failed lag read; a refusal lists without a note
A failed gap read is named whichever path served the coverage
A gathered read that failed is noted, and a bulk write without its li…
A published coverage row answers over a kept failed gap read
code.review_brief answers with a verdict, and the wiring a PR adds an…
Responses served from a fallback say so in degraded, and ops.incident…
zlareb1 commentedon Dec 4, 2026
All six items are on
main:code.review_briefanswers with a verdict: code.review_brief answers with a verdict, and the wiring a PR adds and generic test-map suites drop out #2046.at_commitoncode.test_gateandcode.tests_for: code.test_gate and code.tests_for answer as of a commit withat_commit#2043.degradedon responses served from a fallback, andops.incidents: Responses served from a fallback say so in degraded, and ops.incidents lists current incidents #2047.leadblock oncode.symbolandcode.grep: code.symbol and code.grep lead with each definition's callers, test coverage and changing PRs #2048.memory.searchand summaries by their head: memory.search serves requested kinds first and summaries by their head #2044.run.retract_credit, andmemories_deliveredonrun.completeso only keys a client showed the model earn credit: run.retract_credit cancels a run's usage credit with compensating events #2045.