Repository navigation
Review follow-ups: docs, comments and tests say what the recently merged changes do - #1699
Merged
Merged
Conversation
… is not read Review nit on the change that drops a coding fact a stored memory states: > The validity check reads only the fact's own `valid_at`, `valid_to` and > `foresight`. A capture sent with a per-call `valid_at` default still has > its facts compared with stored rows and dropped. [...] The > `_stored_neighbours` docstring could say the per-call default is not > considered. The docstring now says so. No behaviour changes. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
… loop Review nit on the change that publishes no-link causes: > `unlinked` runs `mentions()` (six regex passes) over the value of up to > 2,000 memories on the event loop of a serving process. The link pass > does the same work in `asyncio.to_thread` (`code_links._memory_mentions`). > A `namespace.validate` without `keys` on a namespace of large values > stalls other requests on that replica while it runs. Fix: filter the > heads in `asyncio.to_thread`. The filter now runs in a thread. The report is the same. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
Review nit on the change that publishes link lag and link states: > the state statement now also runs `SELECT DISTINCT org, code_namespace > FROM loom.memory_code_links WHERE tombstoned_at IS NULL` over every link > version, every minute on the lease holder. The comment in > `_probe_code_state` still says the rows of this statement "cost nothing" > and that only the counts read every live row. Update the comment, or > move the linked-repositories leg to the counts clock. The comment now names what the statement reads. The probe is unchanged. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
Review nit on the change that publishes no-link causes: > both say the memories read are "all under `keys` when given", but > `linkable_of_namespace` applies `LIMIT 2000` with `keys` too (`unlinked` > always passes `limit=SCANNED`). The claim holds only if > `NamespaceValidateInput.keys` cannot match more than 2,000 served > memories; several identities can hold one key. Reword to "the 2,000 last > written under `keys`", or drop the limit when `keys` is given. Reworded in the `code_unlinked_*` contract text, the `unlinked` docstring and the concepts page. `code_rename_edits` reads through the same limit and made the same claim in its contract text and on the page, so it is reworded too. No read changes. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
Review nit on the change that turned the ingest poller on by default: > the comment "The stock single-node stack enables the non-LLM indexing > workers" and `LOOM_CODE_INGEST_ENABLED=true` now restate the default; > `deploy/standalone/env.example:63` does the same. Drop the line or > reword the comment so the files do not suggest the setting is needed. Both files drop the line. The stock comment stays for the two workers below it that are off by default. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
…lines Review nit on the change that makes a file link follow the lines it cites: > readability. `took`, `first` and `written` carry the whole baseline rule > of `_file_rehashed` in three one-word locals; `took` in particular means > 'no baseline text is readable and the last check matched it'. A name such > as `adopts_checked` would let the branch at line 133 read without the > docstring. `took` is now `adopts_checked`. A rename only. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
Review nit on the change that serves a spelled-out definition second: > `VIA_VALUES` is extended to nine labels but no code or test reads it (the > only reference at this head is its own definition). It had already > drifted from what `_extra_via_labels` serves, which is why this PR had to > add `history`, `card`, `concept` and `hyde` by hand. Delete it, or add a > unit test that the labels `leg_provenance`, `_extra_via_labels` and > `_held_definitions` can produce are all in it. Deleted: nothing read it. The comment above `via` keeps the description. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
Review nit on the change that makes readers name where moved code is: > `_now` reads the line numbers through `_field`, which turns every value > into a cleaned, truncated string, and then parses them back with > `int(_field(link, 'start_line') or 0)`. Read the two integers directly; > `_field` is for the path and name text. `_now` reads the two integers as they are; `_field` keeps the path and name text. The notes read the same. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
… file Review nit on the change that makes readers name where moved code is: > the deleted test `test_a_file_move_names_the_files_not_a_rename` covered > a definition whose module prefix follows its file (`reader::fetch_rows` > to `loader::fetch_rows` in `loader.py`). `memory.ask`'s note now reads > that as a rename (`reader::fetch_rows` is now `loader::fetch_rows` at > loader.py), which is accurate but no test pins the new wording for that > case. One test pins that wording. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
Review nit on the change that follows a moved and edited definition past unrelated new definitions: > The case comment "unsure, as before" narrates history. Say what holds > instead: a deletion beside an unrelated addition is not called removed. The comment now says what the case asserts. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
Review nit on the change that follows a moved and edited definition past unrelated new definitions: > The comment above `moved_and_edited` runs to three lines and stacks > "never ... nor ... unless". Two lines would do: searched for a live link > whose same-file answer is certain, or unsure only because no new > definition there is close (`unmatched`). Two lines, stated positively. The condition is unchanged. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
Review nit on the change that follows a rename across files:
> `limit` is a parameter with one caller and one constant value
> (`_MAX_ELSEWHERE`), and it is not part of the `_once` key `("turnover",
> base, head)`, so a second call with another limit would get the first
> call's answer. Drop the parameter or add it to the key.
The key now holds the limit. The one caller passes one value, so no
answer changes.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
Review nit on the change that follows a rename across files: > the docstring says None means the range cannot be read or is too wide, > "counted in `wide_ranges`". None is also returned when no repository > indexes the namespace (`ingest_scope` is None), and only the too-wide > case is counted. The docstring names the three cases and which one is counted. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
…ated block
Review nit on the change that gives a coding session its own extraction
prompt:
> `_extraction_base_prompt(agent_learnings=True, coding_session=True)` now
> returns the session prompt and silently drops the agent-learnings block;
> on main both were appended. The pipeline never sets both [...], so no
> capability is lost, but the docstring does not say the flag is ignored
> and tests/unit/test_coding_session_extraction.py:45 passes
> `agent_learnings=True` without saying it is asserting that. Fix: one
> clause in the docstring ("a coding session takes no flag-gated block")
> and the same in the test comment.
Both say it. The prompt is unchanged.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
Review nit on the change that marked the pool cut's depth as not a setting: > The marker says a deeper scan reads every candidate's body, yet nothing > pins MAX_DEPTH at or under ClickHouse's lazy-materialization cap. [...] > Raising MAX_DEPTH to 20_000 would pass both files and the tunable gate, > which the marker now silences. [...] Fix, here or in a follow-up: > `assert MAX_DEPTH <= LAZY_LIMIT_CAP` in > test_pool_depths_stay_under_the_lazy_materialization_cap. The test asserts it. With MAX_DEPTH set to 20,000 the test passed before this commit and fails after it. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
…ragraph Review nit on the change that makes readers name where moved code is: > the edited `code.search`/lessons bullet leaves one line unwrapped (`any; > a row another row read for the answer supersedes is not served. > `lessons_left_out` counts the rows the cap, a cut or that rule left`, > about 150 columns) in a paragraph wrapped at about 100. Rewrap it. Rewrapped from that line to the end of the bullet. No word changes. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
…ntry 66 are wrapped evenly
Review nits on the two changes that follow a moved and edited definition
and a rename across files:
> The added sentence starts mid-line and runs to about 105 characters in a
> paragraph wrapped near 90, and the next sentence is broken after "is"
> onto a two-word line. Rewrap the paragraph.
> the new paragraph is hard-wrapped unevenly ("Two definitions that may be
> it," and "first. A" end short lines mid-sentence), and the same is true
> of entry 66 in docs/architecture/rolling-upgrades.md, where one line
> runs past the others. Re-wrap.
The paragraph is rewrapped from its first short line to its end, and
entry 66 whole. No word changes.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
…its width
Review nit on the change that lists the edits a followed rename allows:
> one unwrapped line ("...or the one `reason` no edit is offered. The
> finding's `totals` count the memories by `edits` and by reason. Loom")
> in a paragraph otherwise wrapped at about 90 columns; rewrap.
Rewrapped from that line to the end of the paragraph. No word changes.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
… in order Review nit on the change that gives a coding session its own extraction prompt: > The page says the extractor sets no `valid_at` on a session capture's > fact and that the row takes `valid_at` from `temporal_anchor` or the > observation date. Two unchanged paths set it first: > `apply_message_timestamps` [...] writes the cited turn's time into > `temporal_anchor` and `valid_at` when the capture's messages carry a > `timestamp`, and the write step prefers the call's own `valid_at` [...]. > Fix: say the prompt does not ask for `valid_at`, and name the turn > timestamp and the per-call default ahead of the anchor and the > observation date. The page gives the four sources in the order the write step reads them. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
…st does Review nit on the change that gives a coding session its own extraction prompt: > "about 2,700 tokens where the conversation prompt is 20,000 to 34,000" > gives token counts with no model or tokenizer, and disagrees with the > comment above `_COMPACT_EXAMPLE_IDS` [...]. The only pinned size is > `len(prompt) < 9000` characters in the test. Fix: state the size the > test pins (under 9,000 characters, against roughly 86,000 for the full > conversation prompt), or name the tokenizer and make the comment and the > page agree. The page gives characters: under 9,000, which the test pins, against about 57,000 for the compact conversation prompt and 86,000 for the full one. Measured with len(): 8,058, 56,898 and 86,041. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
…e for one pass Review nit on the change that publishes no-link causes: > `has_read` compares the memory's `version` (the writer's clock, at write > time) with the queue cursor's `queued_at` (ClickHouse's clock, at queue > insert). A write with `version <= read_to < queued_at` (an insert in > flight, or clock skew between the server host and ClickHouse) is counted > under `code_unlinked_name_unresolved` or `code_unlinked_file_not_indexed` > instead of `code_unlinked_pending` until the next pass reads it. Info > severity and transient; the check's `uncertainty` text should say so, or > the read should allow a margin. `code_unlinked_pending`'s `uncertainty` text and the `has_read` docstring say so. The comparison is 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.
|
…exical leg without its pool cut Conflicts and what each side keeps: - server/memory/app/code_link_pass.py: main's `turnover` (the changed paths read once, `turnover_holding` for a wide range) with this branch's `limit` in its remembered key and the docstring's case of a namespace no repository indexes. - server/memory/app/code_link_recheck.py: main's. The comment this branch reworded is gone with the code it sat on, now `_moved` and its docstring. - docs/architecture/rolling-upgrades.md: main's entry 66, which is rewritten and evenly wrapped. - docs/concepts/memory.md: main's words in both paragraphs. The paragraph on following a renamed definition still broke a sentence after "is" onto a two-word line, so it is rewrapped from that line to its end, no word changes. One change git merged cleanly and main had made void: tests/unit/test_code_legs_ride_lazy_materialization.py imported `MAX_DEPTH` from `server/code/domain/index/pool_cut.py`, which main removed with the pool cut. The file is main's again: there is no cut depth left to pin. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.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.
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):
Not required.
Why
About thirty pull requests were merged on an agent review that let findings below a defect through, to be fixed in one follow-up. This is that follow-up. Each finding was read again on current
main. The ones that still hold and take a few lines are fixed here, one commit each, with the finding quoted in the commit message. The rest are listed below with what settled them or why they are left.Almost every fix is a comment, a docstring, a doc sentence or a test that said more or less than the code beside it. Two change how work is done without changing a result:
namespace.validatereads the names of unlinked memories in a thread, as the link pass does, and a range's turnover is remembered per file limit.Scope and risk
No served result, stored row, setting, op or field changes. No plugin file changes, so no plugin version changes.
Fixed here
valid_atdefault is not readunlinkedran the mention patterns over up to 2,000 values on the event loopkeyswhen given" although the 2,000-memory limit applies underkeystoo (code_unlinked_*;code_rename_editsmade the same claim and is reworded with it).env.exampleanddeploy/standalone/env.examplesetLOOM_CODE_INGEST_ENABLED=true, the defaulttookin the file re-hash named nothingVIA_VALUESwas read by nothing and had drifted once_nowparsed line numbers back out of a cleaned stringdocs/concepts/memory.mdmain)RepoReads.turnoverdid not holdlimitin its remembered keydocs/features/memory/extraction.mdgave a wrong order for a session fact'svalid_atAlready settled on
mainPLAINname were all fixed in The test gate stays silent when its tests ran clean or were ruled out #1640 before it merged. The README states that a barepytestandpytest .do not answer. A command that changes the tree before its own run forgets earlier runs since The Stop test gate takes a failed pytest run, or the last run of a command, as an answer and words untested functions as the index's view #1675.retrieval_confidence(The lexical leg of code search cuts its pool on each row's vote times the path penalty the ranking applies #1673).main.main(5c0d7eb) takesmain's side for each, so commits 8a6650b, 4c5d162, b157488 and most of 752dec2 leave nothing in the diff:_moved, whose docstring replaces the comment.MAX_DEPTHnot pinned under the lazy-materialization cap: The lexical leg of code search takes its first 200 rows by score, without the cut on path penalties #1700 removed the pool cut andMAX_DEPTHwith it, so the assertion added here is dropped and the test file ismain's.code_rename_editsparagraph: A memory that names a renamed definition has its text updated when the rename is certain #1703 rewrote the paragraph and that line is gone.Left, with the reason
tests/test-gate.test.mjs: the limit of the last-sentence rule, the cost of an answered stop, the wording for a gate whose only tests are missing, the--continue-on-collection-errorsgap and the mid-file imports belong there. A prompt does not wait on run.begin, and a Stop does not wait on the namespace audit #1695 rewrites the hand-off paragraph ofHOOKS.md, the header ofloom-record.mjsand the shared runner:LOOM_HOOK_DEBUGat SessionEnd and "about half a second" go away with it, and "no cursor has moved" is still too wide in its text. Editing the same lines here would only make those two conflict.PYTEST_ADDOPTS=-xbefore pytest (The Stop test gate takes a failed pytest run, or the last run of a command, as an answer and words untested functions as the index's view #1675): the pattern that reads limits does not match the assignment form, so the fix is a new rule in a shipped hook, not a few lines.code_ingestalso requirescode_intel_enabled, and whether the untriggered count skips inactive namespaces (Code ingest polls configured repositories by default, and one with no trigger is a health error #1652); whether a re-hash should replace a file link with a definition link, and whatrecheckedcounts (A memory linked to a file follows the lines it cites and the definition it names #1644); a secondsearch.fusespan with no label (The lexical leg of code search cuts its pool on each row's vote times the path penalty the ranking applies #1673); a named definition in the first unit's file, and a file name with no directory read as a qualified name (Code search serves the definition of a name the query spells out after its first result #1671); anunresolvedlink over a range too wide to search (A link follows a definition renamed as it moves to another file or scope #1672); the concept leg writing the main leg's trim counter (seen in the review of A long code-search query keeps its informative terms #1664, older than it).code_rename_edits(namespace.validate lists the token edits a followed rename allows in each memory, or why none is offered #1674), the second embedding call of the stored-memory read (A coding capture does not write a fact a stored memory already states #1645), the last turn's usage rows on a host torn down at exit (Recording hooks hand off after a tool call and at Stop, and run in one process at SessionEnd #1677).record_passpath (Code ingest polls configured repositories by default, and one with no trigger is a health error #1652), a_besidecase with a pending row and the repeated reads of the per-path fallback (A memory linked to a file follows the lines it cites and the definition it names #1644),_RenameEditsas a closure (namespace.validate lists the token edits a followed rename allows in each memory, or why none is offered #1674), a scripted write-step test forforgetandforesight(Extracting a coding session that holds nothing to remember costs a fraction of a cent #1676).Compatibility, rollout and rollback
exceptionstext of the fourcode_unlinked_*findings and ofcode_rename_edits, and theuncertaintytext ofcode_unlinked_pending, read differently innamespace.validate's reply.LOOM_CODE_INGEST_ENABLED=trueline, which is the default.Tests
main:pytest tests/unit/test_code_legs_ride_lazy_materialization.py tests/unit/test_coding_session_extraction.py tests/unit/test_memory_code_staleness.py tests/unit/test_memory_code_links.py tests/unit/test_code_unlinked.py: 307 passed. Three of them are test files this change edits; the last covers the one function moved to a thread.main, called directly:test_pool_depths_stay_under_the_lazy_materialization_cap, the two rename-note tests oftest_memory_code_staleness.pyand the coding-session prompt test at both sizes pass, and theturnovercheck below gives the same result onmain'sturnover.ruff format --check,ruff check, the function-length gate, every generator's--checkand Prettier on the changed pages pass on the merged tree.unlinked: a spy onmentions()ran on the event-loop thread before the commit and on a worker thread after it, with the same report.turnover: on oneRepoReads, a call withlimit=32after a call withlimit=1returned None before the commit and aTurnoverafter it._now: five link shapes render the same notes before and after.len(): session 8,058 characters, compact conversation 56,898, full conversation 86,041.test_env_example_vars_are_read,test_stock_env_matches_docs,test_stack_bundle,test_namespace_validateandtest_public_copy, called directly: none failed.ruff format --checkon the changed files,ruff check, the function-length gate, every generator's--checkand Prettier on the three changed pages pass. The mypy gate reports onlyserver/llm/vertex_auth.py, where this machine lacks the stubs of an optional dependency.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. Each finding was read against the code on
mainbefore its fix, and the checks under Tests were run on the result.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) and the Codex plugin copies (python3 scripts/codegen/agent_plugin_sync.py).main; no merged migration is edited.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.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
Note
Low Risk
Changes are mostly comments and docs; the turnover cache key and threaded
unlinkedfilter are low-risk correctness/performance fixes with no API or schema changes.Overview
Follow-up after a large review sweep: almost every change is documentation, comments, or tests so prose matches the code beside it, with two small runtime adjustments that do not alter stored rows or wire formats.
Docs and configuration reword memory code-link and extraction behavior (session-capture prompt size in characters,
valid_atprecedence, the 2,000-memory scan cap wording)..env.exampleanddeploy/standalone/env.exampledrop explicitLOOM_CODE_INGEST_ENABLED=truebecause that value is already the default.Code intelligence cleanup removes the unused
VIA_VALUEStuple fromserver/code/domain/units.pyand keeps comments accurate.Memory / code-link path updates docstrings and operator-facing contract text (
namespace.validateexceptions forcode_unlinked_*andcode_rename_edits, pluscode_unlinked_pendinguncertainty).RepoReads.turnovernow keys its memo onlimitso different file limits do not share a cached turnover.unlinkedfilters whether memories “name code” viaasyncio.to_threadso mention matching does not block the event loop.code_change._nowreads line numbers from raw link fields (not cleaned display strings).code_link_rehashrenamestooktoadopts_checkedfor clarity only.Tests add coverage for pool
MAX_DEPTHunder the lazy-materialization cap and for stale-code notes when a module prefix follows its file on rename.Reviewed by Cursor Bugbot for commit b1aabf5. Bugbot is set up for automated code reviews on this repo. Configure here.