Skip to content

The unit suite passes on main after the recent plugin, search and memory merges - #1683

Merged
zlareb1 merged 2 commits into
mainfrom
fix/main-unit-suite-after-merges
Nov 28, 2026
Merged

zlareb1 merged 2 commits into
mainfrom
fix/main-unit-suite-after-merges

Conversation

@zlareb1

@zlareb1 zlareb1 commented Nov 28, 2026 •

Copy link
Copy Markdown
Member

Related: #1667
Related: #1673

Changelog category (leave one):

  • CI Fix or Improvement (changelog entry is not required)

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.

Failing test Caused by What it reports Resolution
tests/unit/test_session_content_senders.py::test_shipped_automatic_senders_have_an_admission_class_or_reviewed_exception #1667 sdk/python/loom/memory.py no longer matches its pinned digest The pin is renewed after reading the diff: no sender changed
tests/unit/test_tunable_constants.py::test_no_new_tunable_constant #1673 server/code/domain/index/pool_cut.py::MAX_DEPTH is a numeric constant named like a knob The line says why it is not a setting

The 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.py is the file's digest at the parent of #1667, so #1667 is the only change to review. It adds the code_moved field to MemorySearchHit and 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.set twice, memory.bulk_set, and the forwarding call that has the reviewed delivery exception) 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_000 stops the depth of the lexical leg's scan. It is the largest LIMIT for 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_SIGNALS and LOOM_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.json and one comment in server/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_DEPTH stays a module constant. No test pins it under ClickHouse's default the way tests/unit/test_code_legs_ride_lazy_materialization.py pins the pool size; that belongs with the search change, not here.

Compatibility, rollout and rollback

  • Wire: none.
  • Operator steps: none.
  • Rollback: reverting makes the two checks fail again. No stored data or generated file changes.

Tests

The full unit suite was not run locally; CI runs it.

  • The failing tests come from the failed unit jobs of the four newest ci runs on main, the newest at 6fcd290636: those two tests and no other. The other four unit parts of that newest run pass.
  • Before, at 6fcd290636: python -m pytest -q <the two node ids above> gives 2 failed, with assert not {'sdk/python/loom/memory.py'} and server/code/domain/index/pool_cut.py::MAX_DEPTH.
  • After: the same command gives 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.
  • With main at e0c7bef6fb merged into this head and not committed, the two test files give 21 passed.
  • The census's python_sites on sdk/python/loom/memory.py at 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, only MemorySearchHit and _parse_search_hit differ.
  • ruff format --check ., ruff check, the function-length gate, the secret gate and every generator --check pass. The mypy gate reports only server/llm/vertex_auth.py, where the local environment has no stubs for the Google auth library; CI has them.
  • Not verified locally: the "coverage, floors and bench" job, which main skips 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

  • Local format, lint, type checks and focused tests pass. The full make test-unit and applicable integration results are reported by CI; a full local run is not required before pushing.
  • Generated files are regenerated in this PR, not by hand: the SDK op tables, docs/reference/configuration.md and the docs/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.
  • A new migration is additive and numbered after the latest on main; no merged migration is edited. No migration.
  • A behaviour change to any file a plugin ships (hooks/, lib/, bin/, skills/, .mcp.json, the Codex plugin-defaults.json) bumps both plugin manifests' version, and no other open PR uses that version. No shipped plugin file changes.
  • The frontend builds (npm --prefix frontend run build) and its tests pass, if frontend/ changed. Not changed.
  • Docs under docs/ describe the system as it now is, and this description names any operator steps and wire changes.
  • Repository text has no dates, people, host names, internal namespaces, ticket or decision numbers; the history goes in this description (tests/unit/test_public_copy.py).
  • Commits are signed off (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 main with no runtime behavior changes.

A tunable-constant guard was tripping on MAX_DEPTH in pool_cut.py because 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.py is 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.

…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>
@vercel

vercel Bot commented Nov 28, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
loom-docs Ready Ready Preview Nov 28, 2026 3:12am UTC
loom-telemetry Ready Ready Preview Nov 28, 2026 3:12am UTC

Request Review

@zlareb1
zlareb1 merged commit cef40d7 into main Nov 28, 2026
76 of 77 checks passed
@zlareb1
zlareb1 deleted the fix/main-unit-suite-after-merges branch November 28, 2026 03:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant