mirror of
https://github.com/storytold/autocraft.git
synced 2026-11-30 10:04:08 +01:00
Web: one Opus review per PR head; drop the Sonnet first pass
This commit is contained in:
1 parent
b283443375
commit
ac0e1228ed
14 files changed
+55
-75
No files matched your search
@@ -14,7 +14,7 @@ const pick = <T,>(a: T[]): T => a[Math.floor(rnd() * a.length)]!;
|
||||
|
||||
const STEPS = [
|
||||
{ step: "decide", stage: 3, title: "Ask decisions", promptId: "decide.summary", provider: "claude" as const, model: "sonnet" },
|
||||
{ step: "review-batch", stage: 5, title: "Review pull requests", promptId: "review.sonnet", provider: "claude" as const, model: "sonnet" },
|
||||
{ step: "opus-review", stage: 5, title: "Review pull requests", promptId: "review.opus", provider: "claude" as const, model: "opus" },
|
||||
{ step: "classify-new", stage: 2, title: "Classify new and changed items", promptId: "classify.haiku", provider: "claude" as const, model: "haiku" },
|
||||
{ step: "classify-new", stage: 2, title: "Classify new and changed items", promptId: "classify.jev", provider: "jev" as const, model: "jev" },
|
||||
];
|
||||
@@ -45,7 +45,7 @@ const PROMPT = (r: AgentRun) =>
|
||||
function makeRun(id: number, startedMsAgo: number, running: boolean): AgentRun {
|
||||
const s = pick(STEPS);
|
||||
const acct = s.provider === "jev" ? null : running ? pick(accounts.filter((a) => a.enabled)) : pick(accounts);
|
||||
const n = s.step === "classify-new" ? 1 + Math.floor(rnd() * 30) : s.step === "review-batch" ? 1 + Math.floor(rnd() * 4) : 1 + Math.floor(rnd() * 8);
|
||||
const n = s.step === "classify-new" ? 1 + Math.floor(rnd() * 30) : s.step === "opus-review" ? 1 + Math.floor(rnd() * 4) : 1 + Math.floor(rnd() * 8);
|
||||
const repo = pick(REPOS);
|
||||
const items = Array.from({ length: Math.min(n, 50) }, (_, i) => ({ repo: i % 3 === 2 ? pick(REPOS) : repo, number: 1000 + Math.floor(rnd() * 1400) }));
|
||||
const failed = !running && rnd() < 0.08;
|
||||
@@ -77,7 +77,7 @@ function rates(window: "24h" | "7d"): Rates {
|
||||
const step = hourly ? HOUR : 24 * HOUR;
|
||||
const t = (i: number) => iso((n - 1 - i) * step);
|
||||
const stages = [
|
||||
["classify-new", "Classify new and changed items", 30], ["decide", "Ask decisions", 6], ["review-batch", "Review pull requests", 9], ["merge", "Merge queued pull requests", 1.5],
|
||||
["classify-new", "Classify new and changed items", 30], ["decide", "Ask decisions", 6], ["opus-review", "Review pull requests", 9], ["merge", "Merge queued pull requests", 1.5],
|
||||
].map(([s, title, base]) => ({
|
||||
step: s as string, title: title as string,
|
||||
buckets: Array.from({ length: n }, (_, i) => {
|
||||
|
||||
@@ -333,7 +333,7 @@ const SEEDS: Seed[] = [
|
||||
title: "Formula bar: support array formulas entered with Ctrl+Shift+Enter",
|
||||
opinions: [["mosswood", "hold", "I want a second look at how ranges spill.", 32]],
|
||||
question: "Reviewed and green, but it touches the evaluator core. Merge now?",
|
||||
context: ["Sonnet review found no issues; 140 new evaluator tests pass.", "It changes how ranges spill into neighbouring cells."],
|
||||
context: ["Opus review found no issues; 140 new evaluator tests pass.", "It changes how ranges spill into neighbouring cells."],
|
||||
facts: ["+2,104 −310 · 14 files", "author: 22 merged, whitelisted", "review: no issues found", "CI passing · mergeable"],
|
||||
options: [
|
||||
{ key: "merge", label: "Merge" },
|
||||
@@ -731,7 +731,7 @@ function stagesFor(s: Seed, d: Decision): StageEntry[] {
|
||||
{ stage: "classified", at: iso(t + 3 * H), by: "haiku", note: null },
|
||||
{ stage: "classified", at: iso(t + 2 * H), by: "jev", note: null },
|
||||
];
|
||||
if (s.cls?.some((c) => c[0] === "sonnet")) st.push({ stage: "reviewed", at: iso(t + 50 * M), by: "sonnet", note: "No blocking issues" });
|
||||
if (s.cls?.some((c) => c[0] === "sonnet")) st.push({ stage: "reviewed", at: iso(t + 50 * M), by: "opus", note: "No blocking issues" });
|
||||
st.push({ stage: d.number === null ? "batched" : "needs-decision", at: iso(t), by: d.askedBy, note: d.kind });
|
||||
if (d.answer) st.push({ stage: d.answer === "merge" ? "merged" : d.answer.startsWith("close") ? "closed" : "take", at: d.appliedAt ?? d.answeredAt!, by: d.answeredBy!, note: null });
|
||||
return st;
|
||||
|
||||
@@ -12,7 +12,7 @@ const ALL: Record<string, number> = {
|
||||
"decide.not-asked": 4_239, "decide.open": 38, "decide.take": 61, "decide.small-extra": 23, "decide.plugin": 31, "decide.close": 19, "decide.need-info": 9, "decide.backlog": 12,
|
||||
"decide.total": 4_420, "decide.recent.asked": 50, "decide.recent.answered": 27, "x.openDecisions": 38, "edge.classify.decide": 4_420,
|
||||
"labels.labelled": 2_140, "labels.pending": 1_310, "labels.unapproved": 14_456, "labels.total": 17_906, "labels.recent.labelled": 400, "x.repos": REPOS.length, "x.approved": 3,
|
||||
"review.not-reviewed": 5_640, "review.waiting-opus": 12, "review.take": 58, "review.take-fix": 31, "review.hold": 36, "review.close": 21, "review.total": 5_786, "review.recent.reviewed": 40,
|
||||
"review.not-reviewed": 5_640, "review.take": 58, "review.take-fix": 31, "review.hold": 36, "review.close": 21, "review.total": 5_786, "review.recent.reviewed": 40,
|
||||
"edge.labels.review": 5_786, "edge.review.verify": 58, "edge.review.fixup": 31,
|
||||
"fix.candidates": 64, "fix.retry": 3, "fix.testing": 2, "fix.passed": 1, "fix.pr-opened": 7, "fix.skipped": 41, "fix.failed": 5, "fix.unapproved": 410, "fix.total": 533,
|
||||
"edge.labels.fix": 533, "edge.fix.review": 7,
|
||||
@@ -33,7 +33,7 @@ export function flowFixture(repo?: string): Flow {
|
||||
repo: repo ?? null, now: iso(0), lastSync: iso(70_000), run: "org-1102", countedAt: iso(40_000), uncounted: 0,
|
||||
steps: [
|
||||
{ name: "embed", stage: 1 }, { name: "dupes", stage: 3 }, { name: "classify-new", stage: 2 }, { name: "classify-all", stage: 2 }, { name: "prioritize", stage: 2 }, { name: "rank", stage: 8 }, { name: "decide", stage: 3 },
|
||||
{ name: "labels-ensure", stage: 4 }, { name: "labels-apply", stage: 4 }, { name: "review-batch", stage: 5 }, { name: "checks", stage: 5 }, { name: "fixissue", stage: 7 }, { name: "fixissue-collect", stage: 7 },
|
||||
{ name: "labels-ensure", stage: 4 }, { name: "labels-apply", stage: 4 }, { name: "opus-review", stage: 5 }, { name: "checks", stage: 5 }, { name: "fixissue", stage: 7 }, { name: "fixissue-collect", stage: 7 },
|
||||
{ name: "fixup", stage: 6 }, { name: "verify", stage: 6 }, { name: "verify-collect", stage: 6 }, { name: "merge", stage: 6 }, { name: "act", stage: 6 },
|
||||
],
|
||||
});
|
||||
|
||||
@@ -110,7 +110,7 @@ export function costReport(run = ""): CostReport {
|
||||
const stages = [
|
||||
{ stage: "classify", model: "haiku", ...s(t(420, 21000, 1_700_000, 4_500_000, 2_000_000, 27_700_000, 7.8, 6300)) },
|
||||
{ stage: "classify", model: "jev-latest", ...s(t(21000, 21000, 30_400_000, 2_100_000, 0, 0, null, 920)) },
|
||||
{ stage: "review", model: "sonnet", ...s(t(1650, 1650, 3_200_000, 1_400_000, 41_000_000, 6_800_000, 58.4, 14200)) },
|
||||
{ stage: "review", model: "opus", ...s(t(1650, 1650, 3_200_000, 1_400_000, 41_000_000, 6_800_000, 58.4, 14200)) },
|
||||
{ stage: "fix", model: "sonnet", ...s(t(210, 210, 900_000, 700_000, 22_000_000, 3_100_000, 29.9, 21000)) },
|
||||
];
|
||||
const repoShare = REPO_OPEN.map(([repo, n]) => [repo, n / 12000] as const);
|
||||
|
||||
@@ -57,7 +57,7 @@ const job = (id: number, step: string, state: Job["state"], startMin: number | n
|
||||
id, step, params: {}, requestedBy: "ochre-fox", requestedAt: iso((startMin ?? 0) + 1), state,
|
||||
startedAt: startMin === null ? null : iso(startMin), endedAt: state === "running" || state === "queued" ? null : iso((startMin ?? 0) - minutes),
|
||||
progress: null, summary: null, error: null, cancelRequested: false, usage: null,
|
||||
models: step.startsWith("classify") ? ["jev", "haiku"] : step === "review-batch" || step === "decide" ? ["sonnet"] : [], accounts: state === "queued" ? [] : step === "review-batch" || step === "decide" || step.startsWith("classify") ? ["Account B"] : [], ...extra,
|
||||
models: step.startsWith("classify") ? ["jev", "haiku"] : step === "opus-review" ? ["opus"] : step === "decide" ? ["sonnet"] : [], accounts: state === "queued" ? [] : step === "opus-review" || step === "decide" || step.startsWith("classify") ? ["Account B"] : [], ...extra,
|
||||
});
|
||||
|
||||
function seed(): Job[] {
|
||||
@@ -85,7 +85,7 @@ export function createPipelineMock(me: User, changed: () => void): Pick<Api, "pi
|
||||
const flag = { enabled: true, changedBy: "ochre-fox" as string | null, changedAt: iso(300) as string | null };
|
||||
const limits: StageLimit[] = [
|
||||
["classify-new", "Classify new and changed items", 2000, 412], ["embed", "Embed items", null, 0], ["decide", "Ask decisions", 100, 100],
|
||||
["checks", "Refresh CI and merge state", null, 38], ["review-batch", "Review pull requests", 40, 14], ["labels-apply", "Apply labels on GitHub", null, 0], ["merge", "Merge queued pull requests", 10, 2],
|
||||
["checks", "Refresh CI and merge state", null, 38], ["opus-review", "Review pull requests", 40, 14], ["labels-apply", "Apply labels on GitHub", null, 0], ["merge", "Merge queued pull requests", 10, 2],
|
||||
["verify", "Plan verification of taken pull requests", 40, 12], ["fixup", "Fix up take-fix pull requests", 10, 3], ["act", "Comment and close", 20, 20],
|
||||
].map(([step, title, perDay, usedToday]) => ({
|
||||
step: step as string, title: title as string, perDay: perDay as number | null, usedToday: usedToday as number,
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
import type { BatchFilter, BatchList, QueueBatch, QueueFilter, QueueList, QueueRow, QueueState, TypeLabel } from "../types";
|
||||
import { AUTHORS, DECISIONS, NOW, REPOS, rng, titleFor } from "./fixtures";
|
||||
|
||||
const STATES: QueueState[] = ["ready", "decision-answered-merge", "refused", "waiting-ci", "ci-failed", "conflict", "needs-fix-up", "waiting-opus", "waiting-verify", "verify-failed", "verify-error", "needs-decision", "declined", "merged", "held-duplicate", "held-backlog", "batch-checking", "in-batch", "batch-failed", "changes-requested"];
|
||||
const STATES: QueueState[] = ["ready", "decision-answered-merge", "refused", "waiting-ci", "ci-failed", "conflict", "needs-fix-up", "waiting-verify", "verify-failed", "verify-error", "needs-decision", "declined", "merged", "held-duplicate", "held-backlog", "batch-checking", "in-batch", "batch-failed", "changes-requested"];
|
||||
const REASONS = [
|
||||
"Fixes the off-by-one in the page range and adds a test.",
|
||||
"Small, correct guard against an empty selection.",
|
||||
|
||||
@@ -13,7 +13,6 @@ const WAITS: Record<string, [MergeWait, string, number]> = {
|
||||
"batch-checking": ["batch-check", "In a batch; checked in the sandbox", 1],
|
||||
"waiting-ci": ["ci", "Waiting for CI", 2],
|
||||
"waiting-verify": ["verify", "Waiting for Verify", 2],
|
||||
"waiting-opus": ["re-review", "Waiting for re-review", 3],
|
||||
};
|
||||
|
||||
const tabOf = (next: string): QueueTab | null =>
|
||||
|
||||
@@ -62,16 +62,13 @@ function actionsFor(n: number, kind: Item["kind"]): ItemAction[] {
|
||||
}
|
||||
|
||||
function reviewsFor(n: number): ItemReviews {
|
||||
const sonnet = { verdict: "take-fix" as const, reason: "Correct fix; one name is unclear.", fixes: [{ file: "src/lib.rs", change: "Rename `tmp` to `stride`." }], risks: [], at: iso(5 * H) };
|
||||
const head = `${String(n).padStart(7, "0")}abcdef`;
|
||||
if (n % 4 === 0) return { head, current: true, sonnet, opus: null, skipReason: "docs, translations or comments only (6 changed lines)", final: { verdict: "take-fix", source: "skip-list", reason: sonnet.reason, decided: true } };
|
||||
if (n % 4 === 1) return { head, current: true, sonnet, opus: null, skipReason: null, final: { verdict: "take-fix", source: "sonnet", reason: sonnet.reason, decided: false } };
|
||||
if (n % 8 === 2) {
|
||||
const o = { verdict: "hold" as const, reason: "The change drops a bounds check that the decoder relies on.", fixes: [], risks: ["Reads past the buffer on short input."], at: iso(4 * H), sure: false, mode: "delta" as const, baseHead: `${String(n).padStart(7, "1")}abcdef` };
|
||||
return { head, current: true, sonnet, opus: o, skipReason: null, final: { verdict: "hold", source: "opus", reason: "Needs a person.", decided: true } };
|
||||
return { head, current: true, opus: o, final: { verdict: "hold", reason: "Needs a person.", decided: true } };
|
||||
}
|
||||
const opus = { verdict: "take-fix" as const, reason: "Also drop the unused import.", fixes: [{ file: "src/lib.rs", change: "Rename `tmp` to `stride`." }, { file: "src/lib.rs", change: "Remove the unused `use std::fmt;`." }], risks: ["Depends on code outside the diff."], at: iso(4 * H), sure: true, mode: "full" as const, baseHead: null };
|
||||
return { head, current: n % 8 !== 6, sonnet, opus, skipReason: null, final: { verdict: opus.verdict, source: "opus", reason: opus.reason, decided: true } };
|
||||
const opus = { verdict: "take-fix" as const, reason: "Also drop the unused import.", fixes: [{ file: "src/lib.rs", change: "Rename `tmp` to `stride`." }, { file: "src/lib.rs", change: "Remove the unused `use std::fmt;`." }], risks: ["Depends on code outside the diff."], at: iso(4 * H), sure: n % 4 !== 1, mode: "full" as const, baseHead: null };
|
||||
return { head, current: n % 8 !== 6, opus, final: { verdict: opus.verdict, reason: opus.reason, decided: true } };
|
||||
}
|
||||
|
||||
function patchChecksFor(n: number): ItemPatchCheck[] {
|
||||
|
||||
+5
-10
@@ -217,7 +217,7 @@ export interface Item extends ItemRef {
|
||||
fixups: ItemFixup[];
|
||||
/** Opus checks of the patches we wrote for this item (Fix-up, Fix), oldest first. */
|
||||
patchChecks?: ItemPatchCheck[];
|
||||
/** PRs: the Sonnet and Opus reviews of the newest reviewed head, and the verdict later stages use; null before the first review. */
|
||||
/** PRs: the Opus review of the newest reviewed head, and the verdict later stages use; null before the first review. */
|
||||
reviews: ItemReviews | null;
|
||||
/** The Act step's GitHub writes after an operator's answer, oldest first. */
|
||||
actions: ItemAction[];
|
||||
@@ -261,19 +261,15 @@ export interface ReviewSide {
|
||||
}
|
||||
|
||||
/**
|
||||
* The two review passes of a PR head. `opus` is null while Opus has not reviewed the head or when the skip list
|
||||
* exempted it (then `skipReason` says why). `final` is the verdict every later stage reads: Opus's, or Sonnet's when
|
||||
* skip-listed or when Sonnet held or closed; `decided` is false while a Sonnet take or take-fix waits for Opus.
|
||||
* When Opus is unsure and disagrees with Sonnet, `final.verdict` is hold and its reason shows both reviews.
|
||||
* The Opus review of a PR head. `opus` is null while the head has not been reviewed. `final` is the verdict every
|
||||
* later stage reads: Opus's. An unsure take or take-fix stays take or take-fix and never merges without an operator's answer.
|
||||
*/
|
||||
export interface ItemReviews {
|
||||
head: string;
|
||||
/** The head is the PR's current head. */
|
||||
current: boolean;
|
||||
sonnet: ReviewSide | null;
|
||||
opus: (ReviewSide & { sure: boolean; mode: "full" | "delta"; baseHead: string | null }) | null;
|
||||
skipReason: string | null;
|
||||
final: { verdict: ReviewVerdictName; source: "opus" | "sonnet" | "skip-list"; reason: string; decided: boolean };
|
||||
final: { verdict: ReviewVerdictName; reason: string; decided: boolean };
|
||||
}
|
||||
|
||||
export type FixupState = "pushed" | "failed" | "refused" | "cannot-push" | "too-large" | "asked" | "rejected";
|
||||
@@ -940,7 +936,7 @@ export interface CommentTemplate {
|
||||
* ready (may merge by the rule now), decision-answered-merge (the operator answered merge),
|
||||
* refused (the merge command or a pre-merge check said no; tried again next run),
|
||||
* waiting-ci (CI pending or none, or GitHub still computing mergeability), ci-failed, conflict,
|
||||
* needs-fix-up (take-fix), waiting-opus (Sonnet's take or take-fix; Opus has not reviewed the head yet), waiting-verify (no passed verification at the head yet), verify-failed, verify-error,
|
||||
* needs-fix-up (take-fix), waiting-verify (no passed verification at the head yet), verify-failed, verify-error,
|
||||
* needs-decision (outside the rule; Merge? asked or about to be),
|
||||
* declined (the operator answered hold or close), merged,
|
||||
* held-duplicate (an open Duplicate? decision keeps it out of every later stage), held-backlog (answered Backlog),
|
||||
@@ -956,7 +952,6 @@ export type QueueState =
|
||||
| "ci-failed"
|
||||
| "conflict"
|
||||
| "needs-fix-up"
|
||||
| "waiting-opus"
|
||||
| "waiting-verify"
|
||||
| "verify-failed"
|
||||
| "verify-error"
|
||||
|
||||
@@ -109,7 +109,7 @@ function Filters({ f, update }: { f: Record<string, string | undefined>; update:
|
||||
);
|
||||
return (
|
||||
<div className="flex flex-wrap items-center gap-x-4 gap-y-2 border-b border-line px-4 py-2">
|
||||
{sel("Step", "step", (steps.data?.steps ?? []).filter((s) => s.group === "classify").map((s) => ({ value: s.name, label: s.name })).concat([{ value: "decide", label: "decide" }, { value: "review-batch", label: "review-batch" }]).filter((o, i, a) => a.findIndex((x) => x.value === o.value) === i))}
|
||||
{sel("Step", "step", (steps.data?.steps ?? []).filter((s) => s.group === "classify").map((s) => ({ value: s.name, label: s.name })).concat([{ value: "decide", label: "decide" }, { value: "opus-review", label: "opus-review" }]).filter((o, i, a) => a.findIndex((x) => x.value === o.value) === i))}
|
||||
{sel("Account", "account", (accounts.data ?? []).map((a) => ({ value: a.id, label: a.label })))}
|
||||
{sel("State", "state", [{ value: "done", label: "Done" }, { value: "failed", label: "Failed" }])}
|
||||
{sel("Repo", "repo", (repos.data ?? []).map((r) => ({ value: r, label: r })))}
|
||||
|
||||
@@ -27,9 +27,9 @@ function stepsOf(it: Item, scope: Decision | null | undefined): Step[] {
|
||||
if (it.kind === "pr") {
|
||||
const r = it.reviews;
|
||||
const reviewed = r ? r.current && r.final.decided : has("reviewed");
|
||||
const detail = r ? (!r.current ? "not reviewed at this head" : r.final.decided ? FINAL[r.final.verdict] : "waiting for the Opus review") : has("reviewed") ? (verdict ?? "reviewed") : "not reviewed yet";
|
||||
const detail = r ? (!r.current ? "not reviewed at this head" : FINAL[r.final.verdict]) : has("reviewed") ? (verdict ?? "reviewed") : "not reviewed yet";
|
||||
out.push({ node: "review", label: "Review", detail, done: reviewed });
|
||||
if ((r ? r.current && r.final.decided && r.final.verdict === "take" : verdict === "take") || has("merged") || it.state === "merged")
|
||||
if ((r ? r.current && r.final.verdict === "take" : verdict === "take") || has("merged") || it.state === "merged")
|
||||
out.push({ node: "merge", label: "Merge queue", detail: it.state === "merged" ? "merged" : "in the queue", done: it.state === "merged" });
|
||||
}
|
||||
return out;
|
||||
|
||||
@@ -103,7 +103,7 @@ function Verify({ v }: { v: ItemVerification }) {
|
||||
|
||||
const R_VERDICT: Record<ReviewVerdictName, [string, Tone]> = { take: ["Take", "ok"], "take-fix": ["Take with fixes", "ok"], hold: ["Hold", "warn"], close: ["Close", "bad"] };
|
||||
|
||||
function ReviewCard({ title, side, isFinal, extra, children }: { title: string; side: ReviewSide | null; isFinal: boolean; extra?: ReactNode; children?: ReactNode }) {
|
||||
function ReviewCard({ title, side, extra, children }: { title: string; side: ReviewSide | null; extra?: ReactNode; children?: ReactNode }) {
|
||||
useNow();
|
||||
const v = side && R_VERDICT[side.verdict];
|
||||
return (
|
||||
@@ -111,7 +111,6 @@ function ReviewCard({ title, side, isFinal, extra, children }: { title: string;
|
||||
<div className="flex flex-wrap items-center gap-2">
|
||||
<span className="font-medium">{title}</span>
|
||||
{v && <Badge tone={v[1]}>{v[0]}</Badge>}
|
||||
{isFinal && <Badge tone="accent">Final</Badge>}
|
||||
{side && <span className="ml-auto text-xs text-ink/50">{ago(side.at)} ago</span>}
|
||||
</div>
|
||||
{extra}
|
||||
@@ -154,30 +153,24 @@ function Reviews({ r }: { r: ItemReviews }) {
|
||||
return (
|
||||
<div>
|
||||
<div className="mb-2 flex flex-wrap items-center gap-2 text-sm">
|
||||
<span className="text-ink/55">Final verdict</span>
|
||||
<Badge tone={ftone}>{r.final.decided ? fv : "Waiting for the Opus review"}</Badge>
|
||||
<span className="text-ink/55">Verdict</span>
|
||||
<Badge tone={ftone}>{fv}</Badge>
|
||||
<span className="code text-xs text-ink/50" title={r.head}>{r.head.slice(0, 7)}</span>
|
||||
{!r.current && <Badge tone="warn">Older head</Badge>}
|
||||
</div>
|
||||
<div className="grid gap-3 md:grid-cols-2">
|
||||
<ReviewCard title="Sonnet, first pass" side={r.sonnet} isFinal={r.final.decided && r.final.source !== "opus"}>
|
||||
<p className="mt-2 text-ink/60">No review</p>
|
||||
</ReviewCard>
|
||||
<ReviewCard
|
||||
title="Opus, final review"
|
||||
side={o}
|
||||
isFinal={r.final.decided && r.final.source === "opus"}
|
||||
extra={
|
||||
o && (
|
||||
<p className="mt-1 text-xs text-ink/60">
|
||||
{o.sure ? "Sure" : "Unsure"} · {o.mode === "delta" ? `changes since ${(o.baseHead ?? "").slice(0, 7)}` : "full diff"}
|
||||
</p>
|
||||
)
|
||||
}
|
||||
>
|
||||
<p className="mt-2 text-ink/80">{r.skipReason ? `Skipped: ${r.skipReason}` : r.final.decided ? "No review" : "Waiting for the Opus review"}</p>
|
||||
</ReviewCard>
|
||||
</div>
|
||||
<ReviewCard
|
||||
title="Opus review"
|
||||
side={o}
|
||||
extra={
|
||||
o && (
|
||||
<p className="mt-1 text-xs text-ink/60">
|
||||
{o.sure ? "Sure" : "Unsure"} · {o.mode === "delta" ? `changes since ${(o.baseHead ?? "").slice(0, 7)}` : "full diff"}
|
||||
</p>
|
||||
)
|
||||
}
|
||||
>
|
||||
<p className="mt-2 text-ink/80">No review</p>
|
||||
</ReviewCard>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -21,7 +21,6 @@ export const STATE: Record<QueueState, [string, Tone, string]> = {
|
||||
"ci-failed": ["CI failed", "bad", "CI fails at this head"],
|
||||
conflict: ["Conflict", "bad", "Conflicts with the base branch"],
|
||||
"needs-fix-up": ["Needs fix-up", "warn", "The review lists small fixes; a later step makes them"],
|
||||
"waiting-opus": ["Waiting for Opus", "neutral", "Sonnet rated it take or take-fix; the final review by Opus is not done at this head yet"],
|
||||
"waiting-verify": ["Waiting for Verify", "neutral", "No passed verification at this head yet: the build tasks are planned or running"],
|
||||
"verify-failed": ["Verify failed", "bad", "The build or tests failed at this head"],
|
||||
"verify-error": ["Verify error", "warn", "Verification could not run; it is retried once, then held"],
|
||||
|
||||
+17
-20
@@ -54,20 +54,19 @@ export const STEPS: Step[] = [
|
||||
{ id: "act2", lane: "writes", row: 10, lines: ["Act", "comment, then close"], approval: "comment approval" },
|
||||
{ id: "hold1", lane: "operator", row: 11, lines: ["Hold", "waits for a person"] },
|
||||
{ id: "prfork", lane: "writes", row: 11, lines: ["Open PR from fork", "our fix, as a PR"], approval: "fix approval" },
|
||||
{ id: "review", lane: "models", row: 12, lines: ["Review (PRs)", "Sonnet first pass"] },
|
||||
{ id: "opus", lane: "models", row: 13, lines: ["Opus final review", "reads the repo"] },
|
||||
{ id: "verify", lane: "sandbox", row: 14, lines: ["Verify", "Sonnet plan, build + tests"] },
|
||||
{ id: "closeq", lane: "operator", row: 14, lines: ["Close this PR?", "close / hold / keep open"] },
|
||||
{ id: "fixup", lane: "writes", row: 14, lines: ["Fix-up", "Sonnet patch, Opus check"], approval: "push approval" },
|
||||
{ id: "vfail", lane: "models", row: 15, lines: ["Failure summary", "Haiku"] },
|
||||
{ id: "queue", lane: "auto", row: 15, lines: ["Merge queue", "rule met at this head?"] },
|
||||
{ id: "hold2", lane: "operator", row: 15, lines: ["Hold", "waits for a person"] },
|
||||
{ id: "ask", lane: "writes", row: 15, lines: ["Comment fixes", "asked the contributor"], approval: "comment approval" },
|
||||
{ id: "mergeq", lane: "operator", row: 16, lines: ["Merge?", "merge / hold / close"] },
|
||||
{ id: "push", lane: "contributor", row: 16, lines: ["Pushes a new head", "or answers"] },
|
||||
{ id: "act3", lane: "writes", row: 16, lines: ["Act", "comment, then close"], approval: "comment approval" },
|
||||
{ id: "batch", lane: "sandbox", row: 17, lines: ["Integration batch", "up to 10 PRs, sandbox check"] },
|
||||
{ id: "merge", lane: "writes", row: 18, lines: ["Merge", "batch PR, safe-merge --merge"], approval: "merge approval" },
|
||||
{ id: "review", lane: "models", row: 12, lines: ["Opus review", "reads the repo"] },
|
||||
{ id: "verify", lane: "sandbox", row: 13, lines: ["Verify", "Sonnet plan, build + tests"] },
|
||||
{ id: "closeq", lane: "operator", row: 13, lines: ["Close this PR?", "close / hold / keep open"] },
|
||||
{ id: "fixup", lane: "writes", row: 13, lines: ["Fix-up", "Sonnet patch, Opus check"], approval: "push approval" },
|
||||
{ id: "vfail", lane: "models", row: 14, lines: ["Failure summary", "Haiku"] },
|
||||
{ id: "queue", lane: "auto", row: 14, lines: ["Merge queue", "rule met at this head?"] },
|
||||
{ id: "hold2", lane: "operator", row: 14, lines: ["Hold", "waits for a person"] },
|
||||
{ id: "ask", lane: "writes", row: 14, lines: ["Comment fixes", "asked the contributor"], approval: "comment approval" },
|
||||
{ id: "mergeq", lane: "operator", row: 15, lines: ["Merge?", "merge / hold / close"] },
|
||||
{ id: "push", lane: "contributor", row: 15, lines: ["Pushes a new head", "or answers"] },
|
||||
{ id: "act3", lane: "writes", row: 15, lines: ["Act", "comment, then close"], approval: "comment approval" },
|
||||
{ id: "batch", lane: "sandbox", row: 16, lines: ["Integration batch", "up to 10 PRs, sandbox check"] },
|
||||
{ id: "merge", lane: "writes", row: 17, lines: ["Merge", "batch PR, safe-merge --merge"], approval: "merge approval" },
|
||||
];
|
||||
|
||||
export const EDGES: Edge[] = [
|
||||
@@ -93,9 +92,7 @@ export const EDGES: Edge[] = [
|
||||
{ from: "fix", to: "prfork", label: "patch" },
|
||||
{ from: "prfork", to: "review", label: "our PR" },
|
||||
{ from: "fix", to: "hold1", label: "no clear fix", dashed: true },
|
||||
{ from: "review", to: "opus", label: "take / take-fix", main: true },
|
||||
{ from: "review", to: "verify", label: "skip list", dashed: true },
|
||||
{ from: "opus", to: "verify", label: "take", main: true },
|
||||
{ from: "review", to: "verify", label: "take", main: true },
|
||||
{ from: "verify", to: "queue", label: "passed", main: true },
|
||||
{ from: "queue", to: "batch", label: "rule met", main: true },
|
||||
{ from: "batch", to: "merge", main: true },
|
||||
@@ -104,12 +101,12 @@ export const EDGES: Edge[] = [
|
||||
{ from: "mergeq", to: "batch", label: "merge", dashed: true },
|
||||
{ from: "verify", to: "vfail", label: "failed" },
|
||||
{ from: "vfail", to: "hold2" },
|
||||
{ from: "opus", to: "fixup", label: "take-fix" },
|
||||
{ from: "review", to: "fixup", label: "take-fix" },
|
||||
{ from: "fixup", to: "review", label: "new head" },
|
||||
{ from: "fixup", to: "ask", label: "cannot push" },
|
||||
{ from: "ask", to: "push" },
|
||||
{ from: "push", to: "review", label: "new head" },
|
||||
{ from: "opus", to: "hold2", label: "hold", dashed: true },
|
||||
{ from: "opus", to: "closeq", label: "close", dashed: true },
|
||||
{ from: "review", to: "hold2", label: "hold", dashed: true },
|
||||
{ from: "review", to: "closeq", label: "close", dashed: true },
|
||||
{ from: "closeq", to: "act3", label: "yes", dashed: true },
|
||||
];
|
||||
Reference in new issue
Block a user