Repository navigation
Conversation
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 <lareb.zafar@clickhouse.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
7 of 9 tasks
This branch has not been deployed
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: #1499
Changelog category
Why
test_no_new_tunable_constantrejects the two module-level bounds on candidate reads inenrich.py. Declaring them in the settings catalog makes the bounds visible to operators and validates them before they reach the edge queries. Failed unit jobScope and risk
Usage examples read 50 candidate call sites by default. Indirect test lookup reads up to 60 call sites and ranks backups from up to 30 callers. The settings accept positive values that fit the query's unsigned integer limit, including the doubled bound on indirect call sites.
Compatibility, rollout and rollback
Both settings are optional. Builds that include this change accept
LOOM_CODE_ENRICH_EXAMPLE_CANDIDATE_LIMITandLOOM_CODE_ENRICH_INDIRECT_TEST_CALLER_LIMIT. Reverting restores the fixed limits. Earlier builds warn when the settings file contains either key.Tests
pytest -q tests/unit/test_tunable_constants.py::test_no_new_tunable_constantrejects both constants on clean main and passes with this change.make format-check lint typecheckAI assistance in the code
AI-generated. Codex wrote the change and reproduced the unit failure before checking the repair.
I can explain every line of this diff and how it interacts with the rest of Loom.
Checklist
Note
Low Risk
Refactor of existing limits into configuration with the same defaults; no auth or data-path changes, only tunable bounds on enrichment queries.
Overview
Moves two hardcoded enrichment bounds out of
enrich.pyinto the settings catalog so operators can tune them and CI’stest_no_new_tunable_constantstops failing.code_enrich_example_candidate_limit(default 50) caps incoming call sites considered when ranking usage examples.code_enrich_indirect_test_caller_limit(default 30) caps indirect test callers used as backups; edge queries still fetch up to twice that value. Behavior at defaults matches the previous module constants.Settings schema, reference docs, example YAML, and the defaults snapshot are updated. These knobs require restart (not live-reload).
Reviewed by Cursor Bugbot for commit df2bd74. Bugbot is set up for automated code reviews on this repo. Configure here.