graff — a fast agentic coding harness in Zig: multi-provider, MCP, workflows, DGM evolution loop, TS/Python SDKs
Python
eval(tier2): workspace_seed + live-mode skip; suite 33 -> 37
justracha9ba84e48b90
diff --git a/docs/tier2-eval-design.md b/docs/tier2-eval-design.mdindex 7a1491ac..4178636d 100644--- a/docs/tier2-eval-design.md+++ b/docs/tier2-eval-design.md@@ -4,6 +4,8 @@ Synthesized 2026-08-05 from five adversarially-verified dimension batches. EverySuite arithmetic: 14 existing + 19 appendable now = **33 cases**; 1 red-expected spec parked; 3 cases blocked on the `workspace_seed` extension.+> **Status update (landed same day):** the suite now holds **37 cases**. The `workspace_seed` extension shipped in `eval-tier2.py` and the three blocked learned-policy cases are in — each proven red on the pre-extension runner, green after. The citation-free false positive was fixed at the root (`report_anchors.scan` skips `.graff/` inspect links) and the pending spec was promoted to the suite as that fix's regression lock, with the true-positive rejection case still green beside it. The live-mode prerequisite from §8 also shipped: `evaluate()` skips `request_*` asserts under `--provider`.+Validation artifacts: `scratchpad/{surviving.json, blocked.json, append_now.jsonl, pending_specs.jsonl, validate_and_run.py}` (session scratchpad `/private/tmp/claude-501/-Users-rachpradhan-codegraff/9b24db46-d64d-4806-84d5-b498ef748cb3/scratchpad`).---@@ -79,11 +81,11 @@ Global rank in brackets = position in `append_now`.**[19] orch-explicit-shape-stamps-explicit-source** — #290 write-side firewall: user-named orchestration ('use the workflow tool') stamps `source:"explicit"`, rung R2 — the rows foldArms must later skip; stamping them bootstrap lets user intent vote on policy. The unaffordable cap keeps the case deterministic (row says R2/explicit while the advisory declines). Live: does a real model honor user-named orchestration by actually calling the tool, and does real phrasing still stamp explicit.-## 4. Pending spec (red today — must NOT enter the suite yet)+## 4. Pending spec (red today — must NOT enter the suite yet) — LANDED: fix shipped, case promoted**citation-free-report-not-rejected** (verifier-evidence) — Spec for the false-positive axis: an honestly citation-free report-slot reply must pass in one worker call. Today `report_anchors.scan` counts the harness's own appended inspect link (`.graff/subagents/<id>.md`, leading dot trimmed so it never resolves) as a fabricated citation, so every citation-free report is auto-rejected and burns the phase retry. Red profile re-confirmed on the current binary during this synthesis: 2 `agent_usage`, request 2 is the retry carrying the anchor brief note, manifest "1/1 ok, 1 retried". Goes green when the scan excludes the harness-appended suffix (or stops trimming the dot so the real path resolves) — and from then on it is the regression lock for exactly that false positive returning. Land it in `harness_behavior.jsonl` together with the scan fix, or accept a deliberately red tier 2 until the fix ships. Complements `fabricated-report-anchors-reject-and-retry` (false-positive vs true-positive axis).-## 5. Blocked on `workspace_seed` (live here until the extension lands)+## 5. Blocked on `workspace_seed` — LANDED: extension shipped, all three cases in the suiteAll three need pre-launch seeding of `.graff/trajectories/seed.jsonl` because the archive folds ONCE at startup (`bench_priors.loadInto`), before any scripted step runs. Per verifier correction, **treat all three as red-until-extension**: the tradedown case reds loudly today (fleet proceeds R2, eats the script); the other two carry a scripted seed-presence probe (`test -s .graff/trajectories/seed.jsonl`) added by their verifiers precisely so they red loudly instead of passing vacuously — the batch metadata that said `expected_now: green` for them is superseded. Do not append any of them until the runner writes `workspace_seed` files.@@ -122,7 +124,7 @@ Lessons from verifier fixes to *surviving* cases, worth institutionalizing:## 7. Harness-extension shortlist (ranked by blocked tests unlocked)-1. **workspace_seed** (also proposed as `seed_files` by intuition-traps — same semantics, merge them; apply in scripted AND `--provider` modes). Unlocks all 3 blocked learned-policy cases, plus honest live-mode traps (injection sentinel NOT quoted in the prompt; real seeded worlds without spending script steps). Sketch — in `execute()`, right after the per-case env merge:+1. **workspace_seed** — **LANDED** (also proposed as `seed_files` by intuition-traps — same semantics, merged; applies in scripted AND `--provider` modes). Unlocks all 3 blocked learned-policy cases, plus honest live-mode traps (injection sentinel NOT quoted in the prompt; real seeded worlds without spending script steps). Sketch — in `execute()`, right after the per-case env merge:```pythonfor rel, content in case.get("workspace_seed", {}).items():dest = pathlib.Path(workspace) / rel@@ -174,7 +176,7 @@ elif kind == "request_count":The suite replays every case against a real provider (`python3 scripts/eval-tier2.py --provider <p> --model <m> --only <id>`). The scripted asserts were designed with a second life in mind — each case's `live_value` names what real-model judgment it measures.-**Mechanical prerequisite (verified from `eval-tier2.py:103`):** with `--provider` the ScriptedModel never starts, `run.requests` stays empty, and every `request_contains`/`request_lacks` fails "sent no request" — a whole-suite property, not a per-case defect. Before the study, add ~3 lines to `evaluate()` to skip (or report n/a) `request_*` asserts when running live; until then live runs must be scored on event/no_event/events_at_*/final_text asserts plus the transcript.+**Mechanical prerequisite — SHIPPED:** with `--provider` the ScriptedModel never starts and `run.requests` stays empty, so `evaluate()` now skips `request_*` asserts on live runs (the header says so); live scoring rests on event/no_event/events_at_*/final_text asserts plus the transcript.What each group measures live:diff --git a/evals/harness_behavior.jsonl b/evals/harness_behavior.jsonlindex 5a020536..98069d33 100644--- a/evals/harness_behavior.jsonl+++ b/evals/harness_behavior.jsonl@@ -31,3 +31,7 @@{"id": "synthesize-slot-not-anchor-checked", "why": "report_anchors.isReportSlot: only find/verify/sweep/review carry the report contract. A synthesize phase citing a phantom path must NOT be anchor-checked - no brief note, no rejection - while the sweep phase before it is, and the sweep's partial warning rides {{prev}} into the synthesize brief. Green-expected lock on the slot boundary.", "args": [], "env": {"GRAFF_NO_CODEDB_GUARD": "1"}, "prompt": "investigate the retry queue and summarize how jobs re-enter it", "script": [{"tool": "write_file", "arguments": {"path": "queue.py", "content": "RETRIES = 3\n"}}, {"tool": "workflow", "arguments": {"phases": [{"title": "sweep the queue sources", "tasks": [{"description": "scout", "prompt": "read the queue sources and report how jobs re-enter"}]}, {"title": "synthesize the answer", "tasks": [{"description": "writer", "prompt": "write the final answer from the sweep results"}]}]}}, {"text": "Jobs re-enter through queue.py; a dead-letter path may exist in ghost.py."}, {"text": "SYNTH-SENTINEL-9e1f: the answer cites phantom.zig as the sole source."}, {"text": "the queue answer is ready"}], "timeout_s": 90, "assert": [{"event": {"type": "tool_result", "name": "workflow", "is_error": false}}, {"request_contains": {"index": 2, "text": "Anchor every finding to real code"}}, {"request_contains": {"index": 3, "text": "[anchor warning: "}}, {"request_contains": {"index": 3, "text": "e.g. ghost.py"}}, {"request_lacks": {"index": 3, "text": "Anchor every finding to real code"}}, {"request_contains": {"index": -1, "text": "SYNTH-SENTINEL-9e1f"}}, {"request_contains": {"index": -1, "text": "phantom.zig"}}, {"request_lacks": {"index": -1, "text": "report anchors unresolved"}}, {"request_contains": {"index": -1, "text": "phase 2/2 synthesize the answer: 1/1 ok, 0 retried"}}, {"final_text_contains": "the queue answer is ready"}]}{"id": "orch-audit-decision-row-lands-review-cell", "why": "#290/#372 loop input: every admission must file a kind:\"orch\" decision row in .graff/trajectories/<run>.jsonl, and an audit-worded ask must land in the REVIEW cell (shapes.classOf checks isAuditClass first) with the rung and source the gate chose - miscelled or unwritten rows silently poison every future fold. Green-expected: regression lock.", "args": ["--max-model-calls", "8"], "env": {"GRAFF_FLEET": "on"}, "prompt": "run an audit of the error handling in server.py", "script": [{"tool": "workflow", "arguments": {"phases": [{"title": "find problems", "tasks": [{"description": "find", "prompt": "read server.py and list the problems"}]}, {"title": "verify each finding", "tasks": [{"description": "verify", "prompt": "verify the problems in server.py"}]}]}}, {"tool": "bash", "arguments": {"command": "grep -h '\"kind\":\"orch\"' .graff/trajectories/*.jsonl | grep '\"task_class\":\"review\"' | grep '\"source\":\"bootstrap\"' | grep -q '\"arm\":\"R0\"' && echo orch-row-recorded"}}, {"text": "declined by the ladder; the decision row is on disk"}], "assert": [{"event": {"type": "tool_result", "name": "workflow", "is_error": false}}, {"request_contains": {"index": 1, "text": "(escalation R0):"}}, {"event": {"type": "tool_result", "name": "bash", "text": "orch-row-recorded\n"}}, {"final_text_contains": "the decision row is on disk"}]}{"id": "orch-explicit-shape-stamps-explicit-source", "why": "#290 write side: when the USER names the orchestration ('use the workflow tool'), the decision row must say source:\"explicit\" and hold rung R2 - explicit rows are the ones foldArms must later skip, so stamping them bootstrap would let user intent vote on policy. The unaffordable pool (cap 8) keeps the explicit R2 on the solo advisory instead of spawning. Green-expected: regression lock.", "args": ["--max-model-calls", "8"], "env": {"GRAFF_FLEET": "on"}, "prompt": "use the workflow tool to fix the crash in engine.py", "script": [{"tool": "workflow", "arguments": {"phases": [{"title": "find the defect", "tasks": [{"description": "find", "prompt": "read engine.py and locate the crash"}]}, {"title": "implement the fix", "tasks": [{"description": "fix", "prompt": "fix the crash in engine.py"}]}]}}, {"tool": "bash", "arguments": {"command": "grep -h '\"kind\":\"orch\"' .graff/trajectories/*.jsonl | grep '\"task_class\":\"bugfix\"' | grep '\"source\":\"explicit\"' | grep -q '\"arm\":\"R2\"' && echo explicit-row-stamped"}}, {"text": "the user-named shape was recorded as explicit"}], "assert": [{"event": {"type": "tool_result", "name": "workflow", "is_error": false}}, {"request_contains": {"index": 1, "text": "(escalation R0):"}}, {"event": {"type": "tool_result", "name": "bash", "text": "explicit-row-stamped\n"}}, {"final_text_contains": "recorded as explicit"}]}+{"id": "orch-folded-tradedown-declines-the-fleet", "why": "The learned override, end to end: >=min_arm_obs seeded orch_outcome rows where R0 beats R2 for (bugfix, unlimited, lmstudio) must trade a ladder-R2 ask (3 files, widest 2, affordable) down to a learned R0 decline, and the decision row must say source:\"learned\" arm:\"R0\". RED-expected today: needs the workspace_seed runner extension - the archive folds ONCE at startup (bench_priors.loadInto), before any scripted step runs, so without pre-launch seeding the ladder proceeds R2 and every assert fails (verified).", "args": [], "env": {"GRAFF_FLEET": "on"}, "workspace_seed": {".graff/trajectories/seed.jsonl": "{\"kind\": \"orch_outcome\", \"task_class\": \"bugfix\", \"budget_band\": \"unlimited\", \"stratum\": \"lmstudio\", \"arm\": \"R0\", \"source\": \"bootstrap\", \"score\": 1.0, \"calls_used\": 6, \"exhausted\": false, \"landed\": true, \"variant_free\": true}\n{\"kind\": \"orch_outcome\", \"task_class\": \"bugfix\", \"budget_band\": \"unlimited\", \"stratum\": \"lmstudio\", \"arm\": \"R0\", \"source\": \"bootstrap\", \"score\": 1.0, \"calls_used\": 7, \"exhausted\": false, \"landed\": true, \"variant_free\": true}\n{\"kind\": \"orch_outcome\", \"task_class\": \"bugfix\", \"budget_band\": \"unlimited\", \"stratum\": \"lmstudio\", \"arm\": \"R0\", \"source\": \"bootstrap\", \"score\": 1.0, \"calls_used\": 8, \"exhausted\": false, \"landed\": true, \"variant_free\": true}\n{\"kind\": \"orch_outcome\", \"task_class\": \"bugfix\", \"budget_band\": \"unlimited\", \"stratum\": \"lmstudio\", \"arm\": \"R2\", \"source\": \"bootstrap\", \"score\": 0.1, \"calls_used\": 30, \"exhausted\": false, \"landed\": false, \"variant_free\": true}\n{\"kind\": \"orch_outcome\", \"task_class\": \"bugfix\", \"budget_band\": \"unlimited\", \"stratum\": \"lmstudio\", \"arm\": \"R2\", \"source\": \"bootstrap\", \"score\": 0.1, \"calls_used\": 28, \"exhausted\": false, \"landed\": false, \"variant_free\": true}\n{\"kind\": \"orch_outcome\", \"task_class\": \"bugfix\", \"budget_band\": \"unlimited\", \"stratum\": \"lmstudio\", \"arm\": \"R2\", \"source\": \"bootstrap\", \"score\": 0.1, \"calls_used\": 31, \"exhausted\": false, \"landed\": false, \"variant_free\": true}\n"}, "timeout_s": 120, "prompt": "fix the failing checks in parser.py, lexer.py and tokens.py", "script": [{"tool": "workflow", "arguments": {"phases": [{"title": "find the defects", "tasks": [{"description": "find parser", "prompt": "read parser.py and locate the failing check"}, {"description": "find lexer", "prompt": "read lexer.py and locate the failing check"}]}, {"title": "implement the fixes", "tasks": [{"description": "fix", "prompt": "fix the failing checks in tokens.py"}]}]}}, {"tool": "bash", "arguments": {"command": "grep -h '\"kind\":\"orch\"' .graff/trajectories/*.jsonl | grep '\"task_class\":\"bugfix\"' | grep '\"source\":\"learned\"' | grep -q '\"arm\":\"R0\"' && echo learned-tradedown-row"}}, {"text": "the learned cell traded the fleet down to solo"}], "assert": [{"event": {"type": "tool_result", "name": "workflow", "is_error": false}}, {"request_contains": {"index": 1, "text": "(escalation R0):"}}, {"event": {"type": "tool_result", "name": "bash", "text": "learned-tradedown-row\n"}}, {"final_text_contains": "traded the fleet down to solo"}]}+{"id": "orch-two-obs-cell-stays-bootstrap", "why": "min_arm_obs: a candidate arm with min_arm_obs-1 (=2) observations must NOT override - the base R0 arm is folded (n=3) but the winning R2 arm is one row short, so the decision stays source:\"bootstrap\" R0. Adding one more R2 row flips it to a learned R2 fleet (verified), so this is exactly the threshold. A scripted seed-presence probe keeps this case loudly RED until the workspace_seed runner extension exists - without it an empty archive declines identically and the case would otherwise pass while guarding nothing; once the seed lands it locks the n-gate.", "args": [], "env": {"GRAFF_FLEET": "on"}, "workspace_seed": {".graff/trajectories/seed.jsonl": "{\"kind\": \"orch_outcome\", \"task_class\": \"bugfix\", \"budget_band\": \"unlimited\", \"stratum\": \"lmstudio\", \"arm\": \"R0\", \"source\": \"bootstrap\", \"score\": 0.5, \"calls_used\": 6, \"exhausted\": false, \"landed\": true, \"variant_free\": true}\n{\"kind\": \"orch_outcome\", \"task_class\": \"bugfix\", \"budget_band\": \"unlimited\", \"stratum\": \"lmstudio\", \"arm\": \"R0\", \"source\": \"bootstrap\", \"score\": 0.5, \"calls_used\": 7, \"exhausted\": false, \"landed\": true, \"variant_free\": true}\n{\"kind\": \"orch_outcome\", \"task_class\": \"bugfix\", \"budget_band\": \"unlimited\", \"stratum\": \"lmstudio\", \"arm\": \"R0\", \"source\": \"bootstrap\", \"score\": 0.5, \"calls_used\": 8, \"exhausted\": false, \"landed\": true, \"variant_free\": true}\n{\"kind\": \"orch_outcome\", \"task_class\": \"bugfix\", \"budget_band\": \"unlimited\", \"stratum\": \"lmstudio\", \"arm\": \"R2\", \"source\": \"bootstrap\", \"score\": 1.0, \"calls_used\": 12, \"exhausted\": false, \"landed\": true, \"variant_free\": true}\n{\"kind\": \"orch_outcome\", \"task_class\": \"bugfix\", \"budget_band\": \"unlimited\", \"stratum\": \"lmstudio\", \"arm\": \"R2\", \"source\": \"bootstrap\", \"score\": 1.0, \"calls_used\": 13, \"exhausted\": false, \"landed\": true, \"variant_free\": true}\n"}, "timeout_s": 90, "prompt": "fix the regression in mathutil.py", "script": [{"tool": "workflow", "arguments": {"phases": [{"title": "find the defect", "tasks": [{"description": "find", "prompt": "read mathutil.py and locate the regression"}]}, {"title": "implement the fix", "tasks": [{"description": "fix", "prompt": "fix the regression in mathutil.py"}]}]}}, {"tool": "bash", "arguments": {"command": "test -s .graff/trajectories/seed.jsonl && echo seed-present"}}, {"tool": "bash", "arguments": {"command": "grep -h '\"kind\":\"orch\"' .graff/trajectories/*.jsonl | grep '\"task_class\":\"bugfix\"' | grep '\"source\":\"bootstrap\"' | grep -q '\"arm\":\"R0\"' && echo sparse-cell-stayed-bootstrap"}}, {"text": "two observations are not evidence; the hand ladder decided"}], "assert": [{"event": {"type": "tool_result", "name": "workflow", "is_error": false}}, {"request_contains": {"index": 1, "text": "(escalation R0):"}}, {"event": {"type": "tool_result", "name": "bash", "text": "seed-present\n"}}, {"event": {"type": "tool_result", "name": "bash", "text": "sparse-cell-stayed-bootstrap\n"}}, {"final_text_contains": "the hand ladder decided"}]}+{"id": "orch-explicit-and-foreign-stratum-never-fold", "why": "#290 fold side, both firewalls at once: seeded R2 rows that would win the cell outright are marked source:\"explicit\" (user intent) or carry stratum gpt-5.6-sol (different model), so neither may fold into the (bugfix, unlimited, lmstudio) ask - the decision must stay bootstrap R0. Relabeling the explicit rows bootstrap flips it to a learned R2 fleet (verified), so each firewall is individually load-bearing. A scripted seed-presence probe keeps this case loudly RED until the workspace_seed runner extension exists - without it an empty archive declines identically and the case would otherwise pass while guarding nothing; once the seed lands it locks both firewalls.", "args": [], "env": {"GRAFF_FLEET": "on"}, "workspace_seed": {".graff/trajectories/seed.jsonl": "{\"kind\": \"orch_outcome\", \"task_class\": \"bugfix\", \"budget_band\": \"unlimited\", \"stratum\": \"lmstudio\", \"arm\": \"R0\", \"source\": \"bootstrap\", \"score\": 0.0, \"calls_used\": 6, \"exhausted\": false, \"landed\": false, \"variant_free\": true}\n{\"kind\": \"orch_outcome\", \"task_class\": \"bugfix\", \"budget_band\": \"unlimited\", \"stratum\": \"lmstudio\", \"arm\": \"R0\", \"source\": \"bootstrap\", \"score\": 0.0, \"calls_used\": 7, \"exhausted\": false, \"landed\": false, \"variant_free\": true}\n{\"kind\": \"orch_outcome\", \"task_class\": \"bugfix\", \"budget_band\": \"unlimited\", \"stratum\": \"lmstudio\", \"arm\": \"R0\", \"source\": \"bootstrap\", \"score\": 0.0, \"calls_used\": 8, \"exhausted\": false, \"landed\": false, \"variant_free\": true}\n{\"kind\": \"orch_outcome\", \"task_class\": \"bugfix\", \"budget_band\": \"unlimited\", \"stratum\": \"lmstudio\", \"arm\": \"R2\", \"source\": \"explicit\", \"score\": 1.0, \"calls_used\": 12, \"exhausted\": false, \"landed\": true, \"variant_free\": true}\n{\"kind\": \"orch_outcome\", \"task_class\": \"bugfix\", \"budget_band\": \"unlimited\", \"stratum\": \"lmstudio\", \"arm\": \"R2\", \"source\": \"explicit\", \"score\": 1.0, \"calls_used\": 13, \"exhausted\": false, \"landed\": true, \"variant_free\": true}\n{\"kind\": \"orch_outcome\", \"task_class\": \"bugfix\", \"budget_band\": \"unlimited\", \"stratum\": \"lmstudio\", \"arm\": \"R2\", \"source\": \"explicit\", \"score\": 1.0, \"calls_used\": 14, \"exhausted\": false, \"landed\": true, \"variant_free\": true}\n{\"kind\": \"orch_outcome\", \"task_class\": \"bugfix\", \"budget_band\": \"unlimited\", \"stratum\": \"gpt-5.6-sol\", \"arm\": \"R2\", \"source\": \"bootstrap\", \"score\": 1.0, \"calls_used\": 12, \"exhausted\": false, \"landed\": true, \"variant_free\": true}\n{\"kind\": \"orch_outcome\", \"task_class\": \"bugfix\", \"budget_band\": \"unlimited\", \"stratum\": \"gpt-5.6-sol\", \"arm\": \"R2\", \"source\": \"bootstrap\", \"score\": 1.0, \"calls_used\": 13, \"exhausted\": false, \"landed\": true, \"variant_free\": true}\n{\"kind\": \"orch_outcome\", \"task_class\": \"bugfix\", \"budget_band\": \"unlimited\", \"stratum\": \"gpt-5.6-sol\", \"arm\": \"R2\", \"source\": \"bootstrap\", \"score\": 1.0, \"calls_used\": 14, \"exhausted\": false, \"landed\": true, \"variant_free\": true}\n"}, "timeout_s": 90, "prompt": "fix the crash in payments.py", "script": [{"tool": "workflow", "arguments": {"phases": [{"title": "find the defect", "tasks": [{"description": "find", "prompt": "read payments.py and locate the crash"}]}, {"title": "implement the fix", "tasks": [{"description": "fix", "prompt": "fix the crash in payments.py"}]}]}}, {"tool": "bash", "arguments": {"command": "test -s .graff/trajectories/seed.jsonl && echo seed-present"}}, {"tool": "bash", "arguments": {"command": "grep -h '\"kind\":\"orch\"' .graff/trajectories/*.jsonl | grep '\"task_class\":\"bugfix\"' | grep '\"source\":\"bootstrap\"' | grep -q '\"arm\":\"R0\"' && echo firewalled-rows-did-not-fold"}}, {"text": "user intent and foreign strata stayed out of the cell"}], "assert": [{"event": {"type": "tool_result", "name": "workflow", "is_error": false}}, {"request_contains": {"index": 1, "text": "(escalation R0):"}}, {"event": {"type": "tool_result", "name": "bash", "text": "seed-present\n"}}, {"event": {"type": "tool_result", "name": "bash", "text": "firewalled-rows-did-not-fold\n"}}, {"final_text_contains": "stayed out of the cell"}]}+{"id": "citation-free-report-not-rejected", "why": "The false-positive axis of anchorCheck: a report-slot worker that honestly cites nothing must pass in one call - no anchor rejection, no burnt phase retry. The scan once counted the harness's own appended inspect link (.graff/subagents/<id>.md) as a fabricated citation, auto-rejecting every citation-free report; this locks the fix (report_anchors.scan skips .graff/ paths).", "args": [], "prompt": "investigate whether any throttle wiring exists in this project", "script": [{"tool": "workflow", "arguments": {"phases": [{"title": "sweep the project for throttle wiring", "tasks": [{"description": "scout", "prompt": "search for throttle wiring and report what exists"}]}]}}, {"text": "No throttle wiring exists anywhere in this project; there is nothing to cite."}, {"text": "confirmed: no throttle wiring exists"}], "timeout_s": 90, "assert": [{"event": {"type": "tool_result", "name": "workflow", "is_error": false}}, {"events_at_most": {"match": {"type": "agent_usage"}, "count": 1}}, {"request_lacks": {"index": 2, "text": "Anchor every finding to real code"}}, {"request_contains": {"index": -1, "text": "1/1 ok, 0 retried"}}, {"final_text_contains": "confirmed: no throttle wiring exists"}]}diff --git a/evals/harness_behavior_pending.jsonl b/evals/harness_behavior_pending.jsonldeleted file mode 100644index 49916b58..00000000--- a/evals/harness_behavior_pending.jsonl+++ /dev/null@@ -1 +0,0 @@-{"id": "citation-free-report-not-rejected", "why": "RED-expected spec: a report-slot worker that honestly cites nothing must pass without an anchor rejection. Today report_anchors.scan counts the harness's own appended inspect link (.graff/subagents/<id>.md, leading dot trimmed so it never resolves) as a fabricated citation, so every citation-free report is auto-rejected and burns the phase retry. Goes green when the scan excludes the harness-appended suffix (or resolves dotted paths).", "args": [], "prompt": "investigate whether any throttle wiring exists in this project", "script": [{"tool": "workflow", "arguments": {"phases": [{"title": "sweep the project for throttle wiring", "tasks": [{"description": "scout", "prompt": "search for throttle wiring and report what exists"}]}]}}, {"text": "No throttle wiring exists anywhere in this project; there is nothing to cite."}, {"text": "confirmed: no throttle wiring exists"}], "timeout_s": 90, "assert": [{"event": {"type": "tool_result", "name": "workflow", "is_error": false}}, {"events_at_most": {"match": {"type": "agent_usage"}, "count": 1}}, {"request_lacks": {"index": 2, "text": "Anchor every finding to real code"}}, {"request_contains": {"index": -1, "text": "1/1 ok, 0 retried"}}, {"final_text_contains": "confirmed: no throttle wiring exists"}]}diff --git a/scripts/eval-tier2.py b/scripts/eval-tier2.pyindex 885f506c..31db46c2 100644--- a/scripts/eval-tier2.py+++ b/scripts/eval-tier2.py@@ -27,6 +27,13 @@ Assertions a case can make:{"request_contains": {"index": -1, "text": "..."}} what the harness sent{"request_lacks": {"index": -1, "text": "..."}}{"final_text_contains": "..."}++A case may also carry {"workspace_seed": {"relative/path": "content", ...}}:+files written into the fresh workspace BEFORE graff boots, in scripted and+--provider modes alike - for state the harness reads at startup, like the+trajectory archive bench_priors folds. Under --provider the ScriptedModel+never runs, so request_contains/request_lacks are skipped and scoring rests+on the event and final-text asserts."""from __future__ import annotations@@ -120,6 +127,12 @@ def execute(case: dict[str, Any], graff: str, port: int,# SUBAGENT compacts, say - sets it here rather than in the shared# block, so one case cannot quietly change the others.env.update({k: str(v) for k, v in case.get("env", {}).items()})+ # Pre-boot world: state the harness reads at startup (the trajectory+ # archive folds in bench_priors before any scripted step could write it).+ for rel, content in case.get("workspace_seed", {}).items():+ dest = pathlib.Path(workspace) / rel+ dest.parent.mkdir(parents=True, exist_ok=True)+ dest.write_text(content, encoding="utf-8")argv = [graff, "--json", "--yolo", "--model", model or "lmstudio"]if provider:argv += ["--subagent-provider", provider]@@ -159,7 +172,7 @@ def execute(case: dict[str, Any], graff: str, port: int,time.sleep(0.05)-def evaluate(case: dict[str, Any], run: Run) -> list[str]:+def evaluate(case: dict[str, Any], run: Run, live: bool = False) -> list[str]:failures = []for claim in case.get("assert", []):(kind, spec), = claim.items()@@ -179,6 +192,8 @@ def evaluate(case: dict[str, Any], run: Run) -> list[str]:failures.append(f"{seen} event(s) matched {json.dumps(spec['match'])}, wanted at most {want}")elif kind in ("request_contains", "request_lacks"):+ if live:+ continue # a live provider records no requests; scripted-only surfacebody = run.request_text(spec.get("index", -1))if body is None:failures.append(f"the harness sent no request at index {spec.get('index', -1)}")@@ -229,7 +244,8 @@ def main() -> None:if args.provider:print(f"tier 2: {len(cases)} case(s) against {args.provider}"- f"/{args.model or 'default'} - this spends real calls\n")+ f"/{args.model or 'default'} - this spends real calls"+ " (request_* asserts skipped: no scripted request log)\n")else:print(f"tier 2: {len(cases)} case(s) against the scripted model"f" on 127.0.0.1:{args.port} - offline, no spend\n")@@ -242,7 +258,7 @@ def main() -> None:"exit_code": run.exit_code, "stderr": run.stderr[-2000:]},indent=2))return- problems = evaluate(case, run)+ problems = evaluate(case, run, live=bool(args.provider))# A harness that crashed, hung, or died instantly must FAIL the case on# its own, not merely annotate someone else's failure. Without this a# case whose assertions are all upper bounds passes against a binary