Repository navigation
CRW-965: accept and integrate implementation nodes by commit without a pull request - #886
Conversation
dag-accept gains --commit <head> --base <base> --verification <record> --checkout <path>: the relay proves in the local checkout that the commit is the head the generation's ruling fixed (dag_verified_heads.head_sha), that it descends from the base, and that the verification record names this commit's tree with a reusable PASS. Each failure is refused with its own reason (head_not_receipt_head, merge_base_mismatch, revision_mismatch, disposition_conflict, malformed_receipt). The pull-request path is untouched. The zone gains two appended tables: dag_acceptance_verifications (the record the acceptance was taken on, so a repeat call can prove it is the same output) and dag_integration_batches (one row per integration batch, used by the next commit).
dag_acceptance_verifications and dag_integration_batches are appended statements, so testdata/dag_zone_shipped.json is regenerated (CRW_GOLDEN=update) with their text.
|
You have reached your Codex usage limits for security reviews. Please try again later. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a5e39397d4
ℹ️ 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".
💡 Codex ReviewAdding When When coordinator ownership has changed, or the caller supplies a stale The record path is deterministic for a tree and is neither newly created nor removed before the verifier runs. If that tree was verified previously and a later verifier invocation exits before writing its record, codex-relay-workflow/internal/relay/dagsched/accept_commit.go Lines 166 to 170 in a5e3939 When a head has multiple ancestor commits, a caller can provide a verification record whose If the local integration ref moves after codex-relay-workflow/internal/relay/dagsched/candidates.go Lines 77 to 81 in a5e3939 If an acceptance is superseded or its stand changes while the batch verification is running, codex-relay-workflow/internal/relay/integrate/batch.go Lines 128 to 130 in a5e3939 For commit-based acceptances, Marshalling the reduced codex-relay-workflow/internal/relay/integrate/batch.go Lines 122 to 125 in a5e3939 When the integration branch already exists, its head replaces codex-relay-workflow/internal/relay/integrate/batch.go Lines 182 to 187 in a5e3939 If the repeatable CLI option is supplied as codex-relay-workflow/internal/relay/store/dag_zone.go Lines 855 to 856 in a5e3939 SQLite rowid tables do not make a ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
…oved batch re-run
…rub GIT_* for the ref update
…er candidate A code-pinned artifact_verified edge is satisfied by a commit acceptance that carries its verification record, as well as by a pull-request acceptance. The batch freezes each candidate's criteria set on its intent row, and an explicit request for a node that already integrated is refused as disposition_conflict with the reason. Tests cover the edge, the judge's reuse keys and the criteria reading through the production commit path.
…rify script The commit path judges a verification record by its reuse keys, reads a criteria change through revalidation, and launches the verify script through its shebang line.
…e a dash remote A candidate whose head the integration branch already contains is not merged again by a later batch. A merge that fails for a host reason is an error, not a conflict. A remote name that starts with a dash is refused before git runs. The plugin version is re-recorded from the revised payload.
…it again A candidate whose head the integration branch already contains is no longer dropped. It is marked from its frozen row when the branch head is a head this relay verified (recorded as a batch intent before the branch moves); otherwise it is reported as contained_unverified and stays ready. A batch that merges nothing moves no ref and runs no verifier. A merge host failure now carries git's own message.
…integrate The integration command prints the candidates the branch already contained, with their marks, and the contained candidates left ready because no verified head covers the branch. The commit-acceptance section documents the rule.
…ntainment at the read head When the candidates left after a removal no longer merge cleanly, the batch defers the conflicting candidate and retries it on the verified set instead of aborting the whole batch. Containment is judged against the branch head the batch read once, the same head its coverage check reads.
…pt currency and push and checkout addresses A pull-request edge reads the verification table only when its acceptance has no forge row, so a store without the table still reads its pull requests. A verify command that moves HEAD fails the verification. A deferred candidate that depends on a removed candidate is left out. A candidate whose receipt is no longer the generation head is not a candidate. The push reads and writes the same address (the remote's push URL). A linked worktree's git directory is read from its .git file.
…es removed The gitfile branch of the git directory helper ran git with the inherited environment, so a poisoned GIT_DIR could name another repository. It now runs with every GIT_ variable removed, as the other git reads of the target reader do.
…defer HTTP 5xx pushes A batch integrates only the candidates accepted for its checkout. A retried batch reports a mark it already recorded instead of inserting the stage row again. A push that GitHub answers with a 5xx is an outage and is deferred. The observation reader resolves a linked worktree's git directory; the lane movement reader is restored to its original line.
…on the integration branch A record whose tool value contradicts its own pin is refused by the one judge. A commit-accepted node completes on the integration branch its batches moved, and its integrated edges are judged there, not on the base ref the edge names. A push answered with a 5xx status is deferred; a test pins the path where ls-remote succeeds and the push is rejected.
…d and tree The replay and revalidation check compares the verified head and tree the verification row stores, not the bytes of the record file. A fresh record of the same output is judged by the one judge and is replayed; the row keeps the first evidence.
…arking contained candidates A verified-head row records the head's tree, ci.yml digest and dependency digests. A contained candidate is marked only while one of those rows still matches the branch head. Otherwise the head is verified again without a merge, and only its PASS covers the candidates. An all-contained batch runs the verifier only in that case.
…concile a planned move The compare-and-swap and the moved record now share one transaction that checks the coordinator epoch, so an epoch claimed before the swap refuses the batch. A planned intent the branch holds and no moved record covers is reconciled once by the next run; one the branch does not hold is reported as abandoned. Retried contained batches do not insert their mark twice, a batch does not take a candidate accepted for another checkout, and the refusal names that case.
…letion target and the fenced move The reuse paragraph states what the relay judges (tool values against their own pins) and what it leaves to the writer (Go flags and environment). A covering verification counts only while its keys hold. Commit-accepted nodes complete on the integration branch the batch moved. A batch moves the branch in one fenced transaction and reconciles a planned move after a crash; an HTTP 5xx push is an outage.
… the relay's records - Each merged candidate is proved current again inside the fenced transaction that moves the integration branch, by the predicate candidate selection uses. A candidate that changed refuses the batch with merge_candidate_moved and the branch does not move. - A stored verification of a head also records os and arch and is reused only on the same platform. - A commit-accepted node completes on the integration refs that a batch with a moved record has moved; planned, abandoned and failed intents add no target. - A candidate the bisection leaves out is reported as not_proven_failing unless it fails when verified alone. - dag-integrate-push reads the relay store and pushes only a tip the relay moved the integration branch onto; any other tip is refused before the remote is read.
…mmit path - contracttest replays dag-integrate, dag-integrate-push, dag-integration-observe and dag-accept with --commit through the built crw (usage and absent checkout refusals). The goldens were written with CRW_GOLDEN=update. - docs/relay/dag-scheduler.md states the record judgement boundary, the reading of criterion c2, the currency check at the swap, the bisection limitation, the completion refs and the push rule. - merge-readiness.md has the same push and bisection rules for the integration section. - plugin.json is re-recorded for the changed reference.
The guard that proves a frozen candidate current inside the fenced transaction compared the acceptance, event, revision, generation and head but not the criteria set digest. A revalidation during verification kept those identities, so the branch could move on a verification of an older criteria set (finding d2). Candidates also carry the acceptance-time criteria digest, which the covering check uses (finding d1).
The completion refs of an acceptance were collected from every batch that carried an intent for it, including attempts that failed before their move, and were then matched against a branch name moved by some other batch. A failed attempt on one ref could therefore make an unrelated branch a mandatory target (finding d4). The refs now come only from the acceptance's own batches that have a ref_moved row.
A ref moved by the reconciliation after a crash was recorded as a ref_moved stage row without a batch row, and the push check read only batch rows, so the recovered head could never be pushed (finding d3). The check now reads one source for both paths: a ref_moved row naming the tip, with the planned intent of its batch carrying the verified head and a verification digest for the same ref.
…nged A stored verification covered a contained candidate without naming its criteria set, so a revalidated candidate was published on the verification of its earlier criteria set (finding d1). The covering check now binds each candidate to the criteria set its verification named, and an unnamed candidate only while its set is still the accepted one. The batch verifies its head again, with no merge, when a candidate is not covered. The swap also refuses a candidate revalidated during the verification (finding d2 test). Red tests added in integration_findings_test.go: a contained candidate whose criteria changed is verified again, and an unchanged one is not; a candidate revalidated during the verification refuses the swap; a reconciled move pushes; an attempt that moved nothing on one ref adds no completion target on another. The red tests were written with the fixes in the same change, so their failing output before the fix was not captured separately.
The commit-path section said that every batch runs the verify command afresh, which the covering verification does not do. It now says that a batch reuses only its own covering PASS while the tree, the ci.yml and dependency digests, the platform and the candidate's criteria set still match, and runs the verifier again on the head otherwise.
No description provided.