fix: address PR #44 release review comments#46
Conversation
- service.py: disallow empty namespace in TokenRequest (min_length=1) - ingest.sh: update help text to include MD format - safeguards: normalize mode with strip().lower() before matching Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThree utility updates across the Vektra stack: help text documentation now includes Markdown as an accepted file type, the safeguards mode argument receives normalization before comparison, and token request namespace field adds minimum length validation. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 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 |
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request addresses review comments from PR #44, focusing on input validation, documentation, and normalization within the vektra-core and vektra-learn modules. These changes enhance the robustness and clarity of the system. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
🧹 Nitpick comments (1)
scripts/ingest.sh (1)
61-67: Consider adding.markdownextension support for completeness.The script currently handles only
.mdfiles (line 65), but the backend detection mapping (context snippet 1 fromvektra-ingest/src/vektra_ingest/detection.py) supports both.mdand.markdownextensions. Users with.markdownfiles would currently getapplication/octet-streamas the content type, which may cause processing issues.📝 Proposed enhancement to support .markdown extension
case "${FILENAME##*.}" in pdf) CONTENT_TYPE="application/pdf" ;; docx) CONTENT_TYPE="application/vnd.openxmlformats-officedocument.wordprocessingml.document" ;; pptx) CONTENT_TYPE="application/vnd.openxmlformats-officedocument.presentationml.presentation" ;; md) CONTENT_TYPE="text/markdown" ;; + markdown) CONTENT_TYPE="text/markdown" ;; *) CONTENT_TYPE="application/octet-stream" ;; esac🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@scripts/ingest.sh` around lines 61 - 67, The case block that sets CONTENT_TYPE based on "${FILENAME##*.}" currently handles "md" but not "markdown", so files with a .markdown extension fall through to application/octet-stream; update the shell case in scripts/ingest.sh (the section handling FILENAME expansion and setting CONTENT_TYPE) to add a "markdown) CONTENT_TYPE=\"text/markdown\" ;;" arm (or combine "md|markdown") so .markdown files are treated as text/markdown consistently with vektra_ingest/detection.py.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@scripts/ingest.sh`:
- Around line 61-67: The case block that sets CONTENT_TYPE based on
"${FILENAME##*.}" currently handles "md" but not "markdown", so files with a
.markdown extension fall through to application/octet-stream; update the shell
case in scripts/ingest.sh (the section handling FILENAME expansion and setting
CONTENT_TYPE) to add a "markdown) CONTENT_TYPE=\"text/markdown\" ;;" arm (or
combine "md|markdown") so .markdown files are treated as text/markdown
consistently with vektra_ingest/detection.py.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: f3e08475-8b17-4a4c-a367-d9ed322036a1
📒 Files selected for processing (3)
scripts/ingest.shvektra-core/src/vektra_core/safeguards/__init__.pyvektra-learn/src/vektra_learn/service.py
There was a problem hiding this comment.
Code Review
The ingest script was updated to support MD files. The safeguard creation logic was updated to normalize the mode string by stripping whitespace and lowercasing it. A minimum length validation was added to the namespace field in the TokenRequest model.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Fixed in a78d5d9. Added .markdown extension support alongside .md (CodeRabbit nitpick on ingest.sh:61-67). |
What
Why
Review comments on PR #44 (release v0.3.0, develop -> main) identified these issues.
Fixes go to develop first, then PR #44 picks them up.
Summary by CodeRabbit
Release Notes
Documentation
Bug Fixes