Skip to content

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

Merged
capy-ai[bot] merged 1 commit into
mainfrom
capy/agent-habits-third-batch-gst-3354
Nov 21, 2026
Merged

capy-ai[bot] merged 1 commit into
mainfrom
capy/agent-habits-third-batch-gst-3354

Conversation

@garrytan

@garrytan garrytan commented Nov 21, 2026 •

Copy link
Copy Markdown
Owner

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.

Where each habit lives, with its evidence
Habit Where Evidence (teams, as each tells it)
A grader that runs git inside an agent's repo treats it as hostile: a sanitized copy of .git with no repo, system or global config, no hooks, attributes, textconv or external diff, or signature display; the original index timestamps kept; no API keys in the grader's environment; a test that plants each setting /eval-plan (template and generated SKILL.md), beside the answers-on-the-task-machine check in the Held-out exposure row, plus a comment in the prereg --init template 1 team, reproduced, kept as a security guard: review of one eval PR found that a planted core.fsmonitor, a clean filter (also through .git/info/attributes) or gpg.program with log.showSignature ran code on the grading machine beside the proxy holding the keys; the first sanitized copy gave the index a fresh mtime, so a same-second, same-size edit read as committed (3 of 3, and a flaky test)
A write into a drive mount can succeed locally while the drive never keeps it; find the copy in the drive's version history before deleting the source agents' start card 2 teams: one drive refused writes for about 33 minutes while local writes succeeded and nothing was logged; appends to another drive failed for hours as "still syncing"
Take each result row's model from the captured requests, on every scored row, timeouts included docs/working-across-agent-systems.md, rule 6 (a third report of the pin-from-a-repro habit) 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
What stayed prose, and why

The hostile-repo rule stays prose. It is a template row and a comment, not a prereg --check failure. Making it a hard check would mean a grader: line under Held-out exposure, checked like answers:, with a dated grandfather rule; that is new tooling and is left for a follow-up. The drive check names a Capy tool, so it lives on the Capy start card only.

What changed

Eval plans now say a grader that runs git in an agent's repo treats that repo as hostile

Eval plans now say a grader that runs git in an agent's repo treats that repo as hostile.

