Skip to content

fix(readiness): bind snapshot identity to git revision - #2920

Merged
EffortlessSteven merged 3 commits into
mainfrom
codex/issue2823-producer-identity-clean
Aug 7, 2026
Merged

EffortlessSteven merged 3 commits into
mainfrom
codex/issue2823-producer-identity-clean

Conversation

@EffortlessSteven

@EffortlessSteven EffortlessSteven commented Aug 5, 2026 •

Copy link
Copy Markdown
Member

Summary

  • bind producer repo-exposure snapshot identity to the validated current Git revision;
  • keep comparable analysis input identity stable across an empty revision-only commit;
  • add a controlled before/after producer regression that checks the production snapshot identity builder;
  • make the Git fixture independent of host signing configuration and clean it on failure.

Closes #3001. Refs #2823.

Current blockers

The PR has three unresolved current review threads:

  1. Gemini high — the producer derives structured snapshot identity from analysis.input_identity + repository.head, but the canonical validator still accepts any value beginning with snapshot:input:.
  2. Codex P1 — independently identifies the same shared-validator defect and its propagation into verify/receipt provenance.
  3. Gemini medium — temporary_git_root can 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

  • base: b139701db53e7aebf4ada141409e1ee73f216775
  • current head: 63e5e14977c006f26f2d8d33d3e116089ee2564b
  • production/test surface: crates/ripr/src/agent/artifact.rs
  • main-sync files in branch history: docs/CI.md, docs/swarm-development.md; inherited from the base-sync merge and not part of the PR diff against main.

Required repair proof

Snapshot authority

  • exact builder output validates;
  • same input/same revision is stable;
  • revision-only movement preserves input identity and changes snapshot identity;
  • wrong input, wrong revision, stale replay, and arbitrary prefix-compatible snapshot text fail;
  • replacing exact equality with the old prefix check makes a focused mutation/removal oracle fail.

Fixture cleanup

  • failure after directory creation but during git init/configuration removes the directory;
  • cleanup preserves the original initialization error;
  • assertion/test-body failure also leaves no fixture residue;
  • cleanup absence is observed rather than inferred from an ignored removal result.

Exact-head execution

  • format and diff hygiene;
  • affected strict Clippy and focused tests;
  • relevant policy/schema/output checks;
  • terminal current hosted required/advisory jobs;
  • reply-backed resolution of each substantive thread.

Review-control evidence

This PR also supplies live #2341 evidence:

substantive automated findings unresolved
+ quota-limited provider output is not review
+ CI/mergeability do not adjudicate the defects
→ fix
→ reply with commit/proof
→ resolve

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;
  • prior focused local Cargo attempts were unavailable under Windows linker/Cargo contention and are not represented as green;
  • previous hosted results belong only to the exact head that produced them and must be refreshed after the repair.

Non-goals

  • no installed producer chain;
  • no complete currentness/commitment/tamper corpus;
  • no analyzer, LSP, package, release, version, publication, signing, marketplace, or credential operation.

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.

@coderabbitai

coderabbitai Bot commented Aug 5, 2026 •

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@EffortlessSteven, you've reached your PR review limit, so we couldn't start this review.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 01d8620a-4059-42a7-9855-82198a816a2e

📥 Commits

Reviewing files that changed from the base of the PR and between 0bd4723 and e2e47d6.

📒 Files selected for processing (4)
  • crates/ripr/src/agent/artifact.rs
  • crates/ripr/tests/cli_smoke.rs
  • docs/OUTPUT_SCHEMA.md
  • xtask/src/reports/release.rs

Summary by CodeRabbit

  • Bug Fixes
    • Snapshot identities now reflect both the input identity and the repository’s current revision.
    • Controlled repository revisions produce distinct snapshots while preserving the input identity.

Walkthrough

Snapshot identities now combine input identity with the current repository HEAD. Temporary Git repository helpers and revision-sensitive integration tests verify the new identity behavior.

Changes

Snapshot identity generation

Layer / File(s) Summary
Build repository-bound identities
crates/ripr/src/agent/artifact.rs
Artifact metadata now builds snapshot_identity from input identity and the current repository revision through a dedicated helper.
Validate revision-sensitive identities
crates/ripr/src/agent/artifact.rs
Test helpers create temporary Git repositories. Tests verify stable input identities and distinct snapshot identities across controlled revisions.

Estimated code review effort: 3 (Moderate) | ~15 minutes

Possibly related issues

Possibly related PRs

Poem

A rabbit checks each commit with care,
And binds the snapshot to HEAD there.
The input stays steady, the revisions part,
Two Git turns yield identities apart.
Tests hop through branches, light and bright.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description is detailed and relevant but omits most required template sections, including scope, proof, rollback, traceability, engineering checks, and gates. Rewrite the description using the template and complete or mark n/a all required sections, including scope, proof, rollback, traceability, engineering checks, and gates.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: binding snapshot identity to the Git revision.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/issue2823-producer-identity-clean

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread crates/ripr/src/agent/artifact.rs Resolved
Comment thread crates/ripr/src/agent/artifact.rs Resolved

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread crates/ripr/src/agent/artifact.rs Resolved
@codecov

codecov Bot commented Aug 5, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 85.51402% with 31 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
crates/ripr/src/agent/artifact.rs 85.91% 30 Missing ⚠️
xtask/src/reports/release.rs 0.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between abf7509 and 0bd4723.

📒 Files selected for processing (1)
  • crates/ripr/src/agent/artifact.rs

Comment thread crates/ripr/src/agent/artifact.rs Resolved
Comment thread crates/ripr/src/agent/artifact.rs Resolved
EffortlessSteven and others added 3 commits August 7, 2026 06:57
…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.
@EffortlessSteven
EffortlessSteven force-pushed the codex/issue2823-producer-identity-clean branch from 29ecc25 to e2e47d6 Compare August 7, 2026 10:57
@EffortlessSteven
EffortlessSteven merged commit ddb343e into main Aug 7, 2026
30 of 31 checks passed
@EffortlessSteven
EffortlessSteven deleted the codex/issue2823-producer-identity-clean branch August 7, 2026 11:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-check Run package, publish dry-run, VSIX, server archive, and release-readiness proof. status/partial

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(readiness): require exact repo-exposure snapshot identity binding

1 participant