Repository navigation
Refuse History Reads in a Shallow Hub Clone - #2332
Conversation
The audit checks git rev-parse --is-shallow-repository on the hub root and exits 2 with the unshallow command, since history-dependent findings are wrong in a depth-1 clone. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Move the shallow-clone check from main() to the history chokepoint so fidelity_honesty.py and the history-free secrets check behave correctly. The probe is the git-path shallow file rather than a version-dependent flag. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…issue The error names the hub path and the unshallow command without shell quoting, --issue exits 2 instead of rendering a hub-local condition as a downstream issue, and the blob-history read is covered by the selftest. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…cstring Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #2332 +/- ##
==========================================
Coverage ? 57.65%
==========================================
Files ? 16
Lines ? 7908
Branches ? 0
==========================================
Hits ? 4559
Misses ? 3349
Partials ? 0
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Copilot review overview
🔵 Needs a closer look
Public entry-point coverage for shallow-clone refusal behavior remains unresolved.
Review effort: Lite
Findings: None
What changed in this PR
Prevents history-dependent audits from producing unreliable results in shallow hub clones and documents the required recovery behavior.
Changes:
- Guards history reads and adds shallow/full clone self-tests.
- Updates audit documentation and distributed skills.
- Refreshes the skill source digest.
| File | Summary | Review findings |
|---|---|---|
spec/audit.py |
Adds shallow-history guards and tests. | [P2] moderate, 1 vote: add coverage for public refusal paths. |
AUDIT.md |
Documents shallow-clone behavior. | None. |
.github/skills/audit-a-repo/SKILL.md |
Generated skill update. | None. |
.claude-plugin/fleet-skills/skills/audit-a-repo/SKILL.md |
Generated skill update. | None. |
.claude-plugin/fleet-skills/.source-digests/audit-a-repo |
Updates source digest. | None. |
.agents/skills/audit-a-repo/SKILL.md |
Updates audit guidance. | [P2] nit, 1 vote: document the intent advisory as history-dependent. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Fixed in c6768a1: the selftest now drives the real main() on a temp shallow hub clone, covering the sweep path (ERROR line, non-zero exit) and the --issue path (exit 2, error on stderr). The audit-a-repo skill now names the intent staleness advisory as history-dependent alongside the stale-vs-modified classification. |
…er Concurrency, and Review Digest Fixes (#2349) ## Summary Promotes `develop` to `main` with twelve pull requests, each already reviewed and merged into `develop`: - [#2329](#2329) drops the KiCadLibrary merge-bot failure note now that its secrets exist. - [#2330](#2330) retires the stale blog gitattributes entry and corrects the blog's hooks row. - [#2331](#2331) scopes the publisher concurrency group to the ref and settles the D4.7 window. - [#2332](#2332) refuses history reads in a shallow hub clone. - [#2333](#2333) names the fetched commit in `hub-fetch-run.py` and tests its unborn-HEAD and probe paths. - [#2337](#2337) counts only the newest check suite per check in the review digest. - [#2340](#2340) deletes merge-bot heads from the closed event and splits the stub concurrency sentence. - [#2343](#2343) drops the branch ref from the version example and documents the file-target release variant. - [#2344](#2344) measures a wrapped Markdown sentence whole in the sentence-length check. - [#2345](#2345) makes the dispatcher own the strict-review pass for seats that cannot dispatch. - [#2346](#2346) adds a dependency-version `test-matrix` axis to the validate task. - [#2347](#2347) lints composite actions with shellcheck and the schema in the repo gate. Closes #2302 Closes #2325 Closes #2320 Closes #2300 Closes #2312 Closes #2323 Closes #2296 Closes #2294 Closes #2292 Closes #2311 Closes #2327 Closes #1421 Closes #2321 Closes #2334 Closes #2335 Closes #2318 Closes #2293 Closes #2297 Closes #2301 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Summary
History-dependent reads in
spec/audit.pynow refuse on a shallow hub clone instead of giving confident wrong findings.The guard sits at the history chokepoint (
_git_revisionsandgit_blob_in_file_history), sospec/fidelity_honesty.pyfails before writing a report, a sweep reports one ERROR per repo, and--issueexits 2 with the error on stderr.The error says: Run
git fetch --unshallow originin that checkout.AUDIT.md sections 6 and 8 and the
audit-a-reposkill state the behavior, and the selftest covers both guarded reads on constructed shallow and full clones.scripts/canonical_review.py'sgit logbacklog ordering is left unguarded by design, since it only affects ordering and its sweep workflow uses fetch-depth 0.Addresses #2311
🤖 Generated with Claude Code