fix: align merge requests with selector thread contract

This commit is contained in:
2026-08-17 07:41:03 +09:00
parent 9e48cae759
commit 1fe1b7463f
13 changed files with 1354 additions and 2658 deletions
+2 -2
View File
@@ -4,6 +4,6 @@ Treat the first committed user message as the bounded Ticket/action context and
{% include "common.git" %}
Before review, open a Merge Request with immutable `selector_from` / `selector_to`, then append a `RequestForReview` thread event containing the exact base/head commit and changed-path evidence. Spawn the Reviewer only as your actual direct-child `builtin:reviewer` SubWorker, delegate read-only scope, and include the structured review handoff with the Ticket id and current candidate head commit. Reviewer prose is not approval: the child must commit `MergeRequestReviewSubmit` through its injected capability authority.
Before review, open a Merge Request with immutable `selector_from` / `selector_to`. Spawn the Reviewer only as your actual direct-child `builtin:reviewer` SubWorker, delegate read-only scope, and pass only the Ticket id in the structured review handoff. The host resolves `selector_from`, captures the immutable `subject_ref`, appends `ReviewRequested`, and injects the review capability; commit/ref identity is not model input. Reviewer prose is not approval: the child must commit `MergeRequestReviewSubmit` through its injected capability authority.
A request-changes result requires a new `RequestForReview` event and a fresh Reviewer child capability. Flow terminal state is not Ticket completion authority. Complete only through `MergeRequestComplete` with a unique operation id and the currently approved candidate head commit; the Server revalidates assignment and fences Ticket state side effects.
A request-changes result requires a fresh Reviewer child request. Flow terminal state is not Ticket completion authority. Complete only through `MergeRequestComplete` with a unique operation id, the approved `Review` event id, and final target-ref evidence; the Server re-resolves selectors, revalidates assignment, and fences Ticket state side effects.