feat: origin-qualified anchors for cross-repo specs#11
Open
laulauland wants to merge 1 commit intolau/content-sigfrom
Open
feat: origin-qualified anchors for cross-repo specs#11laulauland wants to merge 1 commit intolau/content-sigfrom
laulauland wants to merge 1 commit intolau/content-sigfrom
Conversation
87eeb84 to
726814c
Compare
726814c to
fc4ae35
Compare
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 free
to 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
When a spec from repo A is installed into repo B (e.g. via skill installation), its drift anchors reference repo A's files. Running
drift checkin repo B reports false "STALE (file not found)" errors.This adds an
originfield to drift frontmatter:When
originis present and doesn't match the current repo's git remote,drift checkskips those anchors withSKIP (foreign origin: ...)instead of reporting them as stale. Foreign-origin specs don't cause exit 1.Stacked on #12.
Changes
origin:from YAML frontmatter and HTML comment blocks. NewDriftSpecreturn type withanchors+originoriginfield toSpecstructgetRepoIdentity()+normalizeGitHubUrl()for matching git remotes togithub:owner/repoformatorigin: github:fiberplane/driftDesign decisions
github:owner/repoqualifier scopes identity matching to github.com remotesoriginwhen null (backwards-compatible)Full spec:
docs/ORIGIN.mdCloses #8
Test plan
drift checkwith foreign-origin specs shows SKIP, exits 0drift checkin the origin repo checks anchors normallydrift statusdisplays origin field