Skip to content

fix(kiro): keep unbounded tool catalog admission linear - #824

Closed
luvs01 wants to merge 1 commit into
devfrom
fix/kiro-unbounded-catalog-linear
Closed

luvs01 wants to merge 1 commit into
devfrom
fix/kiro-unbounded-catalog-linear

Conversation

@luvs01

@luvs01 luvs01 commented Nov 16, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • 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.
  • Tracks Daybreak finding.

Verification

  • 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.

Devin Review

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.

@coderabbitai

coderabbitai Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

Explain Change →

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.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: svc-aibot-363, lidge-jun

Merge Risk: Minimal · up to cf36a

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: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed 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 Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed 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.

Share

Recent review info

Run configuration

Commits

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.

@github-actions

Copy link
Copy Markdown

✅ Deterministic PR hygiene checks passed.

@github-actions github-actions Bot added the bug Something isn't working label Nov 16, 2026

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

@luvs01

luvs01 commented Nov 16, 2026 •

Copy link
Copy Markdown
Owner Author

No description provided.

@luvs01 luvs01 closed this Nov 16, 2026

luvs01 commented Nov 16, 2026

Copy link
Copy Markdown
Owner Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant