Description
darnit audit <path> auto-detects owner/repo preferring the upstream remote, and never prints which owner/repo it resolved. On a fork checkout (both origin and upstream present), the live checks target upstream — potentially a different repo than the one the user is working in — with no indication in the output.
Steps to Reproduce
- Clone a fork so the checkout has both
origin (your fork) and upstream remotes.
- Run
darnit audit <path> with authenticated gh.
- Inspect which
owner/repo the live gh api checks target.
Expected Behavior
The audit output states the resolved owner/repo and which remote it came from, so it's obvious which repository was audited.
Actual Behavior
The checks target upstream silently; the CLI logs only Auditing {path} with {N} controls. Details:
packages/darnit/src/darnit/core/utils.py:186, :302 — prefer_upstream: bool = True.
utils.py:231 — remotes = ["upstream", "origin"] if prefer_upstream else ["origin", "upstream"].
cmd_audit calls detect_owner_repo(str(repo_path)) with no override and prints no repo identity.
The information already exists internally: detect_repo_from_git returns a source field (utils.py:263, 275), but the detect_owner_repo wrapper (:299) collapses it to (owner, repo) and the CLI discards it.
Environment
- darnit version:
main @ 86f9cfa
- Python version: 3.12 (uv-managed)
- OS: any
Additional Context
Suggested fix (visibility only): print the resolved owner/repo + source remote at the top of audit output. A new --owner/--repo flag is likely unnecessary — the origin-preference path (prefer_upstream=False) already resolves origin correctly.
Description
darnit audit <path>auto-detectsowner/repopreferring theupstreamremote, and never prints whichowner/repoit resolved. On a fork checkout (bothoriginandupstreampresent), the live checks targetupstream— potentially a different repo than the one the user is working in — with no indication in the output.Steps to Reproduce
origin(your fork) andupstreamremotes.darnit audit <path>with authenticatedgh.owner/repothe livegh apichecks target.Expected Behavior
The audit output states the resolved
owner/repoand which remote it came from, so it's obvious which repository was audited.Actual Behavior
The checks target
upstreamsilently; the CLI logs onlyAuditing {path} with {N} controls. Details:packages/darnit/src/darnit/core/utils.py:186, :302—prefer_upstream: bool = True.utils.py:231—remotes = ["upstream", "origin"] if prefer_upstream else ["origin", "upstream"].cmd_auditcallsdetect_owner_repo(str(repo_path))with no override and prints no repo identity.The information already exists internally:
detect_repo_from_gitreturns asourcefield (utils.py:263, 275), but thedetect_owner_repowrapper (:299) collapses it to(owner, repo)and the CLI discards it.Environment
main@86f9cfaAdditional Context
Suggested fix (visibility only): print the resolved
owner/repo+sourceremote at the top of audit output. A new--owner/--repoflag is likely unnecessary — the origin-preference path (prefer_upstream=False) already resolves origin correctly.