feat(harness): the pi fit check runs pi once against a scripted loopback model and caches the verdict for the digest (#1873) #2019

Merged
jason.woltje merged 2 commits from pi-unpin-s6 into refactor 2026-11-20 17:59:39 +00:00
2 Commits
Author SHA1 Message Date
jason.woltje 9869200a03 fix(harness): pi-unpin S6 review round: tests now pin the checks no test held; a blocked read that skips the gate's hook and fails on its own (outside and each of the four spellings) is refused by the gate-reason check; a pi whose reads all fail is refused as not running the allowed tool; agent_end must carry the model's final text answer (stopReason and hasText in the turn marker), not just any object; a pi that finishes the script and exits non-zero is undecided; a pi that exits non-zero before any request is undecided with a line that says so; a pi that leaks a blocked read and then hangs is refused, not undecided; pi-stand-in gains hookSkipFail, readFails, exitCode, agentEndEmpty and a numbered modelHang; pi-session.test.mjs takes the expected pi from the pi module's own lookup; README matches (#1873, lane pi-unpin-s6) 2026-11-20 10:59:40 -06:00
jason.woltje be7066b725 feat(harness): pi-unpin S6: the fit check runs pi once against a scripted loopback model, so S0 lines 1, 2 and 4 and the system prompt are proved on the pi that runs; src/pi-fit-model.mjs is the model, first process in the sandbox, on the sandbox's own loopback with the network unshared, on a stand-in provider and model named fit-model; the script reads a file the gate allows, a file outside the project, the same file under each of the four read spellings pi 0.85.1 tries, and a file a second fit-only extension (src/pi-fit-throw.mjs) throws for; a pi that runs a blocked tool, swallows a handler's throw, drops the --system-prompt file or never emits agent_end is refused with harness-feature-missing's line, a run that times out or whose model gets no request is undecided, and the verdict is cached with the pass for the digest; helpers.mjs mockAnthropic shares the model's request handler; pi-session.test.mjs runs on the pi MOSAIC_PI_BIN names (#1873, lane pi-unpin-s6) 2026-11-20 10:59:40 -06:00