Skip to content

fix: skip hidden directories in discovery; read-only remote observation for quarantine - #175

Merged
rldyourmnd merged 4 commits into
mainfrom
fix/discovery-hidden-dirs
Sep 19, 2026
Merged

rldyourmnd merged 4 commits into
mainfrom
fix/discovery-hidden-dirs

Conversation

@rldyourmnd

Copy link
Copy Markdown
Contributor

Summary

Two defects found by an estate workspace audit:

  • Discovery scanned hidden directories. excludedDirectory carried a
    fixed name list, so tool-state and fixture trees such as .tmp/ were
    walked to depth 8 and manufactured hundreds of anchor-required and
    path-unreadable findings for synthetic repositories. Now every
    dot-prefixed directory except .git is skipped; .git stays the
    discoverable 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.
    observeCheckoutForQuarantine validated the push URL, so SSH/HTTPS
    remotes were rejected with ErrNetworkMutationDisabled even though
    the operation only runs ls-remote — a read. The observation now
    validates the fetch URL (validatedRemoteURL, credential-free
    https/ssh/file) and observeRemoteRef permits those transports;
    validatedPushURL still 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 ./... — green
  • scripts/validate_shell.sh, validate_go_core.sh --quick — PASS
  • python3 -m pytest — 81 passed
  • go build -trimpath ./core/cmd/gds — clean

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.
@rldyourmnd
rldyourmnd merged commit 69b677d into main Sep 19, 2026
10 of 11 checks passed
@rldyourmnd
rldyourmnd deleted the fix/discovery-hidden-dirs branch September 19, 2026 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant