Add project sync --all with machine-local .lnkprojectcache - #27
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
lnk project sync --allto reconcile every stored project scope in one command, backed by a machine-local.lnkprojectcachethat maps stored project IDs to their local checkout paths. Replaces the previous$HOMEwalk inlnk doctorwith cache-driven project discovery.What's new
lnk project sync --all- Reconciles each stored project that has anavailablecache entry, carrying through--dry-run,--prune-deletions, and--force..lnkprojectcache- A gitignored, machine-local JSON cache that records each project's ID, local checkout path, and state (available,missing, ornot-downloaded).project pushandproject syncrecord or refresh the project's cache entry on success.lnk project cache --scan <dir>- Explicitly scans provided directories to populate or repair the cache; repeatable.lnk doctornow uses.lnkprojectcacheto find orphaned storage, broken project symlinks, and missing checkouts instead of walking$HOME.Usage
lnk project sync --alllnk project sync --all --dry-runlnk project cache --scan ~/code~/codeand update the cachelnk project cache --scan ~/.config/project --scan ~/workBehavior changes / guardrails
project cache --scanrequires explicit directories to avoid accidental broad scans of$HOME..gititself.not-downloadedcache entries are treated as intentional and are not reported as orphaned storage..lnkincludepatterns that match no files; global patterns may intentionally not match in some projects.missingcache entry are reported bylnk doctorwith a suggestion to runproject cache --scan.Testing
ProjectSyncAll,ProjectCacheload/save/discover/check, and automatic cache updates on push/sync.make checkruns fmt, vet, lint, unit, and integration suites; all green.