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 - #8804
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.
Verification
Validation of 6d0cf4653d566b150453393ecf3e822db702ec3d, integrating dev at da021e37dc15ba740aaca05fd4fd125c12df578e. The three-file feature diff is byte-identical to the previously tested patch.
Bun 1.4.4: bun test tests/providers/kiro/kiro-tool-catalog.test.ts — 17 passed, 41 assertions.
bun test --isolate --parallel=1 tests/ci-workflows/file-size-ratchet.test.ts tests/ci-workflows/structure-ssot.test.ts — 60 passed, 188 assertions.
bun run typecheck — no errors in 2,549 files.
bun run structure:check, bun run privacy:scan, and git diff --check — passed.
The catalog regressions exercise 2,048-tool traversal with and without reserved exec, along with existing order, budget, schema, description and effort behavior.
The repository's resource exception was used for full local/import-graph coverage because of concurrent Windows worktree validation load. Focused tests retained the checked-in isolation preload and semantic lock.
Security-sensitive changes were reviewed for secrets, auth, and unsafe defaults.
The security checkbox records implementation review; explicit maintainer security review remains required before merge.
Summary by CodeRabbit
Bug Fixes
Catalog budget checks now account for the reserved execution tool when deciding which other tools can be included.
With catalog budgeting turned off, tools are processed in declaration order without projection or limit checks. Oversized catalogs are sent to Kiro, which may reject them with a validation error.
Added coverage to verify order and processing behavior for large catalogs, with and without the reserved execution tool.
No actionable comments were generated in the recent review.
Walkthrough
Kiro tool admission now skips projected catalog construction and measurement when OCX_KIRO_TOOL_BUDGET=off. When budgeting is enabled, checks include the reserved execution tool. Tests cover traversal, ordering, and notices for catalogs with 2,048 tools.
Changes: Kiro tool admission
Layer / File(s)
Summary
Catalog admission and budget opt-out src/adapters/kiro-tools.ts, tests/providers/kiro/kiro-tool-catalog.test.ts, structure/providers/kiro.md
At src/adapters/kiro-tools.ts:285-291, enabled budget checks account for the reserved execution tool. The tests at tests/providers/kiro/kiro-tool-catalog.test.ts:90-126 check traversal bounds, declared order, and system notices with budgeting off. The documentation at structure/providers/kiro.md:157-159 describes the opt-out behavior and upstream failure mode.
Issue 8306: This change addresses the tool-count and byte-budget behavior when OCX_KIRO_TOOL_BUDGET=off. The other objectives described in the issue are outside this change.
Merge Risk: Minimal · up to 6d0cf
With the Kiro tool budget off, admission of large tool catalogs now does linear work, and the budgeted behavior is unchanged. No concrete merge-blocking risk was found; the author notes that maintainer security review is still required.
Pre-merge checks: 4
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title "fix(kiro): keep unbounded tool catalog admission linear" matches the main change. The PR builds projected Kiro tool catalogs only when budget enforcement is on, so admission stays linear wh…
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 "fix(kiro): keep unbounded tool catalog admission linear" matches the main change. The PR builds projected Kiro tool catalogs only when budget enforcement is on, so admission stays linear when OCX_KIRO_TOOL_BUDGET=off. The raw summary and the PR objectives both describe this change in src/adapters/kiro-tools.ts, the provider docs, and the regression test. The title is specific and concise, and it follows a conventional commit style.
Finishing Touches
Generate unit tests (beta)
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 da021e3 and 6d0cf46.
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 10 included reviews per hour; 8 remain after this review.
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
Validation of
6d0cf4653d566b150453393ecf3e822db702ec3d, integratingdevatda021e37dc15ba740aaca05fd4fd125c12df578e. The three-file feature diff is byte-identical to the previously tested patch.bun test tests/providers/kiro/kiro-tool-catalog.test.ts— 17 passed, 41 assertions.bun test --isolate --parallel=1 tests/ci-workflows/file-size-ratchet.test.ts tests/ci-workflows/structure-ssot.test.ts— 60 passed, 188 assertions.bun run typecheck— no errors in 2,549 files.bun run structure:check,bun run privacy:scan, andgit diff --check— passed.exec, along with existing order, budget, schema, description and effort behavior.Checklist
The security checkbox records implementation review; explicit maintainer security review remains required before merge.
Summary by CodeRabbit