Eval graders treat the agent's repo as hostile, plus two more team-learned habits (GST-3354) (#4602)

Eval plans now say a grader that runs git in an agent's repo works on a
sanitized copy with no config, hooks or API keys; the agents' start card
says to find a drive copy in its version history before deleting the
source; and each eval result row takes its model from the captured
requests.

Why: one team reproduced a planted git setting running code next to the
key-holding proxy, and two lost drive writes. Nothing to do as a reader.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
This commit is contained in:
Garry Tanandcapy-ai[bot] authored and GitHub committed 2026-11-21 08:37:12 +00:00
1 parent c0fd3bfd14
commit 6af4d8a03f
7 files changed
+33 -6

No files matched your search

+1
View File
@@ -10,6 +10,7 @@ For a crew lane (a thread working for a Captain). Read this once `gstack: ok <re
- Every subagent runs its own `--check` and puts its trailer in its first report; a read-only reviewer uses `--for review-voice`. One machine's install never covers another.
- A workflow that prints `INSTALL: fail …` and exits 3 refuses this install: run its fix and start again. A planning-only install does not admit `review`, `ship` or `qa`; run `--for <that skill>` first.
- Run directories and scratch live under `~/.capy/work/<name>`, never `/tmp`, which Capy wipes when a machine sleeps.
- A write into a drive mount can succeed locally while the drive never keeps it: before you delete a source because the copy is in the drive, find that copy in the drive's version history (`tools.drive.history`).
## Plan, approve, ship
+1
View File
@@ -0,0 +1 @@
**Three more habits from teams that run evals.** `/eval-plan` says a grader that runs git inside an agent's repo treats that repo as hostile: a sanitized copy of `.git` with no config, hooks, attributes, textconv or signature display, the original index timestamps, no API keys in its environment, and a test that plants each setting. The agents' start card says to find a drive copy in the drive's version history before deleting its source. `docs/working-across-agent-systems.md` says to take each result row's model from the requests the run captured, on every scored row, timeouts included.
+5 -3
View File
@@ -42,9 +42,11 @@ What we learned, in short:
6. **Pin the other harness's version and model.** A coding-agent CLI can change its default model in a
release. Name the version and the model in every brief and every eval plan. Decide a new pin from a
repro on the candidate release, not from its release notes, and record the version and model that
actually ran from the session record, not from the plan. In one team's case a fix merged upstream was
missing from the next stable build, and a release that fixed one bug dropped turns in three of three
runs; in another, a CLI release changed its default model.
actually ran from the session record, not from the plan. Take each result row's model from the
requests the run captured, on every scored row, timeouts included. In one team's case a fix merged
upstream was missing from the next stable build, and a release that fixed one bug dropped turns in
three of three runs; in another, a CLI release changed its default model, and a model check that
skipped timed-out rows would have let a timeout on the wrong model into a paired comparison.
## Keep runs cheap
+11 -1
View File
@@ -160,7 +160,7 @@ Write (or open) the preregistration file. Each section is required and must be f
| Interim look | only when `paid:` is above 500 dollars: `at: 50%`, `looks: 1`, `bounds: O'Brien-Fleming`, `futility:` |
| Decoys | inputs the scorer must reject or score low; how many, how they were made, what a decoy pass proves |
| Stop rules | the spend cap, a bar missed on the pilot, a scorer below its bar, `budget_exhausted`, the first quota or rate-limit error on a seat-metered arm |
| Held-out exposure | every held-out set the plan touches: prior exposure (which runs, which models), the reservation on it; and how each task machine was checked, before any session, for answers the agent could read there (other git refs such as `git log --all`, build and package caches, archives and the task's own work tree; never a sweep of `/`, runner state or `~/.ssh`) |
| Held-out exposure | every held-out set the plan touches: prior exposure (which runs, which models), the reservation on it; and how each task machine was checked, before any session, for answers the agent could read there (other git refs such as `git log --all`, build and package caches, archives and the task's own work tree; never a sweep of `/`, runner state or `~/.ssh`); and, when a grader runs git in the agent's repo, how it treats that repo as hostile (below) |
| No-gstack arm | required with `stack: loaded` (below) |
```bash
@@ -183,6 +183,16 @@ gstack skill file is contaminated and gets zero credit.
`PREREG_NO_GSTACK_ARM` (exit 1) names what is missing. The PREREG line shows
`stack=loaded no_gstack_arm=ok` when it is complete, or `stack=none` for an opt-out.
**A grader treats the agent's repo as hostile.** A grader that runs git inside a repo the
agent worked in runs it against a sanitized copy of `.git`: no repo, system or global
config, no hooks, no attributes (`.gitattributes` or `info/attributes`), no textconv or
external diff, and no signature display. The copied index files keep their original
timestamps, because a fresh mtime turns off git's same-second check and a same-second,
same-size edit then reads as committed. The grader's environment holds no API keys, and a
test plants each of these settings and asserts that nothing runs. On one eval, a planted
`core.fsmonitor`, a clean filter, or `gpg.program` with `log.showSignature` each ran code
on the grading machine next to the proxy that held the keys.
When the summarizer counts diagnostics, declare them before the freeze commit in a
`## Diagnostics` section: `summarizer: <command naming {fixture}>`, `fixture: <synthetic
records file>`, and one `| diagnostic | expected |` row per diagnostic, with the count the
+11 -1
View File
@@ -75,7 +75,7 @@ Write (or open) the preregistration file. Each section is required and must be f
| Interim look | only when `paid:` is above 500 dollars: `at: 50%`, `looks: 1`, `bounds: O'Brien-Fleming`, `futility:` |
| Decoys | inputs the scorer must reject or score low; how many, how they were made, what a decoy pass proves |
| Stop rules | the spend cap, a bar missed on the pilot, a scorer below its bar, `budget_exhausted`, the first quota or rate-limit error on a seat-metered arm |
| Held-out exposure | every held-out set the plan touches: prior exposure (which runs, which models), the reservation on it; and how each task machine was checked, before any session, for answers the agent could read there (other git refs such as `git log --all`, build and package caches, archives and the task's own work tree; never a sweep of `/`, runner state or `~/.ssh`) |
| Held-out exposure | every held-out set the plan touches: prior exposure (which runs, which models), the reservation on it; and how each task machine was checked, before any session, for answers the agent could read there (other git refs such as `git log --all`, build and package caches, archives and the task's own work tree; never a sweep of `/`, runner state or `~/.ssh`); and, when a grader runs git in the agent's repo, how it treats that repo as hostile (below) |
| No-gstack arm | required with `stack: loaded` (below) |
```bash
@@ -98,6 +98,16 @@ gstack skill file is contaminated and gets zero credit.
`PREREG_NO_GSTACK_ARM` (exit 1) names what is missing. The PREREG line shows
`stack=loaded no_gstack_arm=ok` when it is complete, or `stack=none` for an opt-out.
**A grader treats the agent's repo as hostile.** A grader that runs git inside a repo the
agent worked in runs it against a sanitized copy of `.git`: no repo, system or global
config, no hooks, no attributes (`.gitattributes` or `info/attributes`), no textconv or
external diff, and no signature display. The copied index files keep their original
timestamps, because a fresh mtime turns off git's same-second check and a same-second,
same-size edit then reads as committed. The grader's environment holds no API keys, and a
test plants each of these settings and asserts that nothing runs. On one eval, a planted
`core.fsmonitor`, a clean filter, or `gpg.program` with `log.showSignature` each ran code
on the grading machine next to the proxy that held the keys.
When the summarizer counts diagnostics, declare them before the freeze commit in a
`## Diagnostics` section: `summarizer: <command naming {fixture}>`, `fixture: <synthetic
records file>`, and one `| diagnostic | expected |` row per diagnostic, with the count the
+1
View File
@@ -77,6 +77,7 @@ export function preregTemplate(title = 'Eval preregistration'): string {
## Held-out exposure
<!-- Every held-out set this plan touches: | set | prior exposure (which runs, which models) | reservation (what this run may read) | -->
<!-- Answers on the task machine: how each unit's machine was checked, before any session, for answers the agent could read there (other git refs such as \`git log --all\`, build and package caches, archives and the task's own work tree; never a sweep of \`/\`, runner state or \`~/.ssh\`). -->
<!-- Grader: when a grader runs git in the agent's repo, how it treats that repo as hostile: a sanitized copy of .git with no repo, system or global config, hooks, attributes, textconv or signature display; original index timestamps; no API keys in its environment; a test that plants each setting. -->
<!-- Optional: a \`## Diagnostics\` section declares the summarizer (\`summarizer: <command naming {fixture}>\`), its synthetic records (\`fixture: <path>\`) and one | diagnostic | expected | row per diagnostic; \`prereg --check --allow-repo-commands\` runs it. A count reported as zero needs its diagnostic declared here with a planted case (expected 1 or more). -->
`;
}
+3 -1
View File
@@ -144,7 +144,9 @@ describe('/captain skill', () => {
expect(cited).toContain('Plan, approve, ship');
expect(cited.filter(h => !headings.has(h!))).toEqual([]);
expect(capySkill).toMatch(/## Session start[^#]*?read \[lane-card\.md\]\(lane-card\.md\), not the rest of this file/);
expect(Buffer.byteLength(card)).toBeLessThanOrEqual(6800);
// 7,000 for the drive-write line (confirm a copy in the drive's version history before deleting its source), reached by two
// crews on their own (crew habit H5).
expect(Buffer.byteLength(card)).toBeLessThanOrEqual(7000);
const doc = read('crew/docs/captain.md').replace(/\s+/g, ' ');
for (const s of ['`duration_seconds: 240`', 'stops re-issuing the timer', 'The controller never warm-waits', '4k characters or less', 'twice the crew\'s median lane spend', '`handoffs/<code>/next.md`']) expect(doc, s).toContain(s);
expect(read('captain/templates/brief.md')).toMatch(/^Read: <[^>]+>$/m);