fix(slug): avoid parent repo identity in subdirs#1621
Open
jbetala7 wants to merge 1 commit into
Open
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 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.
Fixes #1125
Summary
gstack-slugis run from a subdirectory that is not the git root.gstack-slugfile in the current directory or an ancestor pin the project slug before cache/git inferenceRoot cause
gstack-slugtrustedgit remote get-url originbefore checking whether the current directory was actually the repository root. In a standalone project nested under a larger git repo, Git walked up to the parent repo, so the child project inherited the parent repo slug. Because cache lookup happened first, a bad slug-cache entry could keep that mistake alive indefinitely.Verification
bun test test/skill-validation.test.ts -t gstack-slugbun test test/review-log.test.ts test/gstack-learnings-search.test.tsbun test test/skill-validation.test.tsme-workspacegit diff --check origin/main...HEADgit merge-tree --write-tree HEAD origin/mainCollision check
Searched open PRs/issues for
1125 gstack-slug outer repo subdirectory,gstack-slug subdirectory outer repo,bin/gstack-slug subdirectory slug-cache,slug-cache, and.gstack-slug.Closest open PR is #564, but that is an older missing-git-context fallback patch. Current
origin/mainalready has basename/unknown fallback behavior; #564 does not address parent-repo inheritance,.gstack-slugoverrides, or stale cache recovery.