Add safe streamed prune inspection#7
Conversation
Self-reviewResult: no blocking findings. Reviewed the complete Validation:
Residual limitation is deliberate: this streams Git's loose-object dry-run candidates; packed-object and higher-level reachability reconciliation belong to the consuming diagnostics layer. |
Code LawyerAPI contract
Safety contract
Claim boundary
No contract ambiguity or release-blocking issue found. |
📝 WalkthroughWalkthroughAdds a validated ChangesPrune inspection and command safety
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant Caller
participant GitPlumbing
participant CommandSanitizer
participant GitStream
Caller->>GitPlumbing: inspectPrunableObjects(expiresBefore)
GitPlumbing->>CommandSanitizer: validate prune dry-run command
GitPlumbing->>GitStream: executeStream with normalized expiry
GitStream-->>Caller: stream prunable objects
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@CHANGELOG.md`:
- Around line 8-17: Add a blank line immediately after the “### Added” and “###
Fixed” headings in CHANGELOG.md, before each corresponding list, to satisfy
Markdown heading-spacing requirements.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: e7a7399b-0a9b-431e-96fe-2da4ab7f9027
📒 Files selected for processing (7)
CHANGELOG.mdREADME.mdindex.jssrc/domain/services/CommandSanitizer.jstest/PruneInspection.test.jstest/deno_entry.jstest/domain/services/CommandSanitizer.test.js
📜 Review details
🧰 Additional context used
🪛 markdownlint-cli2 (0.23.0)
CHANGELOG.md
[warning] 10-10: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below
(MD022, blanks-around-headings)
[warning] 14-14: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below
(MD022, blanks-around-headings)
🔇 Additional comments (7)
src/domain/services/CommandSanitizer.js (1)
47-49: LGTM!Also applies to: 108-130, 213-237, 245-248, 278-279, 289-289
index.js (2)
31-51: LGTM!
223-236: 🎯 Functional Correctness
--no-progressis not a validgit pruneflag.git prunesupports--progress; the current command and sanitizer are not missing a real option here.> Likely an incorrect or invalid review comment.test/PruneInspection.test.js (1)
1-52: LGTM!test/domain/services/CommandSanitizer.test.js (1)
24-50: LGTM!Also applies to: 241-241
test/deno_entry.js (1)
9-9: LGTM!README.md (1)
77-93: LGTM!
Self-review updateResult: no blocking findings after The issue-to-code audit found and corrected one pre-merge contract mismatch: #6 requires progress suppression, so the public method now constructs the exact Validation remains clean: lint, Node, Bun, and Deno (210 steps). No residual issue/implementation mismatch found. |
Code Lawyer updateIssue contract: Mutation contract: the only admitted Release contract: the change remains additive and belongs in No contract ambiguity or release-blocking issue remains. |
Summary
GitPlumbing.inspectPrunableObjects()with a canonical UTC cutoffgit prune --dry-run --verbose --no-progress --expire=<cutoff>argvgit pruneonly when a dry-run flag appears before end-of-optionsWhy
git-casrepository diagnostics need Git's own age-aware loose-object classification without exposing a destructive prune path. This is the narrow upstream prerequisite for git-stunts/git-cas#49 and git-stunts/git-cas#55.Verification
npm run lintnpm test(Node, Bun, Deno; Deno 210 steps)4fe6575; all threads resolvedCloses #6