Repository navigation
Description
This was generated by AI during a grill-with-docs session.
Grilled in docs/grill-with-docs/1484-implement-suite.md (Rounds 1–10). Decisions: ADR 0027 (a Trial carries out a Process but is not a Command) and ADR 0028 (who decides a Verdict is fixed in the Bar). Research: docs/research/eval-suite-scaling.md (Recommendations 13–18), docs/research/eval-build-vs-buy.md §8.1, docs/research/eval-process-arms-and-human-review.md. Question numbers such as Q3.1 refer to the grill file.
Problem Statement
No Eval suite tests the work a Ticket run does. The two suites test the code review and the Spec review, each as one session. So a change to the implement session, the Security review, the Built-in Ticket run's Process, or a Custom process starts no Experiment. #1526 (trim what an implement session reads) and the next planned change, an edit to the Ticket run's Steps and review prompts, can't be weighed before they reach the factory.
The Day shift has already compared the Built-in Ticket run against another process once, by hand and outside thirdshift. That took about 6,200 lines of bespoke tooling. thirdshift's own Experiments should do that kind of comparison, for thirdshift and for any other repository the factory serves.
Solution
A new Eval suite whose Trials carry out a Process end to end, and whose code Grader runs the real fix's tests against what the Trial produced.
- The Arm names a Process. An Arm is a thirdshift build plus the Process its Trials carry out, Built-in or Custom (Q2.1, Q3.3). A Custom process file and the home skills it loads are frozen into the Arm by content hash, and checked before every Trial.
- A Trial runs the Process up to Delivery. It carries out the Process's Steps on the Eval task's Ticket, in the Trial sandbox at a prepared base commit, and stops before the first publishing Step, Delivery or anything after it (Q3.1). It has no GitHub, no Claim and no pull request. Its record (Steps, sessions, outcome, usage, times) is filed under the Experiment (ADR 0027).
- Each Trial ends delivered, stopped-to-ask or failed. Stopped-to-ask counts as failed in the Verdict, and the counts are reported beside it (Q3.4).
- Tasks are real past work. Each is a merged Ticket's pull request, bug fix or feature, whose tests live in separate test files, fail at the base and pass at the merge (Q1.3–Q1.5). Each task records its provenance (
realfor now) and its environment (hostnow, with a container image for other repositories later; Q1.4, Q2.4). - The code Grader grades the Trial's own commit. It lays the fix's test files, and any shared test fakes the fix changed, over that commit. It then runs the fail-to-pass tests and the pass-to-pass tests in the same test targets, offline and under a time cap (Q1.5).
- Cost and time are accounted per session and role. They're priced from a frozen price table and reported beside the Verdict as paired median ratios. The Bar can set a cost or time ceiling. When quality passes and the Candidate is credibly cheaper or faster, the Verdict says so (Q3.5, Q6.2).
- A leak check. Each Trial's transcripts are searched for the real fix's identifiers, and a confirmed leak voids the Trial (Q2.5).
This Spec is the first of two. The second, blind pairwise grading by a Grader panel and by people, is blocked by this one. After this Spec lands, a standalone ready-for-human issue releases it and builds and measures the first tasks.
User Stories
- As the Day shift, I want an Experiment to compare the Built-in Ticket run with an edited Ticket run on past Tickets, so that I know whether an edit to its Steps or prompts makes the factory better or worse before it ships.
- As the Day shift, I want an Arm to name a Custom process file, so that I can compare a different Process with the Built-in one.
- As the Day shift, I want an Arm to carry the home skills its Custom process loads, so that a Process built on home skills can be compared even though Trials run with a fresh home.
- As the Day shift, I want every Arm's Process file and home skills recorded by content hash and checked before each Trial, so that a skill that changes mid-Experiment can't silently change an Arm.
- As the Day shift, I want a process Trial to run every Step up to Delivery, including the Security review, so that a change to any of those Steps is tested as the factory would run it.
- As the Day shift, I want a process Trial to run without GitHub, a Claim or a pull request, so that Experiments never touch real issues or show up as factory work.
- As the Day shift, I want a Trial's Steps, sessions, traces, outcome, usage and times kept under its Experiment and visible in the Console's run-detail and trace views, so that I can see where a Trial spent its time.
- As the Day shift, I want Trials never counted in the Console's run lists, Needs you, the Activity log, Scoring runs or Run metrics, so that factory figures stay about real work.
- As the Day shift, I want each Trial to end delivered, stopped-to-ask or failed, so that a Process that stops to ask a question is visible instead of hidden among failures.
- As the Day shift, I want stopped-to-ask counted as a failure in the Verdict, so that an unattended factory's Process is judged by what it delivers.
- As the Day shift, I want sandbox and plan-limit failures to remain Void Trials, so that outside failures don't count against an Arm.
- As the Day shift, I want an Eval task built from a merged Ticket's pull request, feature or bug fix, so that the suite looks like the work the factory actually does.
- As the Day shift, I want
evals prepareto refuse a task unless the fix's tests fail at the base and pass at the merge, so that every task's grading is known to work. - As the Day shift, I want a task refused when the fix's tests live inline in a source file, so that grading never overwrites the Trial's own code.
- As the Day shift, I want the shared test fakes a fix changed to be carried with its tests, so that the fix's tests compile against the Trial's commit.
- As the Day shift, I want candidate tasks proposed from recent merged pull requests, with their bug or feature kind and test layout, so that building the suite isn't manual digging.
- As the Day shift, I want each task to record its provenance, so that injected tasks can be added later and the Verdict split by provenance without a format change.
- As the Day shift, I want each task to name its environment, so that tasks from repositories with other toolchains can be added without a format change.
- As the Day shift, I want the code Grader to lay the fix's tests over the Trial's final commit and run the fail-to-pass and pass-to-pass tests offline, so that a Trial passes only if it built what the Ticket asked for without breaking neighbouring tests.
- As the Day shift, I want grading capped in time, so that a Trial that hangs the tests fails rather than stalling the Experiment.
- As the Day shift, I want the rule that voids a Trial for changing its repository to apply only to review Trials, so that implement Trials, which change it by design, aren't voided.
- As the Day shift, I want the suite started by changes to the implement, tdd, codebase-design, code-review and security-audit Factory skills, the Built-in process files, and the prompt, Harness, Model and Effort sources, so that every change that could alter a Ticket run's work is tested.
- As the Day shift, I want three Trials per Eval task in this suite, so that a flaky Trial costs a third of a task and Difficulty can be measured.
- As the Day shift, I want every session a Trial starts counted and priced from a frozen price table, with a role for each, so that I can see what a Process costs and where.
- As the Day shift, I want usage-limit stalls left out of a Trial's time, so that a plan limit doesn't make an Arm look slow.
- As the Day shift, I want a Trial with incomplete cost accounting made Void, so that a cost comparison never rests on missing sessions.
- As the Day shift, I want paired median cost and time ratios reported beside the Verdict, so that I can weigh quality against cost.
- As the Day shift, I want the estimate shown before an Experiment to come per Arm from that Arm's history, so that a multi-session Process's cost isn't underestimated.
- As the Day shift, I want an optional cost or time ceiling in the Bar, off by default, so that I can fix before an Experiment that a Candidate costing, say, more than twice the Baseline fails.
- As the Day shift, I want the Verdict to say "pass: no worse, and cheaper" (or "faster") when quality passes and the Candidate's paired ratio is credibly below 1, and to say so when it costs more, so that the adoption case is on the first line.
- As the Day shift, I want each Trial's transcripts searched for the real fix's pull-request and issue numbers, merge commit, branch and title, so that a Trial that found the answer is caught.
- As the Day shift, I want leak-check hits shown to me with an auditable list of dismissed false positives, and a confirmed leak to void the Trial, so that the check is trustworthy without being trigger-happy.
- As an operator of another repository, I want the task format and Arm configuration to assume nothing about thirdshift's own repository, so that the same suite design works for my repositories.
- As a thirdshift developer, I want the Process engine's use of GitHub, the Claim,
originand the pull request behind one seam, so that the same engine runs Steps for a Ticket run and for a Trial.
Implementation Decisions
- Prefactor first: one seam in the Process engine. Today, executing a Process's Steps needs GitHub, a Claim and a real
originall the way down. Branch selection, the Claim, worktree creation, pull-request construction, label reads, the untrusted-edit check and the issue hand-over before each session all call GitHub. The Security review needs an open pull request. Everything the engine does with the Ticket's source and its publication goes behind one interface. The factory implementation is today's behaviour, unchanged. The Trial implementation reads the Ticket from the task's issue file, uses the Trial's local origin, takes no Claim and has no pull request. Steps that need a pull request get a Trial stand-in or are refused, and the Security review runs against the Issue branch's diff. - The Trial entry point gains a process session kind. The Trial request names the Process, frozen in the Arm, plus the Harness, Model and Effort per Step. The Trial runs the Steps through the Process engine up to the first publishing Step. An Arm whose Process needs GitHub before that point is refused when the Experiment starts.
- Trial records. A Trial's record reuses the Command record's shape (Steps, sessions, outcome, usage, times) but is stored under the Experiment, per ADR 0027. Outcomes add delivered, stopped-to-ask and failed. The existing Void causes stay.
- Task format. A new process session kind, plus provenance (
real), environment (host) and the fix's test selection: the test files to overlay, the shared fakes, and the fail-to-pass and pass-to-pass test selectors. Unknown fields stay errors. Existing tasks load unchanged. - The code Grader for process tasks grades a copy of the Trial's final commit with the overlay applied, offline in bwrap, under the Bar's timeout. The existing review-Trial checks keep grading the sealed pre-session snapshot.
- The integrity rule that voids a Trial for changing its repository applies only to review session kinds.
- Arm preparation records, beside the build and Harness, the Process's name or file and each home skill, frozen by content hash, with the Harness, Model and Effort per Step. Every Trial gets the frozen copies in its fresh home, and a hash mismatch stops the Experiment before the Trial starts.
- Pricing. A frozen price table, dated and recorded with the Experiment, prices each session's tokens by Model. Sessions are attributed to a role (the Step that started them). Usage-limit stalls are subtracted from the time. Missing usage for any session voids the Trial.
- Bar additions. An optional cost ceiling and time ceiling, as ratios of Candidate to Baseline, off by default. The Verdict gains the cost and time line described in user story 30. The quality decision under ADR 0025 doesn't change.
- Leak check. Runs after each Trial over its transcripts. Hits wait for a Day-shift decision, recorded with who dismissed what. A confirmed leak is a Void Trial.
- Suite manifest. The new suite's dependencies: the implement, tdd, codebase-design, code-review and security-audit Factory skills; the Built-in process files; and the same Session prompt, Harness, Model and Effort entries as the other suites. Trials per Eval task: three.
- Admission is unchanged. Spec: judge Experiments only on discriminating Eval tasks #1477's Difficulty rule (at least six Trials, 0.15–0.95, Advisory below 20 discriminating) applies as it stands.
Testing Decisions
- Test external behaviour only: what an Experiment reports, what a Trial records, what a task preparation accepts or refuses. Not internal structure.
- Highest seam:
thirdshift experiment candidate --json, through the existing Experiment test fixture. It uses a local fixture repository, a fake Harness script that edits and commits, and the existing fake systemd tools. Most acceptance criteria are checked here. - The prefactor is covered by the existing Process and Ticket-run integration tests staying green, plus tests through the
--trialentry for the local implementation. - Task preparation is tested through
evals prepareagainst fixture repositories whose fix tests do and don't fail at the base, and do and don't live inline. - Prior art: the Experiment integration tests and their code-Grader, cost and sandbox submodules; the direct Trial tests; the Arm-preparation tests; and the Process tests with a fake
gh.
Out of Scope
- Blind pairwise grading: the Grader panel, the people's page, cross-tests and base-tests as evidence, and the Bar's panel and people settings. These are the second Spec.
- An external-runner Arm, a black-box command for a process thirdshift doesn't run itself. That's Spec: Custom-runner Arms for process Experiments #1468.
- A local stand-in for Delivery, CI or Repairs (Q3.1 (b)).
- Injected or Model-written tasks (Q1.4). Provenance is recorded so they can come later.
- Container images for other repositories' tasks. The format names the environment now, and images come with the first such task (Q2.4).
- Building and measuring the real tasks on a host, which needs this Spec released. That's a standalone
ready-for-humanissue blocked by this Spec. - The Kimi CLI Harness.
Further Notes
- About 60–65 usable real candidates came from the 19 days before 2026-11-09. At The code-review Eval suite can't tell Arms apart: 7 of its 10 tasks never pass #1434's rate of about one in three discriminating, that's roughly 20, so tasks from other repositories would help.
- Split the code review out of the implement Step, so a Process can change its reviews #1531 (split the code review out of the implement Step) isn't needed here. It matters to a Custom process that wants to change the reviews.
- A task's
AGENTS.mdandGLOSSARY.mdare as they were at its base commit. So a change to those files, such as Trim what an implement session reads before starting work, tested by an Experiment #1526's second candidate, isn't something this suite tests.
Activity
JacobStephens2 commentedon Oct 27, 2026
Disk and Docker are no longer constraints for this suite. The Day shift can provide a bigger host with room for container images. So the issue's "Host limits" (4 cores, 8 GB, about 32 GB free) aren't something the grill needs to plan around.
That puts these options on the table for the grill:
resolve_auth_filehelper reachesgrok-buildandopencode.What doesn't change: thirdshift keeps its own runner. Harnesses on subscription, Graders that can't tell which Arm produced an output, and the Verdict rule out a swap, not disk. The details are in
docs/research/eval-build-vs-buy.md§8.1, PR #1488.[-]Idea: an implement Eval suite[/-][+]Spec: process Trials and a code-graded implement Eval suite[/+]Merge pull request #1890 from JacobStephens2/eval-suite
Merge pull request #1909 from JacobStephens2/grill-1484-kimi-usage