Skip to content

curd@1.5.2: Fix persist storage #18039

Open
vgsrivathsan wants to merge 4 commits into
ScoopInstaller:masterfrom
vgsrivathsan:curd
Open

curd@1.5.2: Fix persist storage #18039
vgsrivathsan wants to merge 4 commits into
ScoopInstaller:masterfrom
vgsrivathsan:curd

Conversation

@vgsrivathsan

Copy link
Copy Markdown

Closes #18038

@coderabbitai

coderabbitai Bot commented Jun 14, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 6d3fe9b9-a081-4e6b-b253-d339b31cc622

📥 Commits

Reviewing files that changed from the base of the PR and between 5babba1 and 7e6e3aa.

📒 Files selected for processing (1)
  • bucket/curd.json
🚧 Files skipped from review as they are similar to previous changes (1)
  • bucket/curd.json

📝 Walkthrough

Walkthrough

The bucket/curd.json manifest gains two new PowerShell hook arrays. The post_install hook creates a Windows directory junction from %APPDATA%\Curd to the Scoop-persisted config directory, creates curd.conf if absent, and rewrites or appends the StoragePath entry to target the persisted storage directory. It also detects a legacy storage path at C:\.local\share\curd and moves its contents into the persisted storage location when the new path does not yet exist. The pre_uninstall hook removes the %APPDATA%\Curd junction without deleting persisted data. All other manifest fields remain unchanged.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • ScoopInstaller/Extras#17664: Both PRs add install/uninstall lifecycle script hooks in bucket/*.json to manage persisted user data directories/config/logs (config migration/junction handling in curd.json vs persistence overwrite in librehardwaremonitor.json).
  • ScoopInstaller/Extras#16910: Both PRs modify bucket/curd.json, with the retrieved PR adding the curd manifest (v1.1.7) and the main PR extending that same manifest with new post_install/pre_uninstall hook scripts.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive The description provides the linked issue number (#18038) but lacks detail about implementation and omits the conventional PR title format checkbox requirements. Add comprehensive description of changes, confirm the conventional PR title checkbox, and include details about the post_install/pre_uninstall script implementation.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title is specific and directly related to the main change, describing a fix for persist storage in curd version 1.5.2.
Linked Issues check ✅ Passed The code changes implement proper storage persistence by adding post_install and pre_uninstall hooks that configure StoragePath to persist, directly addressing the reported issue.
Out of Scope Changes check ✅ Passed All changes in bucket/curd.json are scoped to resolving the storage persistence issue; no unrelated modifications were introduced.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ 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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@vgsrivathsan

Copy link
Copy Markdown
Author

/verify

@github-actions

Copy link
Copy Markdown
Contributor

All changes look good.

Wait for review from human collaborators.

curd

  • Lint
  • Description
  • License
  • Hashes
  • Checkver
  • Autoupdate

Check the full log for details.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.json

If 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

📥 Commits

Reviewing files that changed from the base of the PR and between b23007a and 2da0420.

📒 Files selected for processing (1)
  • bucket/curd.json

Comment thread bucket/curd.json Outdated
@vgsrivathsan

Copy link
Copy Markdown
Author

/verify

@github-actions

Copy link
Copy Markdown
Contributor

Your changes did not pass all checks.

Please address the issues in the manifest and comment starting with /verify to rerun the checks.

curd

  • Lint
  • Description
  • License
  • Hashes
  • Checkver
  • Autoupdate

Check the full log for details.

@vgsrivathsan

Copy link
Copy Markdown
Author

/verify

@github-actions

Copy link
Copy Markdown
Contributor

All changes look good.

Wait for review from human collaborators.

curd

  • Lint
  • Description
  • License
  • Hashes
  • Checkver
  • Autoupdate

Check the full log for details.

@vgsrivathsan

Copy link
Copy Markdown
Author

/verify

@github-actions

Copy link
Copy Markdown
Contributor

All changes look good.

Wait for review from human collaborators.

curd

  • Lint
  • Description
  • License
  • Hashes
  • Checkver
  • Autoupdate

Check the full log for details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: curd: user files don't persist

1 participant