O2: gate retry with failure log #10

Merged
hermes merged 1 commits from o2-gate-retry into main 2026-11-12 23:21:22 +00:00
Collaborator

Closes #3

After hx finishes, the profile gate runs. On red, hx gets the gate output (last 8000 bytes, plus the original task on first retry only when no session id is known) as a follow-up prompt on the same session (--session). At most max_retries (profile key, default 2, 0 = none) extra attempts, then the run ends as needs-human with the best attempt on the branch and the full gate output in <state>/runs/ID.gate.log.

  • Budgets (turns, tokens) now count over all attempts; wall_secs stays per attempt.
  • Every attempt is committed on the branch (orch: TITLE (attempt N)), so nothing is lost.
  • New run fields: attempts, turns, spent_tokens. Old state files still load (serde defaults).

Verification: sh tests/all.sh exit 0. New e2e cases: fake hx fixes on the second attempt (marker from the gate log is proven to reach hx in the retry prompt), fake hx never fixes (3 attempts, needs-human, gate.log written), max_retries = 0, budget spanning attempts.

Skipped: gate timeout (ponytail comment in run.rs; add gate_secs when a hanging gate shows up).

Closes #3 After hx finishes, the profile gate runs. On red, hx gets the gate output (last 8000 bytes, plus the original task on first retry only when no session id is known) as a follow-up prompt on the same session (`--session`). At most `max_retries` (profile key, default 2, 0 = none) extra attempts, then the run ends as `needs-human` with the best attempt on the branch and the full gate output in `<state>/runs/ID.gate.log`. - Budgets (turns, tokens) now count over all attempts; wall_secs stays per attempt. - Every attempt is committed on the branch (`orch: TITLE (attempt N)`), so nothing is lost. - New run fields: attempts, turns, spent_tokens. Old state files still load (serde defaults). Verification: `sh tests/all.sh` exit 0. New e2e cases: fake hx fixes on the second attempt (marker from the gate log is proven to reach hx in the retry prompt), fake hx never fixes (3 attempts, needs-human, gate.log written), max_retries = 0, budget spanning attempts. Skipped: gate timeout (ponytail comment in run.rs; add `gate_secs` when a hanging gate shows up).
hermes added 1 commit 2026-11-12 23:20:49 +00:00
hermes merged commit 2f79b69977 into main 2026-11-12 23:21:22 +00:00
hermes deleted branch o2-gate-retry 2026-11-12 23:21:22 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: johannes/orch#10