Repository navigation
fix(readiness): bind snapshot identity to git revision - #2920
Conversation
|
Warning Review limit reached
Next review available in: 26 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
Summary by CodeRabbit
WalkthroughSnapshot identities now combine input identity with the current repository HEAD. Temporary Git repository helpers and revision-sensitive integration tests verify the new identity behavior. ChangesSnapshot identity generation
Estimated code review effort: 3 (Moderate) | ~15 minutes Possibly related issues
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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.
Code Review
This pull request updates the snapshot_identity format to include the repository head revision and introduces unit tests that set up a temporary Git repository. The review feedback highlights two important improvements: updating the artifact validation logic to strictly verify the new structured snapshot identity, and ensuring that the temporary Git directory is cleaned up if initialization fails during test setup to prevent directory leaks.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9a81f36a01
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
63e5e14 to
0bd4723
Compare
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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 `@crates/ripr/src/agent/artifact.rs`:
- Around line 137-139: The validation in validate_repo_exposure_artifact must
require snapshot_identity to exactly match
repo_exposure_snapshot_identity(&identity.analysis.input_identity,
&identity.repository.head), rather than only checking its prefix. Add a negative
test that changes only snapshot_identity, recomputes the content commitment, and
verifies validation rejects the artifact.
- Around line 421-427: Update temporary_git_root around the create_dir_all,
run_git, and Git configuration calls to execute initialization in a fallible
block; on any initialization failure, attempt remove_dir_all(&root), ignore
cleanup errors, and return the original initialization error while preserving
successful setup behavior.
🪄 Autofix
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 Plus
Run ID: 825867a1-0108-4253-8345-d391500429c5
📒 Files selected for processing (1)
crates/ripr/src/agent/artifact.rs
…pshot identity Companion to the exact snapshot validation (#3001): the bound-fixture writers in cli_smoke.rs and xtask release readiness now emit snapshot:<input>;revision:<head> matching the canonical builder, the incomparable-inputs receipt test tampers both identity components so the pair comparison remains the rejecting stage, and OUTPUT_SCHEMA.md shows the current snapshot identity shape.
29ecc25 to
e2e47d6
Compare
Summary
Closes #3001. Refs #2823.
Current blockers
The PR has three unresolved current review threads:
analysis.input_identity + repository.head, but the canonical validator still accepts any value beginning withsnapshot:input:.temporary_git_rootcan leak the newly created directory when Git initialization/configuration fails before the outer test cleanup exists.The exact identity findings must be repaired by requiring equality with the production builder. The fixture must clean up after every initialization failure while preserving the original error.
This PR remains the one implementation candidate for #3001. Do not merge it until all three findings have reply-backed fixes or evidence-backed rejections and the threads are resolved.
Claim boundary
This is the bounded producer-authenticity prerequisite for #2823. It establishes stable comparable input identity plus exact revision-bound snapshot identity and failure-safe fixture construction. It does not claim the installed before/after/verify/receipt journey, the broader artifact/tamper/replay corpus, candidate membership, or #2769 qualification.
Exact candidate
b139701db53e7aebf4ada141409e1ee73f21677563e5e14977c006f26f2d8d33d3e116089ee2564bcrates/ripr/src/agent/artifact.rsdocs/CI.md,docs/swarm-development.md; inherited from the base-sync merge and not part of the PR diff againstmain.Required repair proof
Snapshot authority
Fixture cleanup
git init/configuration removes the directory;Exact-head execution
Review-control evidence
This PR also supplies live #2341 evidence:
Existing local proof boundary
cargo fmt --all -- --check— passed before the base-sync merge; sync touched docs only;git diff --check— passed before the base-sync merge;Non-goals
Review notes
This PR is the clean current-main replacement for contaminated donor #2914. After this PR merges, #2914 should close unmerged as superseded; #2915's useful positive journey should be rebuilt on current main; and #2916's useful commitment tests should move to #2921.