Conversation
|
CodeAnt AI is reviewing your PR. Thanks for using CodeAnt! 🎉We're free for open-source projects. if you're enjoying it, help us grow by sharing. Share on X · |
🤖 My Senior Dev — Analysis Complete👤 For @khaliqgant📁 Expert in View your contributor analytics → 📊 2 files reviewed • 3 high risk • 3 need attention 🚨 High Risk:
🚀 Open Interactive Review →The full interface unlocks features not available in GitHub:
💬 Chat here: 📖 View all 12 personas & slash commandsYou can interact with me by mentioning In PR comments or on any line of code:
Slash commands:
AI Personas (mention to get their perspective):
For the best experience, view this PR on myseniordev.com — includes AI chat, file annotations, and interactive reviews. |
Sequence DiagramThis PR fixes update behavior so the installer always receives an explicit target format when one is known. This prevents unintended auto detection and keeps updated packages in the correct tool specific location, with a fallback for older lockfile entries. sequenceDiagram
participant User
participant UpdateCommand
participant Registry
participant Installer
User->>UpdateCommand: Run update
UpdateCommand->>UpdateCommand: Read installed packages and parse package key format
UpdateCommand->>Registry: Check latest version for each package
Registry-->>UpdateCommand: Return latest version
UpdateCommand->>UpdateCommand: Choose target format from package format or key format
alt Update needed
UpdateCommand->>Installer: Install latest version with as target format
else Already latest or skipped major
UpdateCommand->>UpdateCommand: Skip install
end
Generated by CodeAnt AI |
Nitpicks 🔍
|
| await handleInstall(`${packageId}@${latestVersion}`, installOptions); | ||
| // Always pass the installed format to prevent auto-detection | ||
| // Use pkg.format (entry data) with installedFormat (from key suffix) as fallback | ||
| const targetFormat = pkg.format || installedFormat; |
There was a problem hiding this comment.
Suggestion: This passes the internal alias claude-md directly into handleInstall, but the install conversion path supports claude.md (dot) and can throw an unsupported target-format error during updates. Normalize this alias before calling install so CLAUDE.md-installed packages can be updated successfully. [logic error]
Severity Level: Major ⚠️
- ❌ `prpm update` fails for CLAUDE.md-installed rule packages.
- ⚠️ Those packages remain outdated after update runs.| const targetFormat = pkg.format || installedFormat; | |
| const rawFormat = pkg.format || installedFormat; | |
| const targetFormat = rawFormat === "claude-md" ? "claude.md" : rawFormat; |
Steps of Reproduction ✅
1. Run CLI command `prpm install <claude-rule-package>` in a project without `CLAUDE.md`;
`handleInstall()` sets `format = 'claude-md'` at
`packages/cli/src/commands/install.ts:570` (special CLAUDE.md install path).
2. Install writes lockfile entry using installed format via `addToLockfile(... format:
effectiveFormat ...)` at `packages/cli/src/commands/install.ts:1636-1640`, and lock key
generation in `packages/cli/src/core/lockfile.ts:136-145` stores `#claude-md`.
3. Run `prpm update`; command is wired in `packages/cli/src/index.ts:82` and executes
`handleUpdate()` in `packages/cli/src/commands/update.ts:16`, which parses lock key
(`parseLockfileKey`) and sets `targetFormat = pkg.format || installedFormat` at
`update.ts:90`.
4. `handleUpdate()` calls `handleInstall(... { as: 'claude-md' })` at `update.ts:91-93`;
conversion switch in `packages/cli/src/commands/install.ts:762-853` supports `claude.md`
but not `claude-md`, hitting default and throwing `Unsupported target format for
conversion` (`install.ts:852-853`), then update logs failure in `update.ts:96-99`.Prompt for AI Agent 🤖
This is a comment left during a code review.
**Path:** packages/cli/src/commands/update.ts
**Line:** 90:90
**Comment:**
*Logic Error: This passes the internal alias `claude-md` directly into `handleInstall`, but the install conversion path supports `claude.md` (dot) and can throw an unsupported target-format error during updates. Normalize this alias before calling install so CLAUDE.md-installed packages can be updated successfully.
Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.|
CodeAnt AI finished reviewing your PR. |
CodeAnt-AI Description
Keep package updates in the same install format
What Changed
Impact
✅ Packages stay in the expected folder after update✅ Fewer broken updates for converted packages✅ Safer bulk updates with one failure not stopping the rest💡 Usage Guide
Checking Your Pull Request
Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.
Talking to CodeAnt AI
Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:
This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.
Example
Preserve Org Learnings with CodeAnt
You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:
This helps CodeAnt AI learn and adapt to your team's coding style and standards.
Example
Retrigger review
Ask CodeAnt AI to review the PR again, by typing:
Check Your Repository Health
To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.