Add implicit project-scope detection and doctor health checks - #25
Merged
Conversation
Uh oh!
There was an error while loading. Please reload this page.
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 implicit project-scope integration for
lnk update,lnk restore, andlnk doctor. When a command runs inside a git repo that contains a.lnkincludefile, the project scope is detected automatically and restored alongside the common and host scopes.lnk doctornow audits project storage, symlinks, and patterns.What's new
DetectProjectScoperesolves the project root, ID, and storage resolver from the current working directory when a.lnkincludefile is present.RestoreWithProjectandUpdateWithProjectrestore common, host, and detected project scope, logging(project scope: <id>)to stderr.--no-projectopt-out - global flag skips automatic project-scope detection for bothupdateandrestore.lnk doctorreports orphaned project storage, broken project symlinks, and.lnkincludepatterns that match no files.Usage
lnk updatelnk restorelnk update --no-project/lnk restore --no-projectlnk doctorBehavior changes / guardrails
.lnkincludefile.--no-projectis a persistent global flag, so it is available on any subcommand.$HOMElooking for.lnkincludefiles and compares live project IDs against stored project IDs.Testing
DetectProjectScope,RestoreWithProject, andUpdateWithProject.lnk doctor.make checkruns fmt, vet, lint, unit, and integration suites; all green.