Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .abcd/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@
"repo": {
"visibility": "public"
},
"review": {
"reviewers": [
"research",
"default"
]
},
"sessions": {
"live": "local"
},
Expand Down
4 changes: 3 additions & 1 deletion .abcd/development/brief/04-surfaces/34-build.md
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
11 changes: 7 additions & 4 deletions .abcd/development/brief/05-internals/03-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
@@ -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).
Original file line number Diff line number Diff line change
@@ -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.
Original file line number Diff line number Diff line change
@@ -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.
Original file line number Diff line number Diff line change
Expand Up @@ -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.
16 changes: 9 additions & 7 deletions commands/build.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -808,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
Expand Down
3 changes: 2 additions & 1 deletion commands/drain.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.<provider>` 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.<provider>` otherwise.
Expand Down
2 changes: 1 addition & 1 deletion commands/implement.md
Original file line number Diff line number Diff line change
Expand Up @@ -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-<n>/<role>/` and reviewer 1 at
`validate/round-<n>/<role>.1/`, each with its own brief and return, the two
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/cli/commands.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions internal/core/implement/loop/drive_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 "" }
Expand Down
52 changes: 52 additions & 0 deletions internal/core/implement/loop/land_approval_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package loop

import (
"encoding/json"
"fmt"
"github.com/intentdriven/abcd/internal/core/landing"
"github.com/intentdriven/abcd/internal/gitutil"
Expand Down Expand Up @@ -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
Expand Down
19 changes: 11 additions & 8 deletions internal/core/implement/loop/reviewset.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Loading
Loading