Repository navigation
Commit 7b9bb4c
committed
test(harness): WD-5/WD-6 live transcript capture, and the four defects it caught
Layer 3, plan item 6. Claude Code headless (the one harness with attested
flags) through the LiteLLM gateway - no vendor credential; the key is read
from the proxy's own config at call time, enters the child env only, and is
never printed or passed in argv. Opt in with "just gate-checks"; artefacts
(per-state transcripts, summary.json, tool-routing.json) land under
gitignored reviews/.
The three gate checks, graded on real transcripts with the arbitrated
assertions and nothing stronger: sentence at most once across the whole
transcript; silence = no pinned sentence and no second-brain vocabulary in
assistant prose WHILE the D4 positive control holds (the transcript must
show that "studyloop brain wind-down" actually ran, or a crashed run would
pass by absence); a declined offer leaves the stub log empty - with the
xtiles tools ALLOWED, so declining was a choice, not an inability. 3/3 for
the offer-once-then-decline state; one pre-response infra retry, flakes
counted in the artefact, never smoothed.
Capturing found four real defects; each is fixed here and visible in the
transcript evidence:
1. Protocol violation - the harness narrated the step ("Running the second
brain check now"). The protocol now opens step 5 with the silence rule
and names narration a violation.
2. Fabricated connector flag - given a literal "--connector xtiles" example,
the model passed it with NO server attached, manufacturing an offer. The
protocol now grounds the flag in the mcp__<server>__ tool names the
session can actually see, and calls it a statement of fact.
3. D2 exactly as the council predicted - the hermetic HOME hid the skill and
"Unknown skill: studyloop-xtiles-wind-down" killed an offer turn. The
world now runs the REAL "studyloop install agents" into the isolated
home, which also exercises the installer for free.
4. A gateway bug - LiteLLM's anthropic-passthrough adapter (Bedrock invoke
path) dies on extended-thinking blocks ("Content block is not a text
block"), deterministic on thinking-length prompts. Worked around with
MAX_THINKING_TOKENS=0 in the harness env; proxy upgrade is the real fix.
Final capture: 6/6 pass, 0 flakes. WD-6's observation (records, never
gates): the P1b planner wording selected
xtiles_create_tiles_from_markdown_in_my_planner - matching the owner's hand
run. Spend recorded in the ledger: est $1.50, actual $4.45; the overrun is
Claude Code's ~30k-token own system prompt per call plus five debug
re-runs, both now named in the estimate file so the next one models them.
[message restored 2026-09-04: the original -m string was double-quoted and
its backticked command names were command-substituted by the shell, which
ran a paid gate-checks capture mid-commit and pasted pytest output into
this message. The accidental run's evidence is preserved under
reviews/2026-09-04-gate-checks/evidence/gate-checks-capture2-accidental/.]1 parent 357806e commit 7b9bb4c
4 files changed
Lines changed: 580 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
151 | 160 | | |
152 | 161 | | |
153 | 162 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
| 53 | + | |
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
52 | 54 | | |
53 | 55 | | |
54 | 56 | | |
55 | 57 | | |
56 | 58 | | |
57 | | - | |
58 | | - | |
59 | | - | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
60 | 71 | | |
61 | 72 | | |
62 | 73 | | |
| |||
76 | 87 | | |
77 | 88 | | |
78 | 89 | | |
79 | | - | |
| 90 | + | |
| 91 | + | |
80 | 92 | | |
81 | 93 | | |
82 | 94 | | |
| |||
0 commit comments