Repository navigation
The unit suite passes on main after the recent plugin, search and memory merges - #1683
Merged
Merged
Conversation
…ory merges Two source-reading checks were red on main. The sender census pins sdk/python/loom/memory.py by digest. The file gained a `code_moved` field on `MemorySearchHit` and its read in `_parse_search_hit`. The coalescer, the only part of the file the census scans, is unchanged and its four sender sites keep their keys, so the pin is renewed. The tunable-constant check reads `MAX_DEPTH` in server/code/domain/index/pool_cut.py as an operator's knob. It is the largest LIMIT for which ClickHouse fetches body columns lazily: a deeper scan reads the body of every candidate, and the depth below it already follows the fusion-signal and prose-penalty settings. The line now says why it is not one. Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com> Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This was referenced Nov 28, 2026
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: #1667
Related: #1673
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):
None.
Why
Two unit checks are red on
main. Each reads source files and fails when a file changes without the check's record of it. Neither is a change in behaviour.tests/unit/test_session_content_senders.py::test_shipped_automatic_senders_have_an_admission_class_or_reviewed_exceptionsdk/python/loom/memory.pyno longer matches its pinned digesttests/unit/test_tunable_constants.py::test_no_new_tunable_constantserver/code/domain/index/pool_cut.py::MAX_DEPTHis a numeric constant named like a knobThe sender census. It pins each file that holds an automatic sender by digest, so that a change to what is sent, or to how a body is built, is read before the pin moves. The pinned digest of
sdk/python/loom/memory.pyis the file's digest at the parent of #1667, so #1667 is the only change to review. It adds thecode_movedfield toMemorySearchHitand reads it in_parse_search_hit: a response field and its parser. The census scans one class in that file,_SetCoalescer, which the diff does not touch. The four sender sites it finds there (memory.settwice,memory.bulk_set, and the forwarding call that has the revieweddeliveryexception) have the same keys before and after. No site is added, so there is nothing to classify and no exception to add.The tunable constant.
MAX_DEPTH = 10_000stops the depth of the lexical leg's scan. It is the largestLIMITfor which ClickHouse fetches the body columns lazily (query_plan_max_limit_for_lazy_materialization, 10,000 by default): a deeper scan reads the body of every candidate. The depth under that stop already follows two settings,LOOM_CODE_FUSION_SIGNALSandLOOM_CODE_SEARCH_PROSE_PENALTY. A setting for the stop would let an operator raise it past the point where the statement stays cheap, so the line carries the marker the check defines for a number that must not be a knob (# not a setting: <reason>). The list of constants that predate the check is not changed.Scope and risk
One digest in
tests/unit/session_content_senders.jsonand one comment inserver/code/domain/index/pool_cut.py. No code token changes: the code-index version stamp hashes code tokens only, so nothing is re-indexed. The census keeps the same files, sites, classifications and exceptions.Left alone:
MAX_DEPTHstays a module constant. No test pins it under ClickHouse's default the waytests/unit/test_code_legs_ride_lazy_materialization.pypins the pool size; that belongs with the search change, not here.Compatibility, rollout and rollback
Tests
The full unit suite was not run locally; CI runs it.
ciruns onmain, the newest at6fcd290636: those two tests and no other. The other four unit parts of that newest run pass.6fcd290636:python -m pytest -q <the two node ids above>gives2 failed, withassert not {'sdk/python/loom/memory.py'}andserver/code/domain/index/pool_cut.py::MAX_DEPTH.2 passed.python -m pytest -q tests/unit/test_session_content_senders.py tests/unit/test_tunable_constants.py tests/unit/test_code_lexical_pool_cut.py tests/unit/test_code_legs_ride_lazy_materialization.py:87 passed.mainate0c7bef6fbmerged into this head and not committed, the two test files give21 passed.python_sitesonsdk/python/loom/memory.pyat the parent of Readers name where a memory's moved code is now #1667 and at this head: the same four site keys. Of the file's top-level definitions, onlyMemorySearchHitand_parse_search_hitdiffer.ruff format --check .,ruff check, the function-length gate, the secret gate and every generator--checkpass. The mypy gate reports onlyserver/llm/vertex_auth.py, where the local environment has no stubs for the Google auth library; CI has them.mainskips while a unit part fails, and the integration jobs.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. Checked by hand: the diff of the pinned file since its pinned digest, the census sites before and after, and that the marker is the check's own path for such a number.
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). None changes.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. No shipped plugin file changes.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
Note
Low Risk
Comment and test fixture digest only; no product logic, wire, or sender behavior changes.
Overview
Restores two failing unit checks on
mainwith no runtime behavior changes.A tunable-constant guard was tripping on
MAX_DEPTHinpool_cut.pybecause the name looks like an operator knob; the line now carries the required# not a setting:marker explaining why the lexical scan depth must stay fixed at ClickHouse’s lazy-materialization limit.The session content sender census pin for
sdk/python/loom/memory.pyis renewed after review: upstream edits (e.g.MemorySearchHit/ search parsing) did not add or alter automatic sender sites, so classifications and exceptions are unchanged.Reviewed by Cursor Bugbot for commit e626d4b. Bugbot is set up for automated code reviews on this repo. Configure here.