From eedc50c9ae31e50151f776cd799ce0710c33f45a Mon Sep 17 00:00:00 2001 From: REPPL <77722411+REPPL@users.noreply.github.com> Date: Thu, 3 Dec 2026 08:08:14 +0000 Subject: [PATCH 1/5] fix: run one reviewer per role by default, at the research class The bundled review set ran the research and default classes on every review role, so every repository abcd manages paid for two reviewers on every round unless it configured fewer. The bundled list is now the research class alone; review.reviewers stays the way to run two, and review.max_reviewers keeps its ceiling of two so a configured pair fits. abcd's own .abcd/config.json now names both classes in review.reviewers, so this repository keeps its pair. The build, drain and implement command pages, the build help text, the generated CLI reference and the review-set brief page say one by default. Refs: iss-2612021707229946 Assisted-by: Claude:claude-opus-5-5 --- .abcd/config.json | 6 ++ .../development/brief/04-surfaces/34-build.md | 4 +- ...1-the-loop-package-s-test-fixtures-keep.md | 6 ++ ...1460-with-the-bundled-review-set-at-one.md | 6 ++ ...2-the-drive-consent-test-keeps-its-name.md | 6 ++ commands/build.md | 14 ++-- commands/drain.md | 3 +- commands/implement.md | 2 +- docs/reference/cli/commands.md | 2 +- internal/core/implement/loop/drive_test.go | 11 +++ internal/core/implement/loop/reviewset.go | 19 ++--- .../core/implement/loop/reviewset_test.go | 72 ++++++++++++------- internal/surface/cli/build.go | 2 +- .../cli/build_reviewset_surface_test.go | 10 +-- .../surface/cli/drain_drive_reviewset_test.go | 13 ++-- internal/surface/cli/modelset_paths_test.go | 4 +- 16 files changed, 123 insertions(+), 57 deletions(-) create mode 100644 .abcd/work/decisions/dcn-2612030747430921-the-loop-package-s-test-fixtures-keep.md create mode 100644 .abcd/work/decisions/dcn-2612030747441460-with-the-bundled-review-set-at-one.md create mode 100644 .abcd/work/decisions/dcn-2612030747504322-the-drive-consent-test-keeps-its-name.md diff --git a/.abcd/config.json b/.abcd/config.json index 7640cb9629..16d3cca289 100644 --- a/.abcd/config.json +++ b/.abcd/config.json @@ -34,6 +34,12 @@ "repo": { "visibility": "public" }, + "review": { + "reviewers": [ + "research", + "default" + ] + }, "sessions": { "live": "local" }, diff --git a/.abcd/development/brief/04-surfaces/34-build.md b/.abcd/development/brief/04-surfaces/34-build.md index 2811fb8cda..62707a0ebc 100644 --- a/.abcd/development/brief/04-surfaces/34-build.md +++ b/.abcd/development/brief/04-surfaces/34-build.md @@ -1091,7 +1091,9 @@ layered reader, how many reviewers each code-review role runs, at which model class and at which effort, and keeps what it read whatever the files say later. The four classes are `research`, `top`, `default` and `small`, strongest first. `review.reviewers` is one or two classes for both roles or a list per role, -each role taking the highest layer that sets it, else the bundled `research` +each role taking the highest layer that sets it, else one reviewer by default, +at the bundled `research` class (iss-2612021707229946); a second reviewer is +the list's to ask for, as abcd's own `.abcd/config.json` does with `research` and `default`; `review.max_reviewers` is the machine's ceiling, 1 or 2 and 2 when unset, which clamps a longer list, with one line on stderr naming both files where the list is a repository's; diff --git a/.abcd/work/decisions/dcn-2612030747430921-the-loop-package-s-test-fixtures-keep.md b/.abcd/work/decisions/dcn-2612030747430921-the-loop-package-s-test-fixtures-keep.md new file mode 100644 index 0000000000..c65fdf8342 --- /dev/null +++ b/.abcd/work/decisions/dcn-2612030747430921-the-loop-package-s-test-fixtures-keep.md @@ -0,0 +1,6 @@ +--- +id: dcn-2612030747430921 +slug: the-loop-package-s-test-fixtures-keep +date: 2026-12-03 +--- +2026-12-03 — The loop package's test fixtures keep two reviewers per role by setting BundledReviewers to the research and default pair in TestMain, the pair abcd's own repository configures, rather than rewriting every judge, disagreement and two-out step test to write review.reviewers into its cached fixture world; the one test of the bundled set puts the shipped list back for its own run (iss-2612021707229946). diff --git a/.abcd/work/decisions/dcn-2612030747441460-with-the-bundled-review-set-at-one.md b/.abcd/work/decisions/dcn-2612030747441460-with-the-bundled-review-set-at-one.md new file mode 100644 index 0000000000..25cec7b376 --- /dev/null +++ b/.abcd/work/decisions/dcn-2612030747441460-with-the-bundled-review-set-at-one.md @@ -0,0 +1,6 @@ +--- +id: dcn-2612030747441460 +slug: with-the-bundled-review-set-at-one +date: 2026-12-03 +--- +2026-12-03 — With the bundled review set at one reviewer per role (iss-2612021707229946), review.max_reviewers keeps its bundled ceiling of two, so a repository's configured pair still fits on a machine that sets no ceiling, and the build page's example of a cheaper review becomes the default class alone, since a pair of smaller classes is no longer plainly cheaper than the bundled one. diff --git a/.abcd/work/decisions/dcn-2612030747504322-the-drive-consent-test-keeps-its-name.md b/.abcd/work/decisions/dcn-2612030747504322-the-drive-consent-test-keeps-its-name.md new file mode 100644 index 0000000000..445a02e8f5 --- /dev/null +++ b/.abcd/work/decisions/dcn-2612030747504322-the-drive-consent-test-keeps-its-name.md @@ -0,0 +1,6 @@ +--- +id: dcn-2612030747504322 +slug: the-drive-consent-test-keeps-its-name +date: 2026-12-03 +--- +2026-12-03 — The drive-consent test keeps its name, TestTheConsentNamesTheReviewPair, while its assertion moves to the bundled one reviewer (iss-2612021707229946), because the open spec spc-2611251805244246 names it among the tests its step rewrites. diff --git a/commands/build.md b/commands/build.md index 0d77dff0f4..320f4cde09 100644 --- a/commands/build.md +++ b/commands/build.md @@ -693,8 +693,10 @@ The four classes are named for what each is for, strongest first: `research`, - `review.reviewers`: a list of one or two classes for both roles, or an object naming a list per role (`{"security-reviewer": ["default"]}`); each role takes the highest layer that sets it (the repository's `.abcd/config.json`, then - `~/.abcd.noindex/config.json`), else the bundled pair, `research` and - `default`. + `~/.abcd.noindex/config.json`), else one reviewer by default, at the bundled + `research` class. Two reviewers per role are this key's to ask for: + `{"review": {"reviewers": ["research", "default"]}}` runs the research and + default classes side by side, the widest spread between two. - `review.judge`: one class, else the bundled `top`. A judge runs only once its agent has cleared itd-81's calibration gate, and none has yet. The bundled judge is stored with a status fixed when the run starts: `waiting` until an @@ -743,15 +745,15 @@ that sets `top` sets `research` as well. A review list naming `top`, while no configuration file names `research`, `default` or `small`, resolves, with one line on stderr saying which model `top` now stands for. -Every review round of every lane asks the strongest class once per review role, -at `high` effort, so the bundled pair costs more than a pair of smaller -classes. On a subscription the classes share one usage window, and an +With nothing configured, every review round of every lane asks the strongest +class once per review role, at `high` effort, and a configured pair asks it +beside the second class. On a subscription the classes share one usage window, and an unattended run reaches its limit sooner and waits there. The one line that sets a cheaper review, in `~/.abcd.noindex/config.json` or the repository's `.abcd/config.json`: ```json -{"review": {"reviewers": ["default", "small"]}} +{"review": {"reviewers": ["default"]}} ``` A class map for a second provider points each class at that provider's models diff --git a/commands/drain.md b/commands/drain.md index d85d9f9574..b8389f0bdb 100644 --- a/commands/drain.md +++ b/commands/drain.md @@ -70,7 +70,8 @@ naming the model. Map a class to it in `models.classes` and start the drive agai runner settings, each `oracle.api.` block and the `oracle.denylist` are read once, at the drive's start, and hold until the drive ends: a change to one of those takes effect at the next start, and the start says so. The review set (`review.*` and `models.effort`) is read -again as each run starts, as the class map is. A review set with a reviewer +again as each run starts, as the class map is. By default it is one reviewer per review +role, at the `research` class; `review.reviewers` runs two (`commands/build.md`). A review set with a reviewer no route on this machine can launch refuses the start, before anything is reserved, naming the role, the model and what to set: the denylist entry or `models.classes` for a model an entry refuses, `oracle.api.` otherwise. diff --git a/commands/implement.md b/commands/implement.md index a8d7d1302e..15c1e07e8c 100644 --- a/commands/implement.md +++ b/commands/implement.md @@ -620,7 +620,7 @@ ceiling, and writes a fix brief only once every validator of the round has returned; it records each verdict from the validator's own return; the fidelity audit passes only when every criterion is met, so an undecided (`INCONCLUSIVE`) criterion sends the lane to a fresh implementer as a not-met one does. Each reviewer role runs -the reviewers the run's review set names for it (`commands/build.md`, two by +the reviewers the run's review set names for it (`commands/build.md`, one by default), handed out in consecutive steps on the round's one head, each taking a slot: the role's reviewer 0 at `validate/round-//` and reviewer 1 at `validate/round-/.1/`, each with its own brief and return, the two diff --git a/docs/reference/cli/commands.md b/docs/reference/cli/commands.md index dd7c37803f..2cfc95390a 100644 --- a/docs/reference/cli/commands.md +++ b/docs/reference/cli/commands.md @@ -629,7 +629,7 @@ handed back: it stops as unachievable with the last round's findings, the run st further for it, and `abcd implement step` refuses naming the hand-back. A new run reads its review set once, too: review.reviewers (one or two model classes per -code-review role, for both roles or per role; bundled: research and default), review.judge +code-review role, for both roles or per role; bundled: research alone), review.judge (a class; bundled: top, which waits until a judge agent clears itd-81's calibration gate, fixed at the run's start, and a judge a file names is refused until then) and, from ~/.abcd.noindex/config.json alone, review.max_reviewers (1 or 2, bundled 2) and the class map diff --git a/internal/core/implement/loop/drive_test.go b/internal/core/implement/loop/drive_test.go index 1c6e40ada6..12d707a4f5 100644 --- a/internal/core/implement/loop/drive_test.go +++ b/internal/core/implement/loop/drive_test.go @@ -58,11 +58,22 @@ const ( loopFakeReceiptModel = "claude-opus-5-5" ) +// shippedReviewers is BundledReviewers as the binary ships it, kept before +// TestMain gives the package's fixtures the pair. +var shippedReviewers []string + func TestMain(m *testing.M) { if mode := os.Getenv(loopFakeEnv); mode != "" { os.Exit(loopFakeHarness(mode)) } announceBeforePush = noAnnouncement + // The package's fixtures run two reviewers per role, the pair abcd's own + // repository configures in review.reviewers: the judge, the disagreement + // and the two-out step tests need a pair, and the bundled default is one + // (iss-2612021707229946). The test of the bundled set puts the shipped + // list back for its own run. + shippedReviewers = BundledReviewers + BundledReviewers = []string{ClassResearch, ClassDefault} // A stop on the machine running the tests stops no test: a test of the stop // names its own fixture home (stop_test.go). defaultStopHome = func() string { return "" } diff --git a/internal/core/implement/loop/reviewset.go b/internal/core/implement/loop/reviewset.go index 5a61ca9483..f19741c52c 100644 --- a/internal/core/implement/loop/reviewset.go +++ b/internal/core/implement/loop/reviewset.go @@ -10,8 +10,9 @@ package loop // // - review.reviewers is a list of one or two classes, for both roles, or an // object naming a list per role ({"security-reviewer": [...]}); each role -// takes the highest layer that sets it, else the bundled pair (research -// and default, itd-2611101419006280 decision 4). +// takes the highest layer that sets it, else the bundled one reviewer at +// the research class (iss-2612021707229946); a second reviewer is the +// list's to ask for. // - review.judge is one class, else the bundled top. A judge runs only once // its agent has cleared itd-81's calibration gate, so the bundled judge is // stored waiting, or active once the gate has cleared, decided once when @@ -101,13 +102,15 @@ var BundledClasses = map[string]string{ ClassSmall: "anthropic/claude-haiku-4-5", } -// BundledReviewers is the bundled list each role runs: the research class and -// the default class, the widest spread between two reviewers -// (itd-2611101419006280 decision 4, reversing the top and default pair of -// itd-2610240922461281 decision 1). -var BundledReviewers = []string{ClassResearch, ClassDefault} +// BundledReviewers is the bundled list each role runs: one reviewer, at the +// research class (iss-2612021707229946). It was the research and default pair +// (itd-2611101419006280 decision 4), which every repository paid for on every +// round; the default is now one, and a repository or machine that wants two +// names them in review.reviewers, as abcd's own .abcd/config.json does. +var BundledReviewers = []string{ClassResearch} -// BundledJudge is the bundled judge's class: the class between the pair. It +// BundledJudge is the bundled judge's class: the class between the research +// and default pair a repository may configure. It // runs only once a judge agent has cleared itd-81's calibration gate, and // until then a run starts with it waiting (decision 5). const BundledJudge = ClassTop diff --git a/internal/core/implement/loop/reviewset_test.go b/internal/core/implement/loop/reviewset_test.go index b0ee105d8c..39ad75837f 100644 --- a/internal/core/implement/loop/reviewset_test.go +++ b/internal/core/implement/loop/reviewset_test.go @@ -52,57 +52,75 @@ func reviewRecord(t *testing.T, st State) string { return "" } -// TestTheBundledReviewSetIsTwoReviewersPerRole: with no review set in any -// layer, each reviewer role runs twice, at the research class and the default -// class (itd-2611101419006280 decision 4), each class named with the model the -// bundled map holds for it, the judge is the top class and waits on -// calibration, and the payload, the state and the record name the bundled -// layer. -func TestTheBundledReviewSetIsTwoReviewersPerRole(t *testing.T) { +// TestTheBundledReviewSetIsOneReviewerPerRole: with no review set in any +// layer, each reviewer role runs once, at the research class +// (iss-2612021707229946, narrowing itd-2611101419006280 decision 4; a second +// reviewer is review.reviewers' to ask for), named with the model the bundled +// map holds for it, the judge is the top class and waits on calibration, and +// the payload, the state and the record name the bundled layer. The package's +// fixtures run the pair abcd's own repository configures (TestMain), so this +// test puts the shipped list back for its own run. +func TestTheBundledReviewSetIsOneReviewerPerRole(t *testing.T) { + fixture := BundledReviewers + BundledReviewers = shippedReviewers + t.Cleanup(func() { BundledReviewers = fixture }) repo := loopRepo(t, readyIntent("", settledQuestions), specWithSteps("")) - res, err := startedOnce(t, repo, "itd-10") + res, err := Start(repo.Root(), "itd-10", Options{}) if err != nil { t.Fatal(err) } - for _, rs := range []*ReviewSet{res.Review} { - for _, role := range []string{RoleRuthless, RoleSecurity} { - r := reviewRole(t, rs, role) - if got := strings.Join(classesOf(r), ","); got != "research,default" || r.Layer != "bundled" || r.Origin != "bundled" { - t.Fatalf("%s = %+v, want research,default from the bundled layer", role, r) - } - if r.Reviewers[0].Model != BundledClasses[ClassResearch] || r.Reviewers[1].Model != BundledClasses[ClassDefault] || - r.Reviewers[0].MapLayer != "bundled" { - t.Fatalf("each class names the model the bundled map holds: %+v", r.Reviewers) - } - } - j := rs.Judge - if j == nil || j.Class != ClassTop || j.Model != BundledClasses[ClassTop] || j.Layer != "bundled" || j.Status != JudgeWaiting || j.Active() { - t.Fatalf("the bundled judge is top, waiting: %+v", j) + for _, role := range []string{RoleRuthless, RoleSecurity} { + r := reviewRole(t, res.Review, role) + if got := strings.Join(classesOf(r), ","); got != "research" || r.Layer != "bundled" || r.Origin != "bundled" { + t.Fatalf("%s = %+v, want research alone from the bundled layer", role, r) } - if rs.MaxReviewers.Value != 2 || rs.MaxReviewers.Layer != "bundled" { - t.Fatalf("a ceiling of two by default: %+v", *rs) + if r.Reviewers[0].Model != BundledClasses[ClassResearch] || r.Reviewers[0].MapLayer != "bundled" { + t.Fatalf("the class names the model the bundled map holds: %+v", r.Reviewers) } } + j := res.Review.Judge + if j == nil || j.Class != ClassTop || j.Model != BundledClasses[ClassTop] || j.Layer != "bundled" || j.Status != JudgeWaiting || j.Active() { + t.Fatalf("the bundled judge is top, waiting: %+v", j) + } + if res.Review.MaxReviewers.Value != 2 || res.Review.MaxReviewers.Layer != "bundled" { + t.Fatalf("the ceiling stays two, so a configured pair still fits: %+v", *res.Review) + } st, err := ReadState(repo.Root(), res.RunID) if err != nil { t.Fatal(err) } - if got := strings.Join(classesOf(reviewRole(t, st.Review, RoleSecurity)), ","); got != "research,default" { + if got := strings.Join(classesOf(reviewRole(t, st.Review, RoleSecurity)), ","); got != "research" { t.Fatalf("the state keeps the set: %s", got) } if st.Review.Judge == nil || st.Review.Judge.Status != JudgeWaiting { t.Fatalf("the state keeps the judge waiting: %+v", st.Review.Judge) } note := reviewRecord(t, st) - for _, want := range []string{"research (" + BundledClasses[ClassResearch], "default (" + BundledClasses[ClassDefault], "bundled", - "judge top (" + BundledClasses[ClassTop]} { + for _, want := range []string{"research (" + BundledClasses[ClassResearch], "bundled", "judge top (" + BundledClasses[ClassTop]} { if !strings.Contains(note, want) { t.Fatalf("the record names %q: %q", want, note) } } + if strings.Contains(note, "default (") { + t.Fatalf("the record names no second reviewer: %q", note) + } if len(res.Diagnostics) != 0 { t.Fatalf("the bundled set says nothing on stderr: %q", res.Diagnostics) } + + // review.reviewers stays the way to run two: abcd's own repository names + // both classes, and each role runs the pair from the repository's layer. + os.RemoveAll(filepath.Join(repo.Root(), filepath.FromSlash(RunRelDir))) + repoConfig(t, repo, `{"review": {"reviewers": ["research", "default"]}}`) + res, err = Start(repo.Root(), "itd-10", Options{}) + if err != nil { + t.Fatal(err) + } + for _, role := range []string{RoleRuthless, RoleSecurity} { + if r := reviewRole(t, res.Review, role); strings.Join(classesOf(r), ",") != "research,default" || r.Layer != "repo" || r.Clamped != 0 { + t.Fatalf("%s runs the configured pair: %+v", role, r) + } + } } // TestTheReviewSetPayloadNamesEachValuesLayer: a machine list, a repository diff --git a/internal/surface/cli/build.go b/internal/surface/cli/build.go index 1ed4cec42b..240db9027c 100644 --- a/internal/surface/cli/build.go +++ b/internal/surface/cli/build.go @@ -179,7 +179,7 @@ func newBuildCommand(asJSON *bool) *cobra.Command { "handed back: it stops as unachievable with the last round's findings, the run starts nothing\n" + "further for it, and `abcd implement step` refuses naming the hand-back.\n\n" + "A new run reads its review set once, too: review.reviewers (one or two model classes per\n" + - "code-review role, for both roles or per role; bundled: research and default), review.judge\n" + + "code-review role, for both roles or per role; bundled: research alone), review.judge\n" + "(a class; bundled: top, which waits until a judge agent clears itd-81's calibration gate,\n" + "fixed at the run's start, and a judge a file names is refused until then) and, from\n" + abcdhome.Display("config.json") + " alone, review.max_reviewers (1 or 2, bundled 2) and the class map\n" + diff --git a/internal/surface/cli/build_reviewset_surface_test.go b/internal/surface/cli/build_reviewset_surface_test.go index 085d3d2b45..ae010fa237 100644 --- a/internal/surface/cli/build_reviewset_surface_test.go +++ b/internal/surface/cli/build_reviewset_surface_test.go @@ -16,8 +16,8 @@ import ( // with the model it holds, and says a clamp on stderr. // TestBuildNamesTheBundledReviewSet: with no configuration the payload's -// review, a sibling of pace, carries two reviewers per role from the bundled -// layer, each with its effort, and the judge with its status; the text, the +// review, a sibling of pace, carries one reviewer per role, at the research +// class, from the bundled layer (iss-2612021707229946), with its effort, and the judge with its status; the text, the // status and the record name each class with its model and its effort, and // never a class name alone (itd-2611101419006280). func TestBuildNamesTheBundledReviewSet(t *testing.T) { @@ -44,8 +44,8 @@ func TestBuildNamesTheBundledReviewSet(t *testing.T) { t.Fatalf("the payload carries the review set and no diagnostics: %s", out) } for _, r := range res.Review.Roles { - if len(r.Reviewers) != 2 || r.Reviewers[0].Class != "research" || r.Reviewers[1].Class != "default" || r.Layer != "bundled" { - t.Fatalf("%s runs research and default from the bundled layer: %s", r.Role, out) + if len(r.Reviewers) != 1 || r.Reviewers[0].Class != "research" || r.Layer != "bundled" { + t.Fatalf("%s runs research alone from the bundled layer: %s", r.Role, out) } for _, c := range r.Reviewers { if c.Model == "" || c.Effort != "high" || c.EffortLayer != "bundled" { @@ -56,7 +56,7 @@ func TestBuildNamesTheBundledReviewSet(t *testing.T) { if j := res.Review.Judge; j == nil || j.Class != "top" || j.Model != "anthropic/claude-opus-5-5" || j.Effort != "high" || j.Status != "waiting" { t.Fatalf("the judge carries its model, effort and status: %s", out) } - want := "ruthless-reviewer research (anthropic/claude-fable-5, effort high) and default (anthropic/claude-sonnet-5-5, effort high) (bundled)" + want := "ruthless-reviewer research (anthropic/claude-fable-5, effort high) (bundled)" judge := "judge top (anthropic/claude-opus-5-5, effort high) (bundled), waiting" status := mustImplement(t, "implement", "status") record := mustImplement(t, "implement", "record") diff --git a/internal/surface/cli/drain_drive_reviewset_test.go b/internal/surface/cli/drain_drive_reviewset_test.go index 25d482edcf..9162be5124 100644 --- a/internal/surface/cli/drain_drive_reviewset_test.go +++ b/internal/surface/cli/drain_drive_reviewset_test.go @@ -5,9 +5,11 @@ import ( "testing" ) -// TestTheConsentNamesTheReviewPair: a drive's start names the pair it will +// TestTheConsentNamesTheReviewPair: a drive's start names the reviewers it will // run, each class with its model and effort, and the judge with its status, -// before it asks to start (itd-2611101419006280 decision 8). +// before it asks to start (itd-2611101419006280 decision 8); with nothing +// configured that is one reviewer per role, at the research class +// (iss-2612021707229946). func TestTheConsentNamesTheReviewPair(t *testing.T) { w := newDriveWorld(t) w.passWalls(t) @@ -24,12 +26,15 @@ func TestTheConsentNamesTheReviewPair(t *testing.T) { line = l } } - for _, want := range []string{"ruthless-reviewer and security-reviewer", "research (anthropic/claude-fable-5, effort high)", - "default (anthropic/claude-sonnet-5-5, effort high)", "judge top (anthropic/claude-opus-5-5, effort high), waiting"} { + for _, want := range []string{"ruthless-reviewer and security-reviewer: research (anthropic/claude-fable-5, effort high);", + "judge top (anthropic/claude-opus-5-5, effort high), waiting"} { if !strings.Contains(line, want) { t.Fatalf("the consent's review line names %q:\n%s", want, text) } } + if strings.Contains(line, "default (") { + t.Fatalf("the consent names no second reviewer:\n%s", text) + } if strings.Index(text, " review:") > strings.Index(text, "Start? [y/N]") { t.Fatalf("the pair is named before the question:\n%s", text) } diff --git a/internal/surface/cli/modelset_paths_test.go b/internal/surface/cli/modelset_paths_test.go index dc428229d5..c23467b034 100644 --- a/internal/surface/cli/modelset_paths_test.go +++ b/internal/surface/cli/modelset_paths_test.go @@ -68,8 +68,8 @@ func TestImplementStatusJSONCarriesEffortsAndTheJudge(t *testing.T) { } rv := res.Runs[0].Review for _, r := range rv.Roles { - if len(r.Reviewers) != 2 || r.Reviewers[0].Class != loop.ClassResearch || r.Reviewers[1].Class != loop.ClassDefault { - t.Fatalf("%s runs research and default: %s", r.Role, out) + if len(r.Reviewers) != 1 || r.Reviewers[0].Class != loop.ClassResearch { + t.Fatalf("%s runs research alone, the bundled one reviewer: %s", r.Role, out) } for _, c := range r.Reviewers { if c.Model != loop.BundledClasses[c.Class] || c.Effort != loop.BundledEffort { From 407a2d1bbe18f5b1dbb6b4ac698144f2ee620e62 Mon Sep 17 00:00:00 2001 From: REPPL <77722411+REPPL@users.noreply.github.com> Date: Thu, 3 Dec 2026 08:08:33 +0000 Subject: [PATCH 2/5] chore: resolve the bundled review set's two reviewers Resolves: iss-2612021707229946 Assisted-by: Claude:claude-opus-5-5 --- .../iss-2612021707229946-the-bundled-review-set-runs-two.md | 4 ++++ 1 file changed, 4 insertions(+) rename .abcd/work/issues/{open => resolved}/iss-2612021707229946-the-bundled-review-set-runs-two.md (83%) diff --git a/.abcd/work/issues/open/iss-2612021707229946-the-bundled-review-set-runs-two.md b/.abcd/work/issues/resolved/iss-2612021707229946-the-bundled-review-set-runs-two.md similarity index 83% rename from .abcd/work/issues/open/iss-2612021707229946-the-bundled-review-set-runs-two.md rename to .abcd/work/issues/resolved/iss-2612021707229946-the-bundled-review-set-runs-two.md index c5409fadf6..3f412e384a 100644 --- a/.abcd/work/issues/open/iss-2612021707229946-the-bundled-review-set-runs-two.md +++ b/.abcd/work/issues/resolved/iss-2612021707229946-the-bundled-review-set-runs-two.md @@ -10,6 +10,10 @@ origin: researcher-authored production_mode: hand-written found_at: "internal/core/implement/loop/reviewset.go" remedy: "Make the bundled review set one reviewer per role at the research class, keep review.reviewers as the way to run two, and in the same change write review.reviewers with both classes into abcd's own .abcd/config.json so this repository keeps its pair; update the drain and build pages and the review-set brief page to say one by default." +resolution: "The bundled review set is one reviewer per role at the research class; review.reviewers runs two, and abcd's own .abcd/config.json names research and default so this repository keeps its pair." +impact: fix +resolved_by: + commit: "eedc50c9a" --- The bundled review set runs two reviewers per review role (research and default classes, BundledReviewers in internal/core/implement/loop/reviewset.go, set by decision 4 of itd-2611101419006280), so every repository abcd manages pays for two reviewers on every round unless it configures fewer. The product thinker ruled on 2 December that the default is one reviewer, with more configurable. abcd's own repository wants two, but it sets no review.reviewers and relies on the bundled pair, so changing the default alone would silently halve its reviews. From 4b93a35c05056c023dc2ef64e77c48731c862757 Mon Sep 17 00:00:00 2001 From: REPPL <77722411+REPPL@users.noreply.github.com> Date: Thu, 3 Dec 2026 08:15:25 +0000 Subject: [PATCH 3/5] test: land an auto-mode lane on the shipped one reviewer per role The shipped review set gives an auto-mode round one ruthless and one security return, exactly the receipt's minimum of two. A land test now runs that path and checks the loop records its own review from both returns and arms the lane. The build page's budget sentence says a round of each review role's reviewers rather than of the two reviewers. Refs: iss-2612021707229946 Assisted-by: Claude:claude-opus-5-5 --- commands/build.md | 2 +- .../core/implement/loop/land_approval_test.go | 52 +++++++++++++++++++ 2 files changed, 53 insertions(+), 1 deletion(-) diff --git a/commands/build.md b/commands/build.md index 320f4cde09..50e38da307 100644 --- a/commands/build.md +++ b/commands/build.md @@ -810,7 +810,7 @@ compared). Last, once every other check passes, the budget check asks each runner a role of the run is routed to (below) for its remaining quota, in agent runs, and compares the run's estimate on it: per step to build, one implementer and one -round of the two reviewers, and the fidelity audit once for an intent. An +round of each review role's reviewers, and the fidelity audit once for an intent. An estimate over a runner's quota is refused with exit 2 at the check `budget`, naming both numbers, and nothing is written. A runner that reports no quota, the host included, is named and the check is skipped out loud; neither shipped diff --git a/internal/core/implement/loop/land_approval_test.go b/internal/core/implement/loop/land_approval_test.go index fa32a26901..f82e87d526 100644 --- a/internal/core/implement/loop/land_approval_test.go +++ b/internal/core/implement/loop/land_approval_test.go @@ -1,6 +1,7 @@ package loop import ( + "encoding/json" "fmt" "github.com/intentdriven/abcd/internal/core/landing" "github.com/intentdriven/abcd/internal/gitutil" @@ -716,6 +717,57 @@ func TestHumanModeRecordsNoReviewOfTheLoops(t *testing.T) { } } +// TestTheShippedOneReviewerPerRoleRecordsItsOwnReview: with the review set +// as the binary ships it, one reviewer per role at the research class +// (iss-2612021707229946), an auto-mode lane's round has one ruthless and one +// security return, which together meet the receipt's minimum of two with no +// margin: the loop records its own review from both, and the lane arms +// itself. +func TestTheShippedOneReviewerPerRoleRecordsItsOwnReview(t *testing.T) { + fixture := BundledReviewers + BundledReviewers = shippedReviewers + t.Cleanup(func() { BundledReviewers = fixture }) + t.Setenv("HOME", t.TempDir()) + f := newLandFixtureWith(t, map[string]string{ + ".abcd/work/rulesets/main-protection.json": unreviewedQueueRuleset("MERGE"), + ".abcd/config.json": `{"facilitator":{"mode":"auto"}}` + "\n", + // The world is cached by its files: this one is built on the shipped list. + "notes/shipped-review-set.md": "One reviewer per role.\n", + }) + st, err := ReadState(f.repo.Root(), f.runID) + if err != nil { + t.Fatal(err) + } + for _, role := range []string{RoleRuthless, RoleSecurity} { + if rv := roundReviewers(st, role); len(rv) != 1 || rv[0].Class != ClassResearch { + t.Fatalf("premise: the shipped set runs one %s at research: %+v", role, rv) + } + } + f.validated(t) + f.step(t) + f.step(t) + f.recordsRound(t, "SHIP", "APPROVE") + f.step(t) + l := f.pushToArm(t) + if !strings.Contains(f.ghLog(t), "pr merge 7 --auto --merge") || l.Landing == nil || !l.Landing.Armed { + t.Fatalf("a lane whose one reviewer per role passed arms itself: %+v\n%s", l.Landing, f.ghLog(t)) + } + raw, err := os.ReadFile(filepath.Join(f.repo.Root(), ".abcd", ".work.local", "review-receipts", l.Landing.Pushed)) + if err != nil { + t.Fatalf("the loop records its own review of the pushed head: %v", err) + } + var rec struct { + Reviews []struct{ Name, Verdict string } + } + if err := json.Unmarshal(raw, &rec); err != nil { + t.Fatal(err) + } + if len(rec.Reviews) != 2 || !strings.Contains(rec.Reviews[0].Name, RoleRuthless) || rec.Reviews[0].Verdict != "SHIP" || + !strings.Contains(rec.Reviews[1].Name, RoleSecurity) || rec.Reviews[1].Verdict != "APPROVE" { + t.Fatalf("the receipt holds the ruthless and the security return: %s", raw) + } +} + // TestThisRepositorysOwnMirrorAndConfigArm: this repository's committed // mirror and .abcd/config.json, with the head approved and a pair that read it, arm by the queue's method, so the merge gate keeps this // project's landings queueing in either mode. It reads every CODEOWNERS path From 41250e8189c511da12919c2f9eaa4b0e72d53a2e Mon Sep 17 00:00:00 2001 From: REPPL <77722411+REPPL@users.noreply.github.com> Date: Thu, 3 Dec 2026 09:02:38 +0000 Subject: [PATCH 4/5] test: pin the build page's cheaper review at the default class alone The build page's example of a cheaper review became the default class alone when the bundled set dropped to one reviewer per role, and the page test still looked for the default and small pair. Refs: iss-2612021707229946 Assisted-by: Claude:claude-opus-5-5 --- internal/surface/cli/build_modelset_page_test.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/surface/cli/build_modelset_page_test.go b/internal/surface/cli/build_modelset_page_test.go index 0661817c4f..7bf71d107f 100644 --- a/internal/surface/cli/build_modelset_page_test.go +++ b/internal/surface/cli/build_modelset_page_test.go @@ -33,7 +33,9 @@ func TestBuildPageCarriesTheModelSet(t *testing.T) { "`top` is now `research`, `middle` is `top`, `below` is `default` and `smallest` is `small`", "`models.effort`", "`low`, `medium`, `high`, `xhigh` and `max`", - `{"review": {"reviewers": ["default", "small"]}}`, + // The cheaper review is the default class alone, now that the bundled + // set is one reviewer per role (iss-2612021707229946). + `{"review": {"reviewers": ["default"]}}`, "A class map for a second provider", `"research": "openrouter/`, `"small": "openrouter/`, From 1473957bd85c565cbfe1752b44c063869e64eaed Mon Sep 17 00:00:00 2001 From: REPPL <77722411+REPPL@users.noreply.github.com> Date: Thu, 3 Dec 2026 10:00:19 +0000 Subject: [PATCH 5/5] docs: name the review block among this repository's config blocks abcd's own .abcd/config.json now carries a review block, so the configuration chapter says it carries eleven blocks, lists review among those set by hand, and says it holds the review pair. Refs: iss-2612021707229946 Assisted-by: Claude:claude-opus-5-5 --- .../brief/05-internals/03-configuration.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.abcd/development/brief/05-internals/03-configuration.md b/.abcd/development/brief/05-internals/03-configuration.md index d00caac9cd..c11ff1ae83 100644 --- a/.abcd/development/brief/05-internals/03-configuration.md +++ b/.abcd/development/brief/05-internals/03-configuration.md @@ -347,10 +347,13 @@ readers claim it from one list that names the one layer holding each key, so a key the person's machine holds there later is never mistaken for this one. There is no separate `.abcd/meta.json` at repo scope: setup metadata is the `meta` -block. This repository's own config carries ten of these blocks — `docs`, -`facilitator`, `meta`, `oracle`, `outbound`, `readme`, `release`, `repo`, `sessions` and `status`. All -but `facilitator`, `release` and `status`, which this repository sets by hand for its own -merging, release cuts and scheduled workflow, are what an unremarkable managed repo carries. +block. This repository's own config carries eleven of these blocks — `docs`, +`facilitator`, `meta`, `oracle`, `outbound`, `readme`, `release`, `repo`, `review`, `sessions` +and `status`. All but `facilitator`, `release`, `review` and `status`, which this repository +sets by hand for its own merging, release cuts, review pair and scheduled workflow, are what an +unremarkable managed repo carries; `review` holds `review.reviewers` naming the `research` and +`default` classes, so this repository runs two reviewers per role where the bundled set runs +one (iss-2612021707229946). ### The provider adapter's keys