fix: skip hidden directories in discovery; read-only remote observation for quarantine - #175
Merged
Merged
Conversation
Dot-prefixed directories are tool state, caches, and generated fixtures rather than portfolio checkouts, so scanning them manufactured hundreds of anchor findings for synthetic trees. Keep .git as the discoverable boundary while skipping every other dot-directory.
Checkout quarantine only needs ls-remote to prove the head is published, so gating it on the push URL blocked SSH and HTTPS remotes entirely. Validate the fetch URL for observation instead and permit the credential -free https/ssh transports for the read while push stays gated.
2 tasks
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
Two defects found by an estate workspace audit:
Discovery scanned hidden directories.
excludedDirectorycarried afixed name list, so tool-state and fixture trees such as
.tmp/werewalked to depth 8 and manufactured hundreds of
anchor-requiredandpath-unreadablefindings for synthetic repositories. Now everydot-prefixed directory except
.gitis skipped;.gitstays thediscoverable boundary. Regression test proves a repository under
.tmp/is not discovered while a plain one is.Checkout quarantine required a push-capable remote to plan.
observeCheckoutForQuarantinevalidated the push URL, so SSH/HTTPSremotes were rejected with
ErrNetworkMutationDisabledeven thoughthe operation only runs
ls-remote— a read. The observation nowvalidates the fetch URL (
validatedRemoteURL, credential-freehttps/ssh/file) and
observeRemoteRefpermits those transports;validatedPushURLstill gates every mutation path unchanged.Test plan
go test ./core/discovery ./core/providers/git— new tests +existing clean/dirty/worktree/identity cases green
go test ./...— greenscripts/validate_shell.sh,validate_go_core.sh --quick— PASSpython3 -m pytest— 81 passedgo build -trimpath ./core/cmd/gds— clean