Before/after as text: Eval plans now say a grader that runs git in an agent's repo treats that repo as hostile
--- Before · eval-plan/SKILL.md.tmpl § Step 1: Preregistration at 09bd0fa · source text
+++ After · eval-plan/SKILL.md.tmpl § Step 1: Preregistration on this branch · source text
@@ ⋯ 13 unchanged ⋯ @@
 | 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`); and, when a grader runs git in the agent's repo, how it treats that repo as hostile (below) |
-| 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`) |
 | No-gstack arm | required with `stack: loaded` (below) |
 
 ```bash
@@ ⋯ 15 unchanged ⋯ @@
 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

Three habits that teams running evals learned the hard way now live where agents read them; the next section lists each with its evidence.

Why

One team saw a planted git setting run code next to the proxy that held the keys, and two teams lost drive writes that looked saved. Graders and agents that follow these pages now avoid both, and eval rows stop trusting the planned model over the one that actually answered.

Blast radius

Prose only: two skill pages, the start card, one doc for people, a release-note fragment and one HTML comment inside the preregTemplate() string (lib/eval-plan.ts), so no command changes behaviour. The start card's byte budget in its size test goes from 6,800 to 7,000 bytes for the one drive line (the card was 6,762 bytes and is now 6,975, checked with wc -c), and the free test suite passed in CI at this head (run 44883721668).

Test Coverage

No new tests: the change adds guidance, and no content test pins these rules (the coverage audit found 4 prose paths with no test, and the start card is covered only by its size cap). Cheap follow-ups: a source assertion for the hostile-grader terms in an eval-plan test, a preregTemplate() check for the Grader comment, and a start-card check for tools.drive.history.

Tests ran: free 1728 (files, CI run 44883721668)

Pre-Landing Review

No issues found. A batched specialist reader (testing, security, state machines, red team) returned no findings; a second adversarial reader returned two low-severity notes, listed below, and recommended shipping as is.

Review notes

Below the blocking floor (advisory, informational, test-gap or wording items); recorded here and not fixed in this PR.

  • INFORMATIONAL eval-plan/SKILL.md.tmpl:101 Hostile-repo grader guidance omits gitdir: files, symlinks inside .git and objects/info/alternates when building the sanitized copy
  • INFORMATIONAL lib/eval-plan.ts:80 Grader comment is advisory; prereg --check does not enforce it (consistent with the neighbouring answers comment)
Exploratory QA

Static smoke probes on this tree, all passing: the start card is 6,975 bytes (cap 7,000); preregTemplate()'s Held-out exposure section contains the new Grader comment; the template's comment markers stay balanced. No browser or server surface. The QA method pages were not read for this prose-only change.

Eval Results

bun run eval:bg:pr selected 0 of 251 paid cases (narrow screen: lib/eval-plan.ts reaches cases only through the static closure, so the full gate census covers it), so no paid eval ran and nothing was spent.

Scope Drift

Scope Check: CLEAN

TODOS

No TODO items completed in this PR.

Documentation

Status: current. I audited the docs against the diff and none needed edits.

Scope: commit 50fad7d against base 09bd0fa, with no staged, unstaged or untracked changes. Files: the eval-plan skill and its template, the lib/eval-plan.ts prereg template comment, capy/skill/gstack/lane-card.md, docs/working-across-agent-systems.md and the changelog.d fragment. I also cross-checked the /eval-plan entries in docs/skills.md and README.md.

Documentation health:

  • docs/working-across-agent-systems.md: current. The new line on taking each result row's model from the captured requests fits item 6.
  • capy/skill/gstack/lane-card.md: current. The drive version-history line fits the setup bullets.
  • eval-plan/SKILL.md.tmpl and eval-plan/SKILL.md: current. The hostile-grader paragraph and the Held-out exposure row agree with the lib/eval-plan.ts template comment, and the generated changed lines match the template.
  • docs/skills.md and README.md: current. Their /eval-plan summaries sit above this change's level of detail.
  • changelog.d/agent-habits-third-batch.md: current. It matches the diff.

Coverage debt: the hostile-grader rule has reference coverage only, in the skill and the prereg template comment. It has no how-to or explanation page, and none is needed now. No diagram drift and no cross-doc contradictions.

Tests
  • CI free suite (run 44883721668): 1728 test files passed
  • Local before review, same tree: typecheck, gen:skill-docs --host all --dry-run fresh, and 16 focused test files (parity-suite, size guards, budgets, the start-card test, eval-plan tests, module-size ratchet, spawnsync tripwire): 205 pass, 0 fail
  • Pre-push guards: typecheck, skill-size, parity-suite, context-budget, module-size, goldens, conflict-markers
Agent notes

Source: HARN-1's rules file as relayed by FOUN-32 on 2026-11-21 08:00Z (org drive handoffs/crew-rules/HARN-1/top.md items 2, 3 and 5), follow-up to #4585.

Approvals

No approvals recorded for branch capy/agent-habits-third-batch-gst-3354.
Plan: exempt: audited-list (HARN-1 top.md items 2, 3 and 5, relayed by FOUN-32)
Plan check: exempt audited-list

REVIEW_LOOP: passes=1 blocking_found=0 deferred=0 noted=2 fixed=0 scope=frozen ledgers_read=2 dispatches=4
Gate edits: none detected (1 listed, 1 read; patterns: RH-1,RH-3,RH-4,RH-12,RH-13,RH-14,RH-15,RH-16; unlisted idioms: none)

{
  "schema_version": 1,
  "pr": 4602,
  "head": "50fad7d931beccb2338b30c37bc00f6832e52127",
  "version": "1.102.1.0",
  "base": "main",
  "gate": {
    "free": {
      "pass": 1728,
      "fail": 0,
      "skip": 0
    }
  },
  "ci_carried": [
    {
      "lane": "free",
      "run": 44883721668,
      "attempt": 1,
      "tree": "ea772285db7c66c622c6fa6678282f2822d59f3f"
    }
  ],
  "calls": 19,
  "session_kind": "unattended",
  "run": "/home/user/.capy/work/ship-4602",
  "head_tree": "ea772285db7c66c622c6fa6678282f2822d59f3f",
  "product_patch_id": "4dc5a2402464713e8dac572d7efd3b29168cd2e4",
  "gstack_version": "1.102.1.0",
  "review_depth": {
    "depth": "light",
    "class": "code",
    "runtime_lines": 13,
    "rules": "85b3923b1a978e41",
    "base": "19069a98104dcd7ea0c77bbef9bb1376f04ac209",
    "registry": "19069a98104dcd7ea0c77bbef9bb1376f04ac209",
    "gate_scan": {
      "tagged": 0,
      "head": "50fad7d931beccb2338b30c37bc00f6832e52127"
    },
    "reasons": [
      "runtime=13"
    ],
    "risk": [],
    "mode": "panel"
  },
  "pregate": "requires-remote cleared @ea772285db7c (8 checks, current for 50fad7d931be)",
  "requires_remote": [
    "free-tests.yml/macos-named-regressions: https://github.com/garrytan/gstack/actions/runs/44883721668/attempts/1",
    "windows-smoke.yml/windows-smoke: https://github.com/garrytan/gstack/actions/runs/44883721747/attempts/1",
    "pregate.json/remote_gate: remote-gate tree=ea772285db7c tests=38642 skipped=104 runs=44883721668/1 profiles=ci-reuse/free-tests heads=50fad7d931be verified=2026-11-21T08:27:07.562Z"
  ],
  "issues": {
    "fixes": [],
    "refs": [],
    "flakes": []
  },
  "docs": {
    "status": "current",
    "scope": "docs/, README.md, AGENTS.md, CLAUDE.md, CONTRIBUTING.md, capy/skill/gstack/, eval-plan/SKILL.md.tmpl"
  },
  "review_loop": {
    "passes": 1,
    "blocking_found": 0,
    "deferred": 0,
    "noted": 2,
    "fixed": 0,
    "scope": "frozen",
    "rounds": 1,
    "ledgers_read": 2,
    "dispatches": {
      "specialist": 3,
      "red-team": 1
    }
  },
  "gate_dispositions": []
}
{"head":"50fad7d931beccb2338b30c37bc00f6832e52127","run":"ship-4602","status":"started","review_loop":{"passes":1,"blocking_found":0,"deferred":0,"noted":0,"fixed":0,"scope":"frozen","rounds":1,"dispatches":{"specialist":3,"red-team":1}}}

Open in Capy

…arned habits (GST-3354)

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.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@trunk-io

trunk-io Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

😎 This pull request was merged.

@capy-ai
capy-ai Bot merged commit 6af4d8a into main Nov 21, 2026
53 checks passed
@garrytan garrytan mentioned this pull request Nov 21, 2026
capy-ai Bot added a commit that referenced this pull request Nov 21, 2026
- Habits from nine teams, written into gstack. (#4585)
- Three more habits from teams that run evals. (#4602)
- The /ship conductor trial plan gives its real-problem judge one more attempt on fresh labels after it missed its agreement bar twice, and stops the trial incomplete if it misses again (GST-3003). (#4611)
- The /ship conductor trial plan now stops a trial only at the final remote-gate refusal, gives both arms the same note that the brief overrides team rules, and counts every report the no-gstack arm returns (GST-3003). (#4609)
- The /ship conductor trial plan now ends a trial at the remote gate when its case base isn't main, gives the no-gstack arm a test runner, and audits every trial for exposure to the plan (GST-3003). (#4605)
- The /ship conductor trial plan now runs an uncounted pilot in every arm before its counted trials and takes one planned look at half the cases (GST-3003). (#4587)
- gstack's own use on Capy can be counted, and is kept out of real-use numbers. (#4576)
- Free Tests shards finish closer together. (#4578)
- The weekly test-time recording can land again on its own. (#4581)
- The job-log tree.json step's recommended sleep is long enough for real runners. (#4589)
- Pull requests no longer wait on the Trunk flaky-test upload, and the quick tier's flaky passes now reach Trunk. (#4579)
- Windows Setup E2E finishes sooner on install changes. (#4575)
- Skills no longer stop on Codex when they clean up temp files. (#4612)
- /review on Codex with OpenAI models no longer holds back a review that ran its adversarial pass. (#4622)
- Crew threads on Capy now check in at 500M own tokens, standing threads rotate at 250M and any subagent past 50M gets a look, half the old lines, because Capy's token counts read about half what they did before 2026-11-15. (#4582)
- gstack no longer offers to add a `## Skill routing` section to your project's CLAUDE.md. (#4629)
- The README and docs no longer say gstack makes your agent fix more bugs. (#4598)
- `/eval-plan` now writes eval plans that waste less money. (#4591)
- /cso checks every folder above a source file before it looks at the file, so it never looks through a symlinked folder. (#4592)
- Plan reviews no longer read a /design-review audit summary as the branch's design doc. (#4623)
- Node's built-in test files now run with `node --test` in repos that use vitest or jest. (#4626)
- A quarantined test that the runner skipped now fails the run instead of passing it. (#4590)
- A flaky free test is fixed: the spawnSync overflow check no longer fails about once an hour on CI. (#4613)
- Free Tests runs its shards on 16-core runners. (#4600)
- /office-hours asks for ground truth first. (#4468)
- Every startup session ends with a dated test. (#4468)
- /plan-tune's dream cycle now logs each send of your typed answers to Anthropic. (#4621)
- Landing a ready PR no longer depends on a hand-copied gate decision, and the ready note, release PR and squash message say the right thing. (#4596)
- /ship no longer asks for a fresh review because of a stacked parent that main already had. (#4580)
- Results PRs with large captured agent sessions can be reviewed. (#4574)
- /ship no longer stalls on review notes a reviewer already cleared, counts review rounds the way the review policy reads them, and keeps security findings out of the PR body. (#4595)
- /ship's review readers are now told never to stop processes they didn't start. (#4607)
- /ship's review no longer stops when Capy's own drive sync database grows past 100 MB. (#4606)
- /ship's preflight now honors your repository's time limit for rerunning CI-skipped tests, and tells you when a fresh worktree needs its packages installed. (#4608)
- The slowest free test file is now six files. (#4588)
- Step 11.5 keeps a reviewed head current across base-only merges. (#4577)
- On a Capy install, only the owner's opt-in sends telemetry. (#4597)
- New page: working across agent systems. (#4583)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant