Enhance agent path resolution for register mode project root kits#47
Conversation
…oot kits and add corresponding tests Signed-off-by: ainetx <viator@via-net.org>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughBoth ChangesRegister-mode kit path resolution with
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
…egistered legacy paths Signed-off-by: ainetx <viator@via-net.org>
There was a problem hiding this comment.
🧹 Nitpick comments (1)
tests/test_agents_coverage.py (1)
424-557: ⚡ Quick winAdd one negative traversal regression for register-mode kit paths.
These tests cover the intended
path = ".."success path well. Add a companion case (for examplepath = "../..") asserting the kit is skipped/not resolved, so the containment check remains explicitly protected by tests as this guard model evolves.🤖 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 `@tests/test_agents_coverage.py` around lines 424 - 557, Add two new negative regression test cases to verify that the containment check prevents kits with paths outside the project root from being resolved. Create a test method similar to test_generate_agents_supports_register_mode_project_root_kit_path but using path = "../.." in the core.toml configuration, then assert that the result status is not PASS or that the generated skill file does not exist. Similarly, add a companion test method similar to test_list_public_components_supports_register_mode_project_root_kit_path using path = "../.." and verify that the components list is empty or does not contain the gears kit, ensuring the containment validation logic is explicitly covered by regression tests as the guard model evolves.
🤖 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.
Nitpick comments:
In `@tests/test_agents_coverage.py`:
- Around line 424-557: Add two new negative regression test cases to verify that
the containment check prevents kits with paths outside the project root from
being resolved. Create a test method similar to
test_generate_agents_supports_register_mode_project_root_kit_path but using path
= "../.." in the core.toml configuration, then assert that the result status is
not PASS or that the generated skill file does not exist. Similarly, add a
companion test method similar to
test_list_public_components_supports_register_mode_project_root_kit_path using
path = "../.." and verify that the components list is empty or does not contain
the gears kit, ensuring the containment validation logic is explicitly covered
by regression tests as the guard model evolves.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: b409867d-d012-4166-9879-3fec04fbe268
📒 Files selected for processing (3)
architecture/features/agent-integration.mdskills/studio/scripts/studio/commands/agents.pytests/test_agents_coverage.py
|


Improve agent path resolution to support registered mode project root kits and add corresponding tests to ensure functionality.
Summary by CodeRabbit
New Features
registermode using project-root-relative references, including.., as long as the final resolved path stays within the project root.Documentation
Bug Fixes
..) during kit path interpretation to prevent unintended resolution outside the project root.Tests