Skip to content

feat: bound repository context size in load_repo_context (#24) - #45

Open
rishiiicreates wants to merge 1 commit into
AOSSIE-Org:mainfrom
rishiiicreates:fix/bounded-repo-context
Open

rishiiicreates wants to merge 1 commit into
AOSSIE-Org:mainfrom
rishiiicreates:fix/bounded-repo-context

Conversation

@rishiiicreates

@rishiiicreates rishiiicreates commented Oct 5, 2026 •

Copy link
Copy Markdown

Addressed Issues:

Fixes #24

Screenshots/Recordings:

N/A

Additional Notes:

• Introduced _read_capped_file helper with DEFAULT_MAX_FILE_CHARS = 2000 and TRUNCATION_MARKER = "\n... (truncated)" to bound individual markdown files (operational data, architecture, core context, instructions, skills, and README).
• Introduced _append_bounded_section enforcing DEFAULT_MAX_TOTAL_CONTEXT_CHARS = 12000 across all assembled sections, ensuring the joined repository context never exceeds the LLM prompt budget.
• Replaced ad-hoc README truncation with the shared _read_capped_file strategy for consistency across all markdown context sources.
• Preserved all existing intent-based file routing, keyword matching, and error logging behavior.
• Added dedicated test suite scripts/test_bounded_context.py covering capped reads, section budget bounds, mock repo bounds, and real repo context loading (23/23 assertions passing).
• Verified existing scripts/test_link_and_issue_features.py (56/56 passing) and scripts/routing_smoke_check.py.

Checklist

  • My PR addresses a single issue
  • My code follows the project's code style and conventions
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings or errors
  • I have joined the Discord server and I will share a link to this PR with the project maintainers there
  • I have read the Contributing Guidelines

⚠️ AI Notice - Important!

Used AI assistance for brainstorming and structuring unit test cases in scripts/test_bounded_context.py. All logic, budget calculations, and test suites were reviewed, executed, and verified locally with 100% passing results.

Copilot AI balanced review requested due to automatic review settings October 5, 2026 14:51

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@coderabbitai

coderabbitai Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: Repository: AOSSIE-Org/SkillBot/.coderabbit.yaml
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 755b5521-69b1-46a7-8cd3-c941a4b26c04
  • Autopilot · 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

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added backend Changes to backend code python Python code changes size/L Large PR (201-500 lines changed) first-time-contributor First PR of an external contributor needs-review labels Oct 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend Changes to backend code first-time-contributor First PR of an external contributor needs-review python Python code changes size/L Large PR (201-500 lines changed)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bound repository context size in load_repo_context

2 participants