Skip to content

Publish validated Delivery reviews as PR comments - #1324

Draft
taras wants to merge 3 commits into
mainfrom
codex/publish-independent-review-1323
Draft

taras wants to merge 3 commits into
mainfrom
codex/publish-independent-review-1323

Conversation

@taras

@taras taras commented Nov 15, 2026 •

Copy link
Copy Markdown
Owner

Why

Delivery already retained the validated independent review, but a person had to copy its result to the pull request. A missing comment could leave maintainers without the evidence behind a repair or merge decision.

What changes

delivery.md publishes every validated exact-head verdict through GitHub’s issue comments API and uses <PullRequest.Comments> for reconciliation and readback. The native GitHub provider reads repositories listed in the host’s XMD_WORKFLOW_GITHUB_PULL_REQUESTS configuration. The comment shows the reviewed commit, effective reviewer, verdict, summary, and findings. Readiness and repair handoff wait until GitHub returns the matching comment and Delivery saves its URL with the reviewed SHA.

--props-action publish-review reconciles from the saved review. Concurrent invocations using the same delivery record share a write reservation for the PR and commit. If GitHub may have accepted an interrupted write, a retry looks for the exact comment before any further action. status and closeout read GitHub and report the gate.

Review guide

  1. Start with examples/adversarial-implementation/delivery.md and components/Delivery/Status.md for the entrypoint and readiness gate.
  2. Review components/Delivery/ReviewPublication.md for the native comment reads and components/Delivery/ReviewComment.ts for the target check, write reservation, and comment verification.
  3. See tests/DeliveryPublication.test.md for overlapping invocations and an accepted write whose acknowledgement is lost.

How to verify it

deno task test examples/adversarial-implementation/tests/DeliveryPublication.test.md

The test drives the Delivery entrypoint with controlled ACP and GitHub boundaries. It covers passing and changes-required verdicts, the effective Astra fallback, a stale PR head, unavailable native comment reads, concurrent publication, and readback after an accepted write with a lost acknowledgement. The retry proves that neither ACP nor the comment write runs again.

Closes #1323.

@taras
taras force-pushed the codex/publish-independent-review-1323 branch from 34692e2 to c4a4fad Compare November 16, 2026 02:18

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Publish independent reviews automatically as pull request comments

1 participant