Repository navigation
Review custody for chg-dispatched reviews (US-47.5) - #1006
Merged
Merged
Conversation
review_complete on a chg-bound story is accepted only from a strict descendant of the source's chg root (409 chg_reviewer_required), names a submitted revision of the current binding (422 commit_sha_not_bound), and records one verdict per reviewer dispatch (unique index). Keys rooted at a chg root are refused verify, reject, verify-all, bulk verify and reject, backfill and mark-complete (409 chg_root_cannot_verify) and claim and report (409 chg_root_review_only). A landing with no review of its landed revision escalates over the new control-only :review_missing edge. Existing custody gates run first and unchanged. mcp-server 3.3.0.
Owner
Author
|
Review round 1 (code) counted at |
… of its landing - ReviewCustody.ensure_landed_review/3, on every path to verified (verify, verify-all, bulk verify, backfill, bulk mark-complete): 409 review_missing_escalated while the hold stands, 409 chg_review_not_for_landed_revision unless a chg review names the newest landing's sha. - A review_missing hold that cannot be written rolls the landing back (busy, or a counted 500 chg redelivers) instead of committing the merge unflagged. - verify-all checks the chg root once; bulk judges the caller through ReviewCustody.caller_lineage/2 like the single paths; one CustodyLineage helper replaces eight copies.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
US-47.5 (Epic 47): review custody for chg-dispatched reviews (PRD §6).
Loopctl.Changes.ReviewCustody, called fromProgress): a key whose dispatch is a STRICT descendant of the source'schg_root_dispatch_id, resolved server-side. The root itself, any other key and a human operator get409 chg_reviewer_required. One reviewer dispatch records one verdict, enforced by the unique indexreview_records_reviewer_dispatch_uidx.review_records.commit_sha(new, nullable) is required for a chg story and must be the envelope sha of an appliedsubmittedevent of the story's CURRENT binding, otherwise422 commit_sha_not_bound. For a story not bound to chg it is ignored and not stored.self_review_blocked,caller_lineage_required,unresolvable_dispatch_lineageandstory_not_reported_donerun before the new checks. The non-chg suites are unchanged and green.409 chg_root_cannot_verifyon verify, reject, verify-all, bulk verify and bulk reject, backfill, and bulk mark-complete. It gets409 chg_root_review_onlyon claim, bulk claim and report.merged -> escalatedover the new control-only:review_missingedge, inside the landed event's transaction.mcp-server3.3.0:review_completetakescommit_sha, and the review/verify tool descriptions name the new refusals.review-completeanswered 500 forcaller_lineage_required, because the controller had no clause for it. It now gives the documented 409.Defaults you may overrule (all recorded in PRD §9):
ReviewCustody.chg_rooted?/2).chg_root_review_only) goes beyond the ACs. Without it, an agent-role child of chg's root could claim a story and a sibling could review it, because siblings pass the lineage gate.landedapplies. A later review does not undo the escalation; a human resolves it.review_completekeeps requiringreported_done, so the pilot's implementing session must report onchg submit. Added as AC-47.8.5.Not in this PR: the verify-side check that the review names the LANDED revision is AC-47.6.1, in US-47.6. Until it lands, a chg story at
mergedwith a review of an earlier revision is escalated by the stage mapping, butverify_storywould still accept it.