You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
repo-fleet-hygiene:audit: discovery hard-fails (exit 2) on a non-repository .git marker instead of recording discovery-skip #4207
agent-readyFully specified and briefed; eligible for autonomous pickup from the frontier.status: readyTriaged, unblocked, and fully specified; eligible to pick up.
/repo-fleet-hygiene:audit D: aborts the whole run on the first directory under the root whose .git marker is not a working tree:
Error: not a Git working tree: D://packages/uv/sdists-v9
Exit code 2, no report. D:/packages/uv/sdists-v9/.git is a zero-byte file that uv writes into its cache. git rev-parse --show-toplevel fails with fatal: invalid gitfile format.
The skill and the add_target comment both document the opposite behavior: origin discovery records an UNKNOWNdiscovery-skip finding and the rest of the fleet is still audited ("a husk under --root must not abort every subsequent repository").
Cause
reject_target (skills/audit/scripts/audit-fleet.sh, ~line 1646) returns early only for origin == config. Every other origin, including discovery, reaches exit 2. So record_rejected_target discovery ... in add_target never runs. The unreadable-with-.git branch in discover_repositories (~line 1800) has the same problem.
Fix
Make reject_target return for discovery as well as config. Only cli and default should hard-fail. Add a test: a --root containing an empty .git file next to a real repository should produce a discovery-skip finding and still audit the repository.
Type: Bug Summary: Fix the discovery-origin git working-tree rejection so a non-repository .git marker under a root-scoped scan yields a discovery-skip finding and the fleet audit continues, rather than aborting the whole run.
Current behavior:
When fleet discovery walks a configured root and finds a directory whose .git is a non-working-tree marker (for example, an empty file a package-manager cache writes), the audit hard-fails: it prints an error and exits non-zero, so no report is produced and every other repository under the root goes unaudited. This rejection is meant to apply only to explicitly-configured or command-line targets, not to targets found by walking a root.
Desired behavior:
A .git marker that fails to resolve as a working tree during root-walk discovery must not abort the run. Instead the audit records a discovery-skip finding for that path (kind discovery-skip, confidence UNKNOWN) and continues auditing every other repository found under the root. Rejections for an explicitly-named repository target and the implicit default target continue to hard-fail as before, since those are targets the operator chose directly and give them something actionable.
Key interfaces:
The target-rejection function's origin-based policy: it already returns (rather than exits) for a config origin; it must do the same for a discovery origin. Only an explicitly-named-repository origin and the implicit default origin remain hard-failing.
The root-walk discovery routine's handling of a .git marker that cannot be resolved as a working tree: it must record a discovery-skip finding for that path instead of propagating the rejection as a fatal error.
The discovery-skip finding kind already exists in the finding registry as UNKNOWN, non-actionable, "Path skipped; the rest of the fleet was audited" — this brief exercises that existing kind, not a new one.
Acceptance criteria:
Running the fleet audit over a root containing one directory whose .git is a non-working-tree marker (an empty regular file) alongside one real Git repository exits with the audit's normal successful-run status and produces a full report.
The report contains a discovery-skip finding for the husk path.
The real repository under the same root is still audited and produces its own findings.
Running the audit against an explicitly-named repository target that is itself a non-working-tree .git marker still hard-fails with a non-zero exit, unchanged from current behavior.
Running the audit with no scope arguments against an implicit default target that is a non-working-tree .git marker still hard-fails with a non-zero exit and prints the existing remedy text, unchanged from current behavior.
agent-readyFully specified and briefed; eligible for autonomous pickup from the frontier.status: readyTriaged, unblocked, and fully specified; eligible to pick up.
Activity
kyle-sexton commentedon Sep 23, 2026
This was generated by AI during triage.
Agent Brief
Type: Bug
Summary: Fix the discovery-origin git working-tree rejection so a non-repository
.gitmarker under a root-scoped scan yields a discovery-skip finding and the fleet audit continues, rather than aborting the whole run.Current behavior:
When fleet discovery walks a configured root and finds a directory whose
.gitis a non-working-tree marker (for example, an empty file a package-manager cache writes), the audit hard-fails: it prints an error and exits non-zero, so no report is produced and every other repository under the root goes unaudited. This rejection is meant to apply only to explicitly-configured or command-line targets, not to targets found by walking a root.Desired behavior:
A
.gitmarker that fails to resolve as a working tree during root-walk discovery must not abort the run. Instead the audit records a discovery-skip finding for that path (kinddiscovery-skip, confidenceUNKNOWN) and continues auditing every other repository found under the root. Rejections for an explicitly-named repository target and the implicit default target continue to hard-fail as before, since those are targets the operator chose directly and give them something actionable.Key interfaces:
configorigin; it must do the same for adiscoveryorigin. Only an explicitly-named-repository origin and the implicit default origin remain hard-failing..gitmarker that cannot be resolved as a working tree: it must record adiscovery-skipfinding for that path instead of propagating the rejection as a fatal error.discovery-skipfinding kind already exists in the finding registry asUNKNOWN, non-actionable, "Path skipped; the rest of the fleet was audited" — this brief exercises that existing kind, not a new one.Acceptance criteria:
.gitis a non-working-tree marker (an empty regular file) alongside one real Git repository exits with the audit's normal successful-run status and produces a full report.discovery-skipfinding for the husk path..gitmarker still hard-fails with a non-zero exit, unchanged from current behavior..gitmarker still hard-fails with a non-zero exit and prints the existing remedy text, unchanged from current behavior.Out of scope:
discovery-skipfinding no longer forces a BLOCKED verdict — that decision belongs to issue repo-fleet-hygiene: a drive-root audit needs hand-picked skips; skip known package-cache trees by default and don't BLOCK on a skipped symlink #4220.ls-remote/global git config transport issue — that is issue repo-fleet-hygiene:audit: every ls-remote probe fails because run_git_probe discards global core.sshCommand, so merged-remote-branch never reaches HIGH #4211.fix(repo-fleet-hygiene): print plan paths via cygpath -m on Windows (#…
fix(repo-fleet-hygiene): record discovery-skip for non-repo .git husks (
fix(gaming): drop dead ErrorPath branch; correct 0.8.1 and 0.8.2 chan…
fix(repo-fleet-hygiene): sync stash safety, exit status, decoupling; …
fix(gaming): gate the Feeder pointer on anti-cheat status and make it…