You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(kiro): keep unbounded tool catalog admission linear - #824
Keep Kiro catalog admission linear when OCX_KIRO_TOOL_BUDGET=off by constructing projected catalogs only while enforcing the budget.
Preserve declaration order, every admitted tool, schema/description conversion, and the existing default count/byte limits and code-mode exec reservation.
Add bounded, deterministic regression coverage for repeated converted-tool traversal, with and without the reserved execution tool.
Before the runtime change, both new traversal regressions failed at the bounded operation limit.
bun test tests/providers/kiro/kiro-tool-catalog.test.ts tests/providers/kiro/kiro-adapter.test.ts: 124 passed, 587 assertions.
bun run typecheck: passed, 2,536 source files.
bun run structure:check, bun run privacy:scan, git diff --cached --check: passed.
bun test tests/ci-workflows/file-size-ratchet.test.ts: 9 passed.
Independent candidate review found no remaining issue in scope and compared 324 bounded/unbounded catalog variants against the original implementation.
Local validation is focused because the whole import-graph suite includes live-provider tests. No live Kiro or other provider requests were made; broader automatic checks remain with CI.
Checklist
Scope stays focused and avoids unrelated cleanup.
Owning architecture contract updated.
Security-sensitive changes reviewed for secrets, authorization, and unsafe defaults.
Summary by CodeRabbit
Performance
Improved tool catalog processing when the catalog budget is disabled, reducing unnecessary work as catalogs grow.
Documentation
Clarified that disabling the budget allows oversized catalogs to pass through unchanged and that Kiro may reject them with a validation error.
No actionable comments were generated in the recent review.
Walkthrough
When Kiro tool budgeting is disabled, the catalog loop skips projected-catalog construction and size checks. Tests cover catalog order and iteration counts, both with and without a reserved exec tool. Documentation describes the behavior for oversized catalogs.
Changes: Kiro catalog budget behavior
Layer / File(s)
Summary
Conditional projection and disabled-budget coverage src/adapters/kiro-tools.ts, tests/providers/kiro/kiro-tool-catalog.test.ts, structure/providers/kiro.md
The catalog loop builds and measures a projected catalog only when budgeting is enabled. Tests check iteration counts and catalog order with budgeting disabled, with and without a reserved exec tool. Documentation notes that oversized catalogs reach Kiro intact.
This change keeps Kiro tool-catalog admission linear when the tool budget is disabled, without changing admitted tools or order. No merge-blocking risk is evident.
Pre-merge checks: 4
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title names the main change: keeping Kiro unbounded tool catalog admission linear. The raw summary confirms the catalog-fill loop now builds and measures the projected tool array only when the bud…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title names the main change: keeping Kiro unbounded tool catalog admission linear. The raw summary confirms the catalog-fill loop now builds and measures the projected tool array only when the budget is enabled, which is the core of the fix. The title uses a conventional commit prefix and is specific, 55 characters, single sentence.
Finishing Touches
Generate unit tests (beta)
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Reviewing files that changed from the base of the PR and between e875721 and cf36ae1.
Files selected for processing: 3
src/adapters/kiro-tools.ts
structure/providers/kiro.md
tests/providers/kiro/kiro-tool-catalog.test.ts
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.
Recording the transfer evidence for this already-closed duplicate: work continues in lidge-jun/opencodex#8804. Source commit cf36ae1f9f979a1d06854a4bffca505a9c10af32 is the first parent of the current upstream head 6d0cf4653d566b150453393ecf3e822db702ec3d; the three feature files are unchanged. Upstream CI 43854905698 passed. The upstream PR is open for review, and its shared head branch is retained.
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
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.
Summary
OCX_KIRO_TOOL_BUDGET=offby constructing projected catalogs only while enforcing the budget.execreservation.Verification
bun test tests/providers/kiro/kiro-tool-catalog.test.ts tests/providers/kiro/kiro-adapter.test.ts: 124 passed, 587 assertions.bun run typecheck: passed, 2,536 source files.bun run structure:check,bun run privacy:scan,git diff --cached --check: passed.bun test tests/ci-workflows/file-size-ratchet.test.ts: 9 passed.Checklist
Summary by CodeRabbit