Repository navigation
Resolve the Audit Hub Name Lazily - #2926
Conversation
Importing spec/audit.py ran a git read before argparse saw --help or an unknown flag, which breaks the rule that a script reads nothing first. The name is now a cached accessor resolved on first use, and the command-line usage gate records git so every entry point is held to it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
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 |
There was a problem hiding this comment.
🟢 Approval recommended
The remaining typing nit is non-blocking.
0 open findings
What changed in this PR
Defers audit hub-name resolution until first use so CLI argument parsing precedes Git access.
Changes:
- Adds cached lazy hub-name resolution.
- Updates audit consumers to use the accessor.
- Extends CLI usage tests to detect premature Git calls.
| File | Summary |
|---|---|
tests/test_cli_usage.py |
Records Git invocations during CLI checks. |
spec/workflow_reuse.py |
Uses the lazy hub-name accessor. |
spec/fidelity_honesty.py |
Uses the lazy accessor for hub comparisons. |
spec/audit.py |
Implements lazy resolution; the public helper should add a str return annotation. |
🧠 Review effort: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #2926 +/- ##
===========================================
- Coverage 60.00% 59.95% -0.05%
===========================================
Files 17 17
Lines 8773 8776 +3
===========================================
- Hits 5264 5262 -2
- Misses 3509 3514 +5
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:
|
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
A recorded local strict-review pass covers head |
…y-Pass Record, and Write-Guard cd Scoping to Main (#2930) - #2926 resolves `spec/audit.py`'s hub name lazily through a cached accessor, so an importing script parses its arguments before any git read, and `tests/test_cli_usage.py` now records `git` so every entry point is held to "before any read" - #2927 keys the workspace-edit rule on whether a window that has the `.code-workspace` loaded hosts a live agent session the editing agent knows of, rather than on where the editing agent runs, aligns the "Editor and Tasks" pointer, and drops the `python-codestyle` profiles bullet that contradicted it - #2929 attests every push a recorded local pass covers, the opening push included, makes the published attestation the evidence Merge Gate item 2's promotion case reads, and stops `pr_review.py` reading an attestation on the head Copilot's first round landed on as that head's coverage - #2928 reads a bare `git push` after a plain leading `cd` (joined by `&&` or `;`) or `-C` in that directory in `gh-write-guard`, denies one after any other `cd` form, and scans `bash -c` / `sh -c` bodies for pushes and bypass flags. The heredoc-text false denial is deliberately left unfixed after ten review rounds each found a bypass in a carve-out, so #2821 stays open for it Closes #2829 Closes #2834 Closes #2835 Closes #2897 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Importing spec/audit.py ran a git read at import, before argparse saw --help or an unknown flag. The hub name is now a cached accessor resolved on first use, every importer uses it, and the command-line usage gate records git so each entry point is held to reading nothing first. The gate was shown to fail with the eager call restored.
Part of #2829
🤖 Generated with Claude Code