Repository navigation
Description
Parentage
- Program: program: make ub-review one excellent reviewer with a trusted proof and gate spine #763 — M1 review experience.
- Umbrella: M1: make inline review delivery transactional and fallback-safe #765 — transactional inline/reply delivery and fallback-safe summary.
- Completed prerequisite: #765A / PR feat(review): define transactional delivery contract (#765) #826, merged as
bf15a077dda2532700722bd676969a7ba5370ad3. - Downstream: the reply/idempotence/fallback child created after this issue, then M1: degrade noisy review output without failing unrelated code #766 and M1 integration: prove one current-head review surface on the perl-lsp #3627 replay #801.
Builder contract
This is an execution issue, not a request for another plan or acknowledgement. Completion requires a current-main worktree, implementation, discriminating tests, a review-forward PR, independent exact-head review, hosted CI, merge, and parent/tracker reconciliation. A design note, branch, draft PR, or locally green suite is not completion.
Maintain one integrating writer. Read-only agents may inspect the current post path, historical PR #748, fake-GitHub fixtures, API semantics, and failed CI packets. Do not publish a dependent implementation PR before this one is terminal.
Verified current basis
PR #826 added the pure src/delivery_transaction.rs contract:
- exact-head planned delivery identity;
- exact planned/observed set reconciliation;
- review-bound confirmed receipts;
- transaction/failure/cleanup states;
- validated serialization and fail-closed transitions.
The production post path still submits one grouped GitHub review and does not prove a pending-review create → comment reconciliation → head recheck → submit transaction. It does not persist the exact comment IDs GitHub created. This issue wires the existing pure contract to the live transport path.
Outcome
final current-head inline plans
→ fetch current PR head
→ create pending review
→ create inline comments
→ list the comments GitHub actually attached to that review
→ reconcile exact planned and observed sets through #765A
→ fetch current PR head again
→ submit only when the head and comment set still match
→ persist transaction, reconciliation, and delivery receipts
Any failure after pending-review creation must attempt deletion and receipt the cleanup outcome. Until the downstream fallback issue lands, the compiler remains conservative: this issue must not make an unconfirmed finding disappear from the summary.
Scope
- Trace and update the current
cmd_post/post-command path, GitHub API helpers,github_validation,delivery_transaction, artifact writers, verifier mirror, tests, and contract documentation. - Add a bounded GitHub-delivery adapter rather than embedding another large network transaction in
main.rs. - Consume only current-head planned inline items in this slice. Reply transport remains downstream.
- Bind pending-review creation to the expected head/commit where GitHub supports it and independently re-fetch the live PR head before submission.
- Reconcile returned comments by exact head, claim, action, path, line, side, body digest, review ID, and comment ID.
- Submit only a complete, canonical reconciliation.
- Persist the transaction state and delivery/reconciliation receipts atomically enough that a failed receipt write cannot be reported as delivered.
- On comment mismatch, stale head, submit failure, receipt serialization failure, or receipt persistence failure: attempt pending-review deletion and record cleanup success or failure separately.
- Preserve the existing single-submit path as a rollback boundary until the full M1: make inline review delivery transactional and fallback-safe #765 umbrella is proven; do not silently fall back to it after a transactional attempt has begun.
- Classify GitHub transport failure separately from code findings and required artifact-integrity failure.
Acceptance
- Complete create → list/reconcile → recheck → submit → persist succeeds and produces exact-head delivery receipts.
- The first head fetch disagrees with the compiled expected head: no pending review is created.
- The head changes after comment creation but before submission: submission is refused, cleanup is attempted, and no delivery is confirmed.
- Partial, unexpected, duplicate, malformed, wrong-review, wrong-head, wrong-anchor, or wrong-body returned comment sets fail closed.
- Comment creation failure after pending-review creation attempts cleanup.
- Submission failure attempts cleanup.
- Receipt serialization and receipt persistence failures are distinct terminal stages and attempt cleanup where possible.
- Cleanup success and cleanup failure are independently receipted.
- A partial successful API response cannot mark the transaction complete.
- A GitHub outage or posting error does not fabricate a defect in unrelated user code.
- No unconfirmed delivery is used to remove a finding from the body in this slice.
- The old grouped path remains available as an explicit rollback, not an implicit mid-transaction fallback.
Required proof
- Fake-GitHub fixtures for every acceptance path, including exact request ordering and payload identity.
- A success fixture that returns stable review/comment IDs and proves the written receipts round-trip through the verifier.
- Negative fixtures for stale-head-before-create, stale-head-before-submit, partial/malformed/duplicate comment sets, submit failure, receipt failures, cleanup success, and cleanup failure.
- A regression proving transport failure is not converted into a code finding or
passevidence. - Focused delivery/post/validation tests, then the full binary and workspace contract suites.
cargo fmt --all -- --check.cargo clippy --workspace --all-targets --locked -- -D warnings.cargo doc --workspace --no-deps --locked.cargo xtask policy-check.- Artifact-verifier self-test and generated-packet verification.
- Full-context exact-diff RIPR under strict zero.
git diff --check.- Independent exact-head review and hosted
ub-review/gateon the final candidate.
For every validation command, record what it proves and what it does not. A timeout remains unverified, not passed.
Non-goals
- No reply endpoint or source-thread delivery; the next M1: make inline review delivery transactional and fallback-safe #765 child owns it.
- No retry idempotence or delivery-aware summary omission; the next M1: make inline review delivery transactional and fallback-safe #765 child owns it.
- No output ranking/compression; M1: degrade noisy review output without failing unrelated code #766 owns it.
- No proof selection/execution; M2a: resolve model-native focused proof intents into approved execution #803/M2b: replan after decisive receipts and close every proof request before reporting #804 own it.
- No analyzer upgrade, release, provider, secret, branch-protection, or required-check change.
- No threshold relaxation or broad suppression to make the PR green.
Rollback
Disable the transactional adapter and retain the existing grouped-review path while preserving all generated failure/cleanup receipts. Never roll back to a state where planned inline delivery alone suppresses the summary.
Stop conditions
Stop and update this issue with exact evidence instead of improvising when:
- GitHub's API cannot support the required pending-review identity or cleanup semantics;
- the live post path cannot be separated without changing #765C/M1: degrade noisy review output without failing unrelated code #766 behavior;
- an external permission or authority boundary blocks the proof;
- the candidate develops a second independently acceptable product claim and must be split.
Do not select the downstream issue while this issue has an active candidate, unresolved exact-head findings, or a nonterminal hosted gate.
Completion
Close only after the merged production path proves the complete inline pending-review transaction on current main, the parent #765 and #763 are reconciled with the merge SHA and hosted run, and the worktree/branch/scratch state is cleaned up.
Activity
coderabbitai commentedon Aug 4, 2026
🔗 Related PRs
#758 - feat(review): narrow current-head claims and adaptive proof planning [merged]
#779 - feat(review): bind thread context to current head [merged]
#822 - fix(artifacts): receipt final compiler reconciliation [merged]
#825 - fix(review): reconcile public claim surfaces [merged]
#826 - feat(review): define transactional delivery contract (
#765) [open]📝 Issue Planner
Check the box below or use the
@coderabbitai plancommand to generate an implementation plan and prompts that you can use with your favorite coding assistant.🧪 Issue enrichment is currently in open beta.
You can configure auto-planning by selecting labels in the issue_enrichment configuration.
To disable automatic issue enrichment, add the following to your
.coderabbit.yaml:💬 Have feedback or questions? Drop into our discord!
EffortlessSteven commentedon Aug 4, 2026
Downstream is now explicit: #828 owns replies, retry idempotence, confirmed-delivery omission, and unconfirmed fallback after this inline pending-review transaction merges. Do not absorb those obligations into #827 merely because the insertion points are adjacent.
feat(post): execute pending review delivery transaction
EffortlessSteven commentedon Aug 4, 2026
Implemented and merged through PR #831 as
55221c1b9832a43f30b36470a0266fced516653d.Proof boundary:
ub-review/gaterun30960210780passed at exact head5254115287b57ccb85e47116529bf03abbbb9fb0;new_unsuppressed=0with 284 exact hosted-form receipts;55221c1passed 751 binary tests, fmt, artifact self-test, and diff hygiene.The delivered slice owns pending-review inline creation, exact returned-comment reconciliation, current-head revalidation, submission, validated receipts, and cleanup on pre-submission failure. Replies, retry idempotence, confirmed-delivery fallback, and public-output admission remain in #828, #829, and #830.