curd@1.5.2: Fix persist storage #18039
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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 |
|
/verify |
|
All changes look good. Wait for review from human collaborators. curd
|
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
bucket/curd.json (1)
14-56: Test guidance for the persistence hooks.Before merging, please verify the hooks work correctly:
# Optional: Enable debug mode scoop config debug true # Verify autoupdate .\bin\checkver.ps1 -App curd -f # Format/lint the manifest .\bin\formatjson.ps1 -App curd # Test fresh install (no existing data) scoop install .\bucket\curd.json # Verify junction created (Get-Item "$env:APPDATA\Curd").LinkType # Should be 'Junction' # Verify StoragePath in config Get-Content "$env:APPDATA\Curd\curd.conf" | Select-String 'StoragePath' # Test uninstall preserves data scoop uninstall curd Test-Path "$env:USERPROFILE\scoop\persist\curd\config" # Should be True Test-Path "$env:APPDATA\Curd" # Should be False (junction removed) # Test reinstall picks up persisted data scoop install .\bucket\curd.jsonIf you have legacy data at
C:\.local\share\curd, also verify it migrates correctly on first install.🤖 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 `@bucket/curd.json` around lines 14 - 56, Before merging the changes to the post_install and pre_uninstall hooks in curd.json, you must execute the provided test steps to verify the hooks function correctly. Test the fresh install scenario to confirm the junction is created at $appdata_config, verify the StoragePath configuration is properly patched in the config file, confirm uninstall removes the junction while preserving data in $persist_dir, test reinstall successfully uses the persisted data, and if legacy data exists at C:\.local\share\curd, verify the migration logic correctly moves it to $persist_dir\storage on first install.Source: Coding guidelines
🤖 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 `@bucket/curd.json`:
- Around line 44-48: The migration logic only creates the storage directory when
moving legacy data from the old path. If the legacy path does not exist, the
`$persist_dir\storage` directory is never created, even though it will be
referenced by the config. Add a check after the migration block to ensure the
storage directory exists, creating it if necessary using New-Item or similar
PowerShell command with appropriate flags to handle the case where it may
already exist. This ensures the directory is created on first run regardless of
whether legacy data migration occurs.
---
Nitpick comments:
In `@bucket/curd.json`:
- Around line 14-56: Before merging the changes to the post_install and
pre_uninstall hooks in curd.json, you must execute the provided test steps to
verify the hooks function correctly. Test the fresh install scenario to confirm
the junction is created at $appdata_config, verify the StoragePath configuration
is properly patched in the config file, confirm uninstall removes the junction
while preserving data in $persist_dir, test reinstall successfully uses the
persisted data, and if legacy data exists at C:\.local\share\curd, verify the
migration logic correctly moves it to $persist_dir\storage on first install.
🪄 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: CHILL
Plan: Pro
Run ID: d5db06d3-5ecb-401e-964f-fda1c7bbefc9
📒 Files selected for processing (1)
bucket/curd.json
|
/verify |
|
Your changes did not pass all checks. Please address the issues in the manifest and comment starting with curd
|
|
/verify |
|
All changes look good. Wait for review from human collaborators. curd
|
|
/verify |
|
All changes look good. Wait for review from human collaborators. curd
|
Closes #18038