Commit Graph
2 Commits
Author SHA1 Message Date
jaredandClaude Opus 5.5 7095db060e fix: local drafter review round 1
- Refuse to run pi as root when DOCS_REVIEW_DRAFTER_USER is unset.
- Keep a record of the run: parse partial output on timeout, add the first
  redacted stderr line to failures, and report summed output and peak
  input tokens with turns in the log and step summary.
- Delete top-level .pi* entries from the sandbox before drafting and
  refuse a draft that recreates one.
- Probe: an HTTP error, redirect or non-JSON answer is a hard failure;
  only connection failures and an empty model list are soft. Refuse model
  ids starting with "-" and pass --model=<id>.
- README: mid-run model swap note, hard-failure cases, rewrap.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 16:42:10 -05:00
jaredandClaude Opus 5.5 28b993cb23 feat: local drafter (pi against a self-run model server)
drafter: local runs the pi coding agent against the model resident on an
OpenAI-compatible server at the new local_url input, keyed by the
LOCAL_MODEL_API_KEY secret. It asks the server which model is loaded and
names exactly that one, so it never evicts the resident model. An
unreachable server or no loaded model posts the stage 1 flags with a note
and exits 0; a drafter that ran and failed still exits 1.

pi runs in the existing sandbox with read, ls, edit and write, every
project-local pi file and AGENTS.md ignored, stdin from /dev/null, the task
passed as an @file, and an allowlisted environment. As root with
DOCS_REVIEW_DRAFTER_USER set, it runs as that unprivileged user, which
owns only the sandbox and pi's temporary home.

Both drafters now hash the checkout's .git/config and .git/hooks before
drafting and stop with no further git command if either changed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 16:28:21 -05:00