add skills - #21
Conversation
git-subtree-dir: repos/SocialShareButton git-subtree-split: 231c06f347bcae0e9dc39bf32cdbd4983fcaf063
git-subtree-dir: repos/Template-Repo-Main git-subtree-split: ba634f3439b6d2b4d8457b526f601e9b3d434ad5
git-subtree-dir: repos/OrgExplorer git-subtree-split: 6e5e6278478b4fa40a2a6bed1156b05ef190e027
…ude bot routing tests
…text, improve logging, and add new GSoC Proposal Assistant project files.
…eads and append new entries to gap logs
|
Warning Review limit reached
Next review available in: 48 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
WalkthroughThe change adds repository-aware routing, dynamic context loading, external-link enrichment, issue creation, subtree synchronization, project documentation, security records, and routing smoke tests. It also updates clarification guardrails and Ollama context configuration. ChangesRepository-aware bot and context corpus
Estimated code review effort: 5 (Critical) | ~120 minutes Sequence Diagram(s)sequenceDiagram
participant Contributor
participant Discord
participant bot.py
participant repo_router.py
participant Ollama
participant GitHub
Contributor->>Discord: submit project query
Discord->>bot.py: deliver message and thread context
bot.py->>repo_router.py: resolve repository
repo_router.py->>Ollama: classify unresolved query
Ollama-->>repo_router.py: return repository or none
repo_router.py->>GitHub: fetch linked context or comments
GitHub-->>repo_router.py: return external context
repo_router.py-->>bot.py: return repository context
bot.py-->>Discord: send response or clarification
Estimated code review effort: 5 (Critical) | ~120 minutes Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (3 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
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. Comment |
|
|
@CodeRabbit review |
✅ Action performedReview finished.
|
|
Please resolve the merge conflicts before review. Your PR will only be reviewed by a maintainer after all conflicts have been resolved. 📺 Watch this video to understand why conflicts occur and how to resolve them: |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
BestPracticesChecklist.md (1)
28-37: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick winFix the score-table replacement boundary.
The generated section currently contains duplicated rows and a malformed table separator. In
.github/workflows/checklist-score.yml, the replacement regex matches the first---substring inside the Markdown table separator instead of the standalone---delimiter, so each workflow run preserves stale table fragments.Use a full-line delimiter and rerun the workflow to regenerate this file.
Suggested workflow fix
- r'(?<=<!-- Auto-updated by checklist-score\.yml workflow — do not edit manually -->).*?(?=---)', + r'(?<=<!-- Auto-updated by checklist-score\.yml workflow — do not edit manually -->).*?(?=^---\s*$)', formatted_table, content, - flags=re.DOTALL + flags=re.DOTALL | re.MULTILINEAlso applies to: 48-55
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@BestPracticesChecklist.md` around lines 28 - 37, Update the score-table replacement regex in the workflow’s generated-section handling to match standalone full-line `---` delimiters rather than the first substring within a Markdown table separator. Regenerate BestPracticesChecklist.md by rerunning the workflow so duplicated rows and malformed separators are removed.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In `@BestPracticesChecklist.md`:
- Around line 28-37: Update the score-table replacement regex in the workflow’s
generated-section handling to match standalone full-line `---` delimiters rather
than the first substring within a Markdown table separator. Regenerate
BestPracticesChecklist.md by rerunning the workflow so duplicated rows and
malformed separators are removed.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: d3da18f2-060d-4207-a518-85d03bcbeb72
📒 Files selected for processing (2)
BestPracticesChecklist.mdchecklist-status.json
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
bot.py (1)
46-46: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winRestore sufficient repository-routing history.
Limiting recovery context to four messages can miss a repository mentioned five or more messages earlier. The subsequent LLM classifier receives only
cleaned_query, so valid threads may be incorrectly routed to clarification. Preserve the previous window or use a targeted lookup of the thread’s earlier repository-bearing messages.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@bot.py` at line 46, Increase THREAD_HISTORY_LIMIT to restore the previous recovery window, or implement targeted retrieval of earlier repository-bearing messages before classification. Ensure the classifier receives sufficient thread history to identify repositories mentioned more than four messages earlier while preserving existing routing behavior.
♻️ Duplicate comments (1)
bot.py (1)
341-344: 🩺 Stability & Availability | 🟠 MajorDuplicate: serialize every Ollama invocation.
ollama_lockis acquired only at Line 411, so both repository-classifier calls and the clarificationgenerate_ollama_responsecall can execute concurrently against the local Ollama instance. Route all Ollama calls through a shared locking helper.Also applies to: 362-365, 393-393
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@bot.py` around lines 341 - 344, Serialize all Ollama interactions through the shared ollama_lock rather than acquiring it only at the later call site. Update the repository-classifier invocations of classify_repo_with_llm and the clarification generate_ollama_response call to use a common locking helper, preserving their existing arguments and results while ensuring no Ollama calls run concurrently.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In `@bot.py`:
- Line 46: Increase THREAD_HISTORY_LIMIT to restore the previous recovery
window, or implement targeted retrieval of earlier repository-bearing messages
before classification. Ensure the classifier receives sufficient thread history
to identify repositories mentioned more than four messages earlier while
preserving existing routing behavior.
---
Duplicate comments:
In `@bot.py`:
- Around line 341-344: Serialize all Ollama interactions through the shared
ollama_lock rather than acquiring it only at the later call site. Update the
repository-classifier invocations of classify_repo_with_llm and the
clarification generate_ollama_response call to use a common locking helper,
preserving their existing arguments and results while ensuring no Ollama calls
run concurrently.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 32dd14d8-7348-4181-aa41-4f4d96b58842
📒 Files selected for processing (1)
bot.py
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Actionable comments posted: 4
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
BestPracticesChecklist.md (1)
120-124: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick winDo not claim historical response rates from policy notes alone.
These notes assert that most or all reports received responses during the last 2–12 months, but provide no dated, auditable evidence. Link anonymized historical records or leave these criteria unchecked. This repeats the previously raised response-evidence gap.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@BestPracticesChecklist.md` around lines 120 - 124, Remove the unsupported checked status for report_responses and enhancement_responses in BestPracticesChecklist.md, or add links to dated, anonymized records that audibly substantiate the claimed historical response rates; do not rely on the self-certification notes alone.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@BestPracticesChecklist.md`:
- Around line 36-46: Update the score-table replacement logic in the checklist
scoring workflow to terminate only on a standalone horizontal-rule line,
preventing duplicate or malformed table output. Then regenerate
BestPracticesChecklist.md through the workflow or its generator, without
manually editing the generated score section.
In `@bot.py`:
- Around line 291-338: Guard every Ollama request with ollama_lock: wrap both
classify_repo_with_llm calls in _resolve_repo, including the thread and channel
branches, and wrap the fallback generate_ollama_response call in process_message
for unmapped-repo clarification. Keep the existing mapped-repo response locking
and classification behavior unchanged.
- Around line 297-306: The repository-resolution flow duplicates
conversation-context construction when keyword detection falls back to thread
history. Update _resolve_repo to return the context produced by
_build_conversation_context, and have process_message reuse that returned value
when constructing full_prompt instead of invoking _build_conversation_context
again; preserve the existing behavior for paths that do not build context.
In `@repo_router.py`:
- Around line 325-342: Add the missing asyncio import in repo_router.py so the
GitHub link enrichment block can resolve asyncio.gather when processing URLs
collected by the GitHub link handling flow.
---
Outside diff comments:
In `@BestPracticesChecklist.md`:
- Around line 120-124: Remove the unsupported checked status for
report_responses and enhancement_responses in BestPracticesChecklist.md, or add
links to dated, anonymized records that audibly substantiate the claimed
historical response rates; do not rely on the self-certification notes alone.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 3151d91e-a4b2-430a-a5ea-a5699813e44e
📒 Files selected for processing (6)
BestPracticesChecklist.mdbot.pychecklist-status.jsonrepo_metadata.pyrepo_router.pyscripts/test_bot_routing.py
…ures - Added support for creating GitHub issues based on user requests. - Implemented fetching of external links from allowlisted domains. - Introduced tests for edge cases related to link fetching and issue creation. - Updated environment configuration and dependencies.
…; delete OrgExplorer project architecture, operational data, deployment instructions, setup guide, testing strategy, and README.
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
There was a problem hiding this comment.
Actionable comments posted: 8
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/checklist-score.yml:
- Around line 130-133: Update the re.sub pattern in the checklist table
replacement so its lookahead begins at the standalone horizontal-rule line,
including the existing newline before it, allowing formatted_table to own the
delimiter-adjacent newlines and avoid extra blank lines. Keep the replacement
behavior and delimiter matching otherwise unchanged.
In `@bot.py`:
- Around line 430-433: Update the channel-branch call to classify_repo_with_llm
inside the ollama_lock block to pass the configured OLLAMA_NUM_CTX value,
matching the existing thread-branch invocation and ensuring operator
configuration overrides the function default.
- Around line 528-532: Protect the issue-creation dispatch in the
is_issue_creation_request branch before calling handle_issue_creation_request by
requiring the author to pass an authorization control, preferably a
role/allowlist check using a new ISSUE_CREATION_ROLES configuration constant
alongside the existing configuration constants. Reject unauthorized authors
without invoking the GitHub write path, while preserving the current behavior
for permitted users.
- Around line 372-374: Truncate the model-generated title before passing it to
create_github_issue in the issue-creation flow, ensuring the submitted title
does not exceed GitHub’s 256-character limit while preserving shorter titles
unchanged.
In `@repo_router.py`:
- Around line 505-525: Update create_github_issue to bound proc.communicate()
with a 10-second timeout, matching the file’s external-call timeout convention.
On timeout, kill the gh subprocess, await its completion to avoid leaving it
running, log the timeout, and return None; replace the existing unguarded
communicate call rather than retaining it.
- Around line 459-464: Update the remaining_slots calculation in the
link-fetching flow to subtract the number of attempted GitHub URLs, not
len(fetched_parts), so failed fetches still consume the MAX_LINKS budget. Use
the attempted URL collection already available in the surrounding code, and
preserve the existing generic fetch and result filtering behavior.
- Around line 406-412: Re-validate the final response URL’s hostname after the
redirect-following request in the generic link-fetch flow. Use the existing
allowlist validation associated with ALLOWED_EXTERNAL_DOMAINS, reject and return
None when the redirected host is not permitted, and keep the current status-code
handling for approved destinations.
In `@scripts/test_link_and_issue_features.py`:
- Around line 244-247: Update the plain-URL repository check in the test flow to
use the renamed metadata key GSoC-Info-Assistant and expect its corresponding
full repository name, while preserving the existing check structure.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 198c1432-f50d-4de9-9e88-a5c082fecd09
📒 Files selected for processing (8)
.env.example.github/workflows/checklist-score.ymlBestPracticesChecklist.mdbot.pyrepo_metadata.pyrepo_router.pyrequirements.txtscripts/test_link_and_issue_features.py
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
…ndling and redirect validation
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@regex_test_output.txt`:
- Around line 1-4: Replace the truncated regex_test_output.txt transcript with
an executable regression test covering the complete table replacement, delimiter
spacing, and ensuring the table separator row is not matched; otherwise remove
the artifact so it is not presented as test coverage.
In `@scripts/test_link_and_issue_features.py`:
- Around line 283-290: Update the timeout test around create_github_issue to
patch repo_router.asyncio.wait_for so it raises asyncio.TimeoutError and assert
it is called with timeout=10.0. Replace hang_proc.kill’s lambda with a mock and
assert kill is invoked, while retaining the existing wait/reaping and
None-result assertions.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 076f8e8e-8913-471d-ae75-0ef6ea31cca0
📒 Files selected for processing (5)
.github/workflows/checklist-score.ymlbot.pyregex_test_output.txtrepo_router.pyscripts/test_link_and_issue_features.py
Addressed Issues:
Fixes #(issue number)
Screenshots/Recordings:
Additional Notes:
Checklist
We encourage contributors to use AI tools responsibly when creating Pull Requests. While AI can be a valuable aid, it is essential to ensure that your contributions meet the task requirements, build successfully, include relevant tests, and pass all linters. Submissions that do not meet these standards may be closed without warning to maintain the quality and integrity of the project. Please take the time to understand the changes you are proposing and their impact.
Summary by CodeRabbit
New Features
Bug Fixes
Documentation
Tests