Skip to content

Code enrichment reads candidate limits from settings - #1503

Merged
zlareb1 merged 4 commits into
mainfrom
fix/ci-edit-context-candidate-bounds
Nov 26, 2026
Merged

zlareb1 merged 4 commits into
mainfrom
fix/ci-edit-context-candidate-bounds

Conversation

@zlareb1

@zlareb1 zlareb1 commented Nov 25, 2026 •

Copy link
Copy Markdown
Member

Related: #1499
Related: #1516

Changelog category

  • CI Fix or Improvement

Why

The tunable-constant gate rejects two candidate limits and three fixed request caps on main. Candidate reads belong in the settings catalog. The three caps come from the published request schema. Failed main unit job

Scope and risk

code_enrich_example_candidate_limit accepts 1–50 call sites and defaults to 50. code_enrich_indirect_test_caller_limit accepts 1–30 callers and defaults to 30. The edge query reads up to 60 indirect sites. These ranges fit the coverage lookup and preserve the work bounds. The request schema permits 32 read ranges, 1,024 characters per range string, and eight edit-context names.

Compatibility, rollout and rollback

The wire schema and default query limits stay the same. Both settings are optional and apply at startup. Reverting restores the fixed query limits. Earlier builds warn about either key in the settings file.

Tests

  • pytest -q tests/unit/test_tunable_constants.py::test_no_new_tunable_constant fails on main with the five constants and passes with the repair.
  • make format-check lint typecheck passes. The focused unit suite passes 574 tests, including the limit and settings inventory tests.
  • pytest -q tests/integration/test_code_plane.py passes all 46 tests against private ClickHouse.
  • GitHub Actions runs the full unit and integration gates.

AI assistance in the code

  • AI-generated. Codex reproduced the failure, wrote the repair and ran the local checks.

  • 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 settings reference, schema, example and defaults snapshot match the catalog.
  • The PR describes the settings and wire behavior.
  • The commits are signed off.

The unit gate rejects module-level candidate bounds. Validate both limits in the settings catalog before using them in edge queries.

Signed-off-by: Lareb Zafar <[email protected]>
@vercel

vercel Bot commented Nov 25, 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 26, 2026 10:42am UTC
loom-telemetry Ready Ready Preview Nov 26, 2026 10:42am UTC

Request Review

The feature inventory requires coverage for both enrichment settings. The read and edit-context batch caps belong to the published request schema.

Signed-off-by: Lareb Zafar <[email protected]>
Usage example coverage reads at most 50 paths. Bounding indirect candidates at 30 callers keeps synchronous source-window ranking within its existing workload.

Signed-off-by: Lareb Zafar <[email protected]>
The range count and range text length belong to the published request
schema. Keep the current caller-ranking cases in the candidate-limit test.

Signed-off-by: Lareb Zafar <[email protected]>
@zlareb1
zlareb1 merged commit c0a96cf into main Nov 26, 2026
80 checks passed
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