Skip to content

Commit 52eb349

Browse files
committed
Format Delivery review publication Markdown
1 parent f199786 commit 52eb349

7 files changed

Lines changed: 279 additions & 279 deletions

File tree

‎examples/adversarial-implementation/components/Delivery/Closeout.md‎

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -13,50 +13,50 @@ returns: {type: object}
1313
<Delivery.Status delivery={props.delivery} number={props.number} as="status" />
1414
<Let as="reportRevision" value={status.revision ?? "Implementation feedback pending"} />
1515
<Dir path={props.delivery.directory}>
16-
<File path="closeout.json"><Json value={status} /></File>
17-
<File path="closeout.md">
18-
# Delivery {props.delivery.work}
16+
<File path="closeout.json"><Json value={status} /></File>
17+
<File path="closeout.md">
18+
# Delivery {props.delivery.work}
1919

20-
Status: {status.status}
20+
Status: {status.status}
2121

22-
Revision: {reportRevision}
22+
Revision: {reportRevision}
2323

24-
Next action: {status.nextAction}
24+
Next action: {status.nextAction}
2525

26-
<Each in={status.required} let="gate">
27-
- {gate.gate}: {gate.state}
28-
</Each>
26+
<Each in={status.required} let="gate">
27+
- {gate.gate}: {gate.state}
28+
</Each>
2929

30-
<If condition={status.review != null}>
31-
Independent review: {status.review.result.verdict}
30+
<If condition={status.review != null}>
31+
Independent review: {status.review.result.verdict}
3232

33-
<If condition={status.reviewPublication?.state === "verified"}>
34-
Published review comment {status.reviewPublication.url}
35-
</If>
33+
<If condition={status.reviewPublication?.state === "verified"}>
34+
Published review comment {status.reviewPublication.url}
35+
</If>
3636

37-
{status.review.result.summary}
37+
{status.review.result.summary}
3838

39-
<Each in={status.review.result.findings} let="finding">
40-
<Let as="findingKind" value={finding.blocking ? "Blocking" : "Non-blocking"} />
41-
- {findingKind}: {finding.description}
42-
</Each>
43-
</If>
39+
<Each in={status.review.result.findings} let="finding">
40+
<Let as="findingKind" value={finding.blocking ? "Blocking" : "Non-blocking"} />
41+
- {findingKind}: {finding.description}
42+
</Each>
43+
</If>
4444

45-
<If condition={status.reviewAttempts != null}>
46-
Review selection: {status.reviewAttempts.chain}
45+
<If condition={status.reviewAttempts != null}>
46+
Review selection: {status.reviewAttempts.chain}
4747

48-
<Each in={status.reviewAttempts.attempts} let="attempt">
49-
<Let as="attemptRole" value={attempt.position === 0 ? "Primary reviewer" : "Replacement reviewer"} />
50-
<Let as="attemptModel" value={attempt.model ?? "not configured"} />
51-
<Let as="attemptEffort" value={attempt.reviewer.effort ?? "provider default"} />
52-
<Let as="attemptEvidence" value={attempt.evidence.join(", ")} />
53-
- {attemptRole}: {attempt.reviewer.provider}, requested model {attempt.reviewer.model}, configured model {attemptModel}, effort {attemptEffort}, conversation {attempt.reviewer.session}. {attempt.state}: {attempt.reason} Evidence: {attemptEvidence}
54-
</Each>
55-
</If>
48+
<Each in={status.reviewAttempts.attempts} let="attempt">
49+
<Let as="attemptRole" value={attempt.position === 0 ? "Primary reviewer" : "Replacement reviewer"} />
50+
<Let as="attemptModel" value={attempt.model ?? "not configured"} />
51+
<Let as="attemptEffort" value={attempt.reviewer.effort ?? "provider default"} />
52+
<Let as="attemptEvidence" value={attempt.evidence.join(", ")} />
53+
- {attemptRole}: {attempt.reviewer.provider}, requested model {attempt.reviewer.model}, configured model {attemptModel}, effort {attemptEffort}, conversation {attempt.reviewer.session}. {attempt.state}: {attempt.reason} Evidence: {attemptEvidence}
54+
</Each>
55+
</If>
5656

57-
Evidence: closeout.json retains the complete status, selected CI and main-health evidence, and review references.
57+
Evidence: closeout.json retains the complete status, selected CI and main-health evidence, and review references.
5858

59-
This report starts no model call, publishes nothing and grants no merge permission.
60-
</File>
59+
This report starts no model call, publishes nothing and grants no merge permission.
60+
</File>
6161
</Dir>
6262
<Return value={status} />

‎examples/adversarial-implementation/components/Delivery/Reconcile.md‎

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ completion turn can supply the review.
3232
<Parse schema={{type:"object",properties:{turn:{type:"object",properties:{state:{const:"reply"},reply:{type:"string"}},required:["state","reply"],additionalProperties:false}},required:["turn"]}} as="returned">{outcomeText}</Parse>
3333
<Dir path={attempt}><Glob include={["raw.txt","receipt.json"]} as="derived" /></Dir>
3434
<If condition={!derived.includes("raw.txt")}>
35-
<If condition={!props.publish}><Fail message="The joined review has no saved raw reply. Use the explicit reconcile action; do not repeat the review." /></If>
36-
<Dir path={attempt}><File path="raw.txt">{returned.turn.reply}</File></Dir>
35+
<If condition={!props.publish}><Fail message="The joined review has no saved raw reply. Use the explicit reconcile action; do not repeat the review." /></If>
36+
<Dir path={attempt}><File path="raw.txt">{returned.turn.reply}</File></Dir>
3737
</If>
3838
<Ticket.Text path={attempt + "/raw.txt"} as="raw" />
3939
<If condition={raw !== returned.turn.reply}><Fail message="The saved raw reply differs from the joined execution. Preserve both for reconciliation." /></If>
@@ -42,16 +42,16 @@ completion turn can supply the review.
4242
<If condition={result.revision !== props.revision || result.acceptance.length !== props.delivery.policy.acceptance.length || props.delivery.policy.acceptance.some(clause => !result.acceptance.includes(clause.id)) || result.verdict === "pass" && result.findings.some(finding => finding.blocking)}><Fail message="The joined review must cover every recorded clause on the assigned commit and cannot pass with a blocking finding." /></If>
4343
<Let as="receipt" value={{...assigned,result,execution:attempt + "/execution.json"}} />
4444
<If condition={derived.includes("receipt.json")}>
45-
<Ticket.Text path={attempt + "/receipt.json"} as="receiptText" />
46-
<Parse schema={{type:"object"}} as="saved">{receiptText}</Parse>
47-
<If condition={JSON.stringify(saved) !== JSON.stringify(receipt)}><Fail message="The receipt differs from its original joined review. Preserve it for reconciliation." /></If>
48-
<Else>
49-
<If condition={!props.publish}><Fail message="The joined review has no completion receipt. Use the explicit reconcile action; do not repeat the review." /></If>
50-
</Else>
45+
<Ticket.Text path={attempt + "/receipt.json"} as="receiptText" />
46+
<Parse schema={{type:"object"}} as="saved">{receiptText}</Parse>
47+
<If condition={JSON.stringify(saved) !== JSON.stringify(receipt)}><Fail message="The receipt differs from its original joined review. Preserve it for reconciliation." /></If>
48+
<Else>
49+
<If condition={!props.publish}><Fail message="The joined review has no completion receipt. Use the explicit reconcile action; do not repeat the review." /></If>
50+
</Else>
5151
</If>
5252
<If condition={props.publish}>
53-
<Ticket.Checkout repository={props.delivery.repository} as="checkout" />
54-
<If condition={checkout.head !== props.revision || !checkout.clean}><Fail message="Source changed since the review. Preserve its result; the current source needs its own evidence." /></If>
55-
<If condition={!derived.includes("receipt.json")}><Dir path={attempt}><File path="receipt.json"><Json value={receipt} /></File></Dir></If>
53+
<Ticket.Checkout repository={props.delivery.repository} as="checkout" />
54+
<If condition={checkout.head !== props.revision || !checkout.clean}><Fail message="Source changed since the review. Preserve its result; the current source needs its own evidence." /></If>
55+
<If condition={!derived.includes("receipt.json")}><Dir path={attempt}><File path="receipt.json"><Json value={receipt} /></File></Dir></If>
5656
</If>
5757
<Return value={{...receipt,model:read.state.attempts[read.state.candidate.position].model}} />

‎examples/adversarial-implementation/components/Delivery/ReviewPublication.md‎

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,21 @@ returns: {type: object}
1313

1414
<Let as="url" value={"https://github.com/" + props.target.repository + "/pull/" + props.target.number} />
1515
<Try>
16-
<PullRequest.Comments url={url} as="comments" />
17-
<Delivery.ReviewComment target={props.target} review={props.review} publish={props.publish} allowPost={props.publish} comments={comments} as="publication" />
18-
<If condition={publication.state === "readback"}>
19-
<Let as="postReason" value={publication.reason} />
20-
<Try>
21-
<PullRequest.Comments url={url} as="readback" />
22-
<Delivery.ReviewComment target={props.target} review={props.review} publish={true} allowPost={false} comments={readback} as="publication" />
23-
<If condition={publication.state === "pending"}><Let as="publication" value={{...publication,reason:postReason + " " + publication.reason}} /></If>
24-
<Catch>
25-
<Let as="publication" value={{state:"pending",reason:postReason + " Could not read back pull request comments. Check GitHub read access."}} />
26-
</Catch>
27-
</Try>
28-
</If>
29-
<Return value={publication} />
30-
<Catch>
31-
<Return value={{state:"pending",reason:"Could not read pull request comments. Check the GitHub host allowlist and retry from the saved receipt."}} />
32-
</Catch>
16+
<PullRequest.Comments url={url} as="comments" />
17+
<Delivery.ReviewComment target={props.target} review={props.review} publish={props.publish} allowPost={props.publish} comments={comments} as="publication" />
18+
<If condition={publication.state === "readback"}>
19+
<Let as="postReason" value={publication.reason} />
20+
<Try>
21+
<PullRequest.Comments url={url} as="readback" />
22+
<Delivery.ReviewComment target={props.target} review={props.review} publish={true} allowPost={false} comments={readback} as="publication" />
23+
<If condition={publication.state === "pending"}><Let as="publication" value={{...publication,reason:postReason + " " + publication.reason}} /></If>
24+
<Catch>
25+
<Let as="publication" value={{state:"pending",reason:postReason + " Could not read back pull request comments. Check GitHub read access."}} />
26+
</Catch>
27+
</Try>
28+
</If>
29+
<Return value={publication} />
30+
<Catch>
31+
<Return value={{state:"pending",reason:"Could not read pull request comments. Check the GitHub host allowlist and retry from the saved receipt."}} />
32+
</Catch>
3333
</Try>

0 commit comments

Comments
 (0)