Repository navigation
docs(release): codify repeatable live-history release transaction - #3105
Conversation
|
Warning Review limit reached
Next review available in: 14 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 (1)
Summary by CodeRabbit
WalkthroughThe PR adds a canonical live-history release transaction runbook for version 0.11.0 and future two-repository releases. It links the runbook from related documentation and updates release selection records to use protected candidate-tag transaction boundaries. ChangesLive-history release transaction
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related issues
Possibly related PRs
Suggested labels: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 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 introduces a comprehensive "Live-history release transaction runbook" (RELEASE_TRANSACTION.md) and updates existing documentation files (DOCUMENTATION.md, RELEASE.md, and swarm-development.md) to reference it. The runbook details the canonical operator sequence for releases using the two-repository history model. The review feedback highlights a couple of minor issues where environment variables ($RELEASE_NOTES and $POLICY_BEFORE) are used in bash commands without being previously defined or initialized in the document.
There was a problem hiding this comment.
Actionable comments posted: 10
🤖 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 `@docs/RELEASE_TRANSACTION.md`:
- Around line 359-365: Update the cleanup commands after constructing K so each
checkout switches from its transaction branch to a clean detached HEAD or
another branch before deleting branches. Ensure SWARM_ROOT leaves
back-sync/${VERSION} and SOURCE_ROOT leaves release/${VERSION} (and any related
transaction branch), while preserving the existing worktree removal and branch
deletion behavior.
- Around line 293-299: Update the frozen-input block to load the recorded
transaction values for SWARM_BEFORE and SOURCE_RELEASE_HEAD instead of
overwriting them from floating origin/main heads. Validate that each current
remote head exactly matches its recorded value, and fail closed before
proceeding when either repository has moved.
- Around line 61-69: Update the repository identity checks in the release
transaction procedure before assigning SOURCE_PARENT and SWARM_PARENT. Replace
the display-only git remote get-url origin commands with exact assertions that
SWARM_ROOT resolves to the intended ripr-swarm repository and SOURCE_ROOT
resolves to the intended ripr repository, failing the transaction on mismatch;
apply the same change to the corresponding second check.
- Around line 168-174: Update the J promotion block to fetch SWARM_REF into
SOURCE_ROOT and verify the expected immutable commit before running the merge
that constructs J; apply the corresponding change to the K block by fetching
SOURCE_RELEASE_HEAD into SWARM_ROOT and verifying it before its merge. Keep the
existing promotion and commit flow unchanged after each receiving checkout has
explicitly obtained the cross-repository commit.
- Line 184: In the runbook flow before the tree validation and release creation
commands, add a single packet-loading step that assigns JOIN_TREE and
RELEASE_NOTES, then validate both values are non-empty before use. Preserve the
existing git tree comparison and gh release create behavior, including the
corresponding later occurrence.
- Around line 244-249: Update the release authorization procedure around the
issue `#1470` verification commands to parse and validate VERSION,
SOURCE_RELEASE_HEAD, authorized channels, and publication order before any
[EXTERNAL-PUBLISHING] operation. Make these checks fail closed: missing,
invalid, unauthorized, or misordered fields must terminate the procedure before
publishing, while valid authorization proceeds using the existing release
metadata.
- Around line 251-258: Separate the external publication flow in the runbook
into distinct stages for the tag push, cargo publish, and GitHub release
commands. After each command, require an explicit successful receipt or
verification before proceeding to the next channel, while preserving the
existing `#1470` authorization and command targets.
- Around line 315-329: The release transaction runbook around POLICY_BEFORE and
the K transport must capture explicit temporary-policy and post-restoration
snapshots, require recorded owner approval before changing policy, and restore
the normal policy before cleanup or development resumes. Add executable
policy-state checks and ordering that fail if restoration or after-state
evidence is missing, while preserving the existing read-only guard and
prohibitions on force-push, squash, rebase, and unrelated merges.
- Around line 259-269: Update the release workflow commands in the documented
release procedure to dispatch both workflows with --ref
"${SOURCE_RELEASE_HEAD}". Replace the broad gh run list lookup with run
identification filtered to each exact workflow and headSha matching
SOURCE_RELEASE_HEAD, so the recorded receipts reference only runs for the
release commit.
- Around line 92-104: Update the release transaction procedure around SWARM_REF
so it verifies an enforceable immutability guarantee for the published remote
ref, rather than only printing it with ls-remote. Either configure and validate
GitHub/Git remote protection against force-updates and deletion, or replace the
publication flow with an operation that provides equivalent immutable-pin
enforcement, and make the procedure fail when that guarantee is absent.
🪄 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: d85dfd13-1f33-4a9d-a02d-e2cf82093231
📒 Files selected for processing (4)
docs/DOCUMENTATION.mddocs/RELEASE.mddocs/RELEASE_TRANSACTION.mddocs/swarm-development.md
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
EffortlessSteven
left a comment
There was a problem hiding this comment.
REVIEW_READY
Reviewed exact head ad3fa00997a1066745ac9d7d89256b9e2ae0f2e4 against issue #3104 and the full live-history release objective. The repaired runbook is semantically reviewable and fail-closed for the selected claim:
- exact source/swarm roots, identity assertions, frozen parents, packet-bound selection template, and invalidation rules;
- protected candidate-tag/ruleset prerequisite that stops before W when the required active ruleset is absent;
- ordered J/K parents with explicit cross-repository object transport and expected-head guards;
- #1470 field/channel/order validation and sequential publication receipts;
- paginated exact-head workflow receipts;
- owner-approved policy exception, before/exception/after snapshots, restoration, and cleanup from detached checkouts;
- explicit authority boundary, preservation of all swarm history, and no floating candidate claim.
Current hosted proof is terminal and green: Ripr Rust Small Result, GitHub-hosted Rust, coverage, JUnit, UB review, source-of-truth, cargo-deny, dependency review, routing, docs-only detection, security, plan, Graphite, and codecov/patch pass. The current live repository still lacks the required candidate-tag ruleset; the runbook correctly treats that as an expected transaction stop, not as permission to publish an unprotected pin.
The remaining automated CodeRabbit material is rate-limited/older-head commentary, not a current-head semantic finding. cargo xtask check-pr is documented as not established after Windows Cargo contention, but the changed surface is docs/spec/template-only and all applicable required hosted gates pass. No unresolved thread is being resolved by this review.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ad3fa00997
ℹ️ 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".
There was a problem hiding this comment.
Reporter summary
Docs-only PR that codifies a fail-closed live-history release transaction runbook. Prior reviewer concerns (undefined variables, missing repo identity assertions, missing cross-repo fetch guards, cleanup-on-current-branch risk, overwriting frozen inputs from floating origin/main, missing packet loading for JOIN_TREE/RELEASE_NOTES) appear addressed in the current head per EffortlessSteven's reconciliation comments. The JSON template correctly remains null until W and the runbook explicitly stops before W if the release-transaction-pins tag ruleset is absent. No new blockers introduced; artifact-verifier failure and cargo-test late receipt do not contradict the docs claim scope. Main residual risk is operator-side: variables like POLICY_OWNER_LOGIN and POLICY_APPROVAL are externally supplied, so a missing or stale owner receipt would silently allow the policy exception branch to proceed without real approval.
|
Fresh exact-head review of swarm PR #3105 is REPAIR_REQUIRED, not REVIEW_READY. Exact current head: 8e5c21f (base 4589b85), against issue #3104. Full six-commit docs diff and live review threads/checks inspected; no repository mutation. Blocking P1 findings still valid:
Six other current Codex P1s appear materially repaired in the text: qualification Cargo commands are cd-scoped; promotion branch is guarded-pushed and PR-created; dispatch uses verified Terminal proof blocker: current Additional audit note: current unresolved threads are exactly the eight above; old resolved findings were not treated as current authority. The docs-only claim does not excuse executable command/topology/protection defects because issue #3104 explicitly requires copy-safe runnable transaction semantics and exact history. |
|
Correction: J is NOT a blocker under the controlling user contract. The runbook intentionally uses K remains the semantic concern, but narrowly: the temporary branch-protection request preserves Hosted pending remains proof incompleteness only, not a semantic defect: exact head still has coverage, hosted routed Rust, JUnit, UB review, CodeRabbit in progress and mergeState BLOCKED. |
|
Fresh review at exact head c653638: J clarification is satisfied (merge-result expected; ancestry proof is appropriate). K repair now materially addresses prior blocker: enumerates active branch-target rulesets via paginated API, captures each before snapshot, requires per-ruleset owner exception request/response, clears branch required_pull_request_reviews while preserving status/force/deletion controls, asserts temporary branch state, performs expected-head guard immediately before exact K push, restores every ruleset and branch protection, compares before/after ruleset shapes, and verifies origin/main == K after transport. I find no remaining semantic K blocker from the requested protection-layer audit. Disposition remains REPAIR_REQUIRED / not REVIEW_READY solely because exact-head hosted proof is non-terminal: rust-coverage, rust-tests-junit, ub-review, and CodeRabbit are pending; mergeStateStatus is BLOCKED. Green docs/source-of-truth/security/planning checks do not establish terminal proof. No mutation performed. |
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 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 `@docs/RELEASE_TRANSACTION.md`:
- Around line 576-595: The approval validation around the jq check for
POLICY_APPROVAL must reject expired approvals: parse expires_at as RFC 3339 and
require it to be later than the current UTC time before proceeding to the policy
mutation. Preserve the existing approval-field and protected-layer validations
while adding this expiry check before the exception request is applied.
- Around line 47-82: Enable fail-closed Bash execution before any transaction
setup or authorization gate by declaring the runbook’s shell as Bash and
applying set -euo pipefail. Update the runbook’s shell statement accordingly,
preserving the existing Bash-specific tab parsing in wait_for_run_success and
ensuring failed test, grep, or jq -e gates halt execution before publishing
commands.
- Around line 157-161: Update docs/RELEASE_TRANSACTION.md lines 157-161 so the
producer copies and instantiates live-head-selection-template.json after W,
binding every required field including the protected tag, local verifier ref,
MERGE_BASE, ruleset receipt, and pin digest, then fail-closed validates the
complete schema. Keep docs/release-candidates/0.11.0-live-head-selection.json
lines 36-42 aligned with the validated output shape, and update
docs/release-candidates/0.11.0-live-head-selection.md lines 15-19 to describe
the complete producer update and validation.
- Around line 455-461: Require unique workflow-run identification before
recording receipts: at docs/RELEASE_TRANSACTION.md lines 455-461, record
matching run IDs before the server dispatch, then select newly created runs by
SHA and dispatch timestamp and fail unless exactly one exists before
wait_for_run_success and receipt creation; apply the same change to the VS
Marketplace dispatch at lines 471-477 and Open VSX dispatch at lines 487-493.
🪄 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: 822533cd-e9df-4a43-8093-4a6a08f67fa5
📒 Files selected for processing (3)
docs/RELEASE_TRANSACTION.mddocs/release-candidates/0.11.0-live-head-selection.jsondocs/release-candidates/0.11.0-live-head-selection.md
|
Final exact-head audit: do NOT post REVIEW_READY. Head remains c653638 and all required hosted jobs are green; CodeRabbit is rate-limited/pass. However two unresolved actionable review findings remain and are still present in the exact head:
J and K semantics are otherwise acceptable after latest repairs. Disposition: REPAIR_REQUIRED for these two current-thread semantic blockers, despite terminal green hosted checks. No mutation performed. |
|
Fresh review at exact head d4164e8: both prior blockers are repaired. Disposition is REPAIR_REQUIRED / no REVIEW_READY yet because exact-head hosted proof is not terminal: source-of-truth, cargo-deny, GitHub Hosted, coverage, JUnit, and UB review are pending; mergeStateStatus BLOCKED. Current CodeRabbit is rate-limited/pass. No mutation performed. |
|
Final current-head audit of PR #3105 at d4164e8: hosted checks are terminal green (including hosted Rust, coverage, JUnit, UB, source-of-truth, CodeRabbit rate-limited/pass), but REVIEW_READY is not supportable because two unresolved semantic threads remain valid in the exact head.
J/K, workflow receipt uniqueness, policy expiry, protection layers, and all other current P1 repairs are otherwise acceptable. Disposition: REPAIR_REQUIRED. No thread resolution or merge performed. |
|
Fresh exact-head review at 697159b: REPAIR_REQUIRED. Guard invocation count is now 9 and covers the requested qualification, preflight, J/source candidate, publication, and K boundaries; policy restoration now reconstructs and compares full nested branch state; expiry enforces Z-only canonical shape, round-trip, and future UTC time. Remaining semantic blocker: ruleset exception validation only proves all non- Hosted proof is also non-terminal: CodeRabbit, coverage, JUnit, source-of-truth, UB review remain pending; mergeStateStatus BLOCKED. No REVIEW_READY/no mutation. |
|
Fresh exact-head review at 15265f2: the ruleset repair is now semantically adequate. Exception requests preserve all non-rules fields and preserve every rule except the explicitly allowlisted Disposition remains REPAIR_REQUIRED only because hosted proof is not terminal: coverage, JUnit, source-of-truth, UB review remain pending; mergeStateStatus BLOCKED. CodeRabbit is rate-limited/pass. No mutation performed. |
|
REVIEW_READY Final exact-head substantive review of PR #3105 at Rechecked the full current diff and all current thread findings. The final repairs are present: exact release-prep commit transport/checkout and head binding; full nested branch-policy restoration; identifying crates.io User-Agent; bounded dispatch-run visibility polling; live W pin/ruleset/digest guards at the required boundaries; hosted qualification run id/status/conclusion success binding; canonical UTC RFC3339 expiry validation; and a minimal ruleset exception that removes only explicitly allowlisted K-blocking rule types while preserving all other rules, with exact restoration/shape comparison. Remaining unresolved thread records are historical status; their findings are addressed at this exact head. Review claim is limited to runbook semantics/proof and does not claim release execution or publication. |
|
Final thread reconciliation at exact reviewed head |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 15265f27ba
ℹ️ 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".
| git -C "$SOURCE_ROOT" fetch "$SWARM_ORIGIN" "$SWARM_PARENT" | ||
| test "$(git -C "$SOURCE_ROOT" rev-parse "$SWARM_PARENT^{commit}")" = "$SWARM_PARENT" | ||
| git -C "$SOURCE_ROOT" switch -c "promote/${VERSION}-swarm" "$SOURCE_PARENT" | ||
| git -C "$SOURCE_ROOT" merge --no-ff --no-commit "$SWARM_PARENT" |
There was a problem hiding this comment.
Allow reviewed conflict resolution before exiting
Failure mode: when either the J merge has a conflict, this command returns status 1 and the required set -e shell exits before the documented resolution or commit steps; the identical problem occurs while constructing K at line 669. Fix direction: invoke each merge through an explicit conditional that accepts the expected conflict state, verifies that only manifest-approved paths are unmerged, and rejects other failures before continuing resolution. Validation: run both blocks against a synthetic conflicting source/swarm pair and confirm the resolution and parent/tree checks are reached. Confidence: High.
Useful? React with 👍 / 👎.
| set -euo pipefail | ||
| # [EXTERNAL-PUBLISHING] repo=source; explicit #1470 GitHub-release authorization only | ||
| assert_live_pin_guard | ||
| gh release create "v${VERSION}" --repo EffortlessMetrics/ripr --target "$SOURCE_RELEASE_HEAD" --title "ripr ${VERSION}" --notes-file "$RELEASE_NOTES" |
There was a problem hiding this comment.
Produce release notes before publishing the crate
Failure mode: on the documented fresh transaction, RELEASE_NOTES is only assigned at line 57 and no command creates it, so after cargo publish has irreversibly succeeded this gh release create --notes-file call fails on a missing file and leaves a partial release. gh release create --help defines --notes-file as “Read release notes from file.” Fix direction: produce, review, and require a nonempty packet-bound notes file before the first publication channel. Validation: execute the channel preflight from an empty packet and confirm it stops before cargo publish unless the reviewed notes exist. Confidence: High.
Useful? React with 👍 / 👎.
| --release-receipt "$PUBLICATION_RECEIPT" --policy-before "$POLICY_BEFORE" \ | ||
| --policy-exception "$POLICY_EXCEPTION" --policy-after "$POLICY_AFTER" \ |
There was a problem hiding this comment.
Pass verifier-shaped policy evidence to back-sync
Failure mode: every post-transport verification reaches these arguments with raw GitHub branch-protection responses, but xtask/src/reports/back_sync.rs::read_policy_state requires top-level allow_merge_commits: false and merge_commits_disabled: true, while read_policy_exception requires temporary, approved, and scope; none of those fields are produced in POLICY_BEFORE, POLICY_EXCEPTION, or POLICY_AFTER, so the canonical verifier always rejects after K has already moved main. Fix direction: retain the raw API snapshots for restoration, but separately generate the verifier's structured policy receipts and pass those paths here. Validation: run cargo xtask back-sync verify with artifacts produced solely by this runbook and require both pre/post modes to pass. Confidence: High.
AGENTS.md reference: AGENTS.md:L262-L272
Useful? React with 👍 / 👎.
| RULESET_BEFORE_REQUEST="$PACKET_ROOT/ruleset-${ruleset_id}-before-request.json" | ||
| test -s "$RULESET_BEFORE_REQUEST" | ||
| gh api --method PUT "repos/EffortlessMetrics/ripr-swarm/rulesets/${ruleset_id}" --input "$RULESET_BEFORE_REQUEST" > "$PACKET_ROOT/ruleset-${ruleset_id}-after.json" |
There was a problem hiding this comment.
Generate the ruleset restoration requests
Failure mode: whenever an active branch ruleset exists, this required ruleset-<id>-before-request.json has no producer anywhere in the runbook, so the first test -s fails immediately after K is pushed and leaves the rulesets and branch protection in their temporary exception state. Fix direction: derive and validate a PUT-compatible restore request from every captured full ruleset before weakening policy, then use that exact request here. Validation: search the generated packet for one restore request per active ruleset and round-trip each ruleset to its before shape after a disposable K transport. Confidence: High.
AGENTS.md reference: AGENTS.md:L505-L510
Useful? React with 👍 / 👎.
| if test "$(jq -r '.required_linear_history.enabled' "$POLICY_BEFORE")" = true; then | ||
| gh api --method PUT repos/EffortlessMetrics/ripr-swarm/branches/main/protection --input "$POLICY_EXCEPTION_REQUEST" > "$POLICY_EXCEPTION" |
There was a problem hiding this comment.
Arm policy restoration before weakening protection
Failure mode: if this first protection mutation succeeds and any later API call, ruleset update, expected-head check, or K push fails under set -e, the shell exits without restoring branch protection or previously changed rulesets, potentially leaving main without its normal PR and linear-history enforcement. Fix direction: prepare all validated restore payloads first and arm an idempotent EXIT trap before the first mutation, restoring every changed layer and disarming the trap only after exact before/after comparisons pass. Validation: inject a failure after each mutation boundary and verify every branch-protection and ruleset snapshot returns to its recorded before state. Confidence: High.
AGENTS.md reference: AGENTS.md:L505-L510
Useful? React with 👍 / 👎.
Summary
Swarm / Source Boundary
Docs/spec/evidence work for ripr-swarm. No source publication, release, tag, workflow, branch-protection, secret, or repository-setting mutation is performed.
Source-of-truth Links
Issue: #3104 — #3104
Specs: docs/specs/RIPR-SPEC-0148-source-promotion-preflight.md; docs/specs/RIPR-SPEC-0149-back-sync-verifier.md
Verifier anchors: source J issue #1493 / commit 9c53b12; swarm K issue #3100 / commit 4589b85.
Scope
Scope Classification
Production delta: none.
Evidence/support delta: Commands now scope every Cargo operation to its intended checkout; push/create the J promotion PR; preserve J as the PR head while validating the new source-main merge result; dispatch from verified vVERSION tag; paginate REST runs with .id and bounded waits; produce the exact publication receipt before K verification; and cover every active K protection layer/ruleset.
Single acceptance criterion: The operator has one fail-closed live-history transaction preserving every swarm-main commit and distinguishing ordinary squash PRs from ancestry-preserving J/K merges.
Non-goals: publication, merge, product-code change, repository-setting mutation, or duplicate verifier semantics.
Support-tier Impact
Claim/proof notes: the live-head JSON has null transaction fields until W and makes no selected/qualified release claim.
Policy Impact
Ledger/exception notes: branch-protection and ruleset PUTs plus protected candidate-tag publication are owner-authorized templates only. Current live GitHub state lacks the required release-transaction-pins tag ruleset, so W stops.
Proof
Local pass:
cargo fmt --all -- --check
cargo xtask check-doc-artifacts
cargo xtask check-traceability
cargo xtask check-doc-index
cargo xtask markdown-links
cargo xtask check-generated-clean
cargo xtask check-static-language
cargo xtask check-file-policy
cargo xtask check-command-catalog
git diff --check
jq empty docs/release-candidates/0.11.0-live-head-selection.json
Hosted exact-head 8e5c21f:
Claim Boundary
May claim: the documented procedure and template encode exact-history selection and fail-closed evidence gates.
Must not claim: release readiness, publication success, protected-pin availability, policy mutation success, artifact adequacy, or merge safety.
Rollback
Revert this documentation commit or restore prior documentation/template files. No external release/settings/ref state changed.
Spec-Test-Code Traceability
Static Language Check
CI Economics
LEM impact: docs-only; no workflow changes.
Failure mode caught: stale heads, wrong checkout/repository, unprotected pins, unbound workflow runs, incomplete policy restoration.
Cheaper signal: changed-surface docs/source-truth gates.
Branch protection/workflow impact: documented receipts only; no mutation.
Rollback: revert this documentation PR.
Engineering Check
Gates