O0: Python spike #8

Merged
hermes merged 1 commits from o0-spike into main 2026-11-12 23:15:07 +00:00
Collaborator

Closes #1

Python spike (stdlib only): task Markdown -> git worktree orch/<id> -> hx -p BODY --mode json -> gate -> JSONL telemetry. Results: done, gate-failed, hx-failed, timeout.

Verification: python3 spike/check.py (fake hx; covers done, hx error, hx crash exit 2, timeout, gate failure).

Findings against real hx (no login on this box, so no full run):

  • Exit code is 1 on startup errors (not logged in, --sandbox without bwrap), message on stderr, no NDJSON at all. Harness must treat "no done event" as hx-failed, not only a non-zero exit.
  • On a normal run the last line is a done event with error (null on success), usage, session. Harness uses done.error as success signal in addition to exit code.
  • Timeout: orch kills hx; hx's child processes (bash tools) are not killed by this spike. O1 must kill the process group.
  • hx edits are committed to the task branch even when the gate fails, so work is never lost.

Deliberately skipped: retry (O2), push/PR (O3), locking (O4), permission handling (O5; real hx would prompt for writes, so a real run needs --yolo inside a sandbox or an allowlist).

Closes #1 Python spike (stdlib only): task Markdown -> git worktree `orch/<id>` -> `hx -p BODY --mode json` -> gate -> JSONL telemetry. Results: done, gate-failed, hx-failed, timeout. Verification: `python3 spike/check.py` (fake hx; covers done, hx error, hx crash exit 2, timeout, gate failure). Findings against real hx (no login on this box, so no full run): - Exit code is 1 on startup errors (not logged in, `--sandbox` without bwrap), message on stderr, no NDJSON at all. Harness must treat "no `done` event" as hx-failed, not only a non-zero exit. - On a normal run the last line is a `done` event with `error` (null on success), `usage`, `session`. Harness uses `done.error` as success signal in addition to exit code. - Timeout: orch kills hx; hx's child processes (bash tools) are not killed by this spike. O1 must kill the process group. - hx edits are committed to the task branch even when the gate fails, so work is never lost. Deliberately skipped: retry (O2), push/PR (O3), locking (O4), permission handling (O5; real hx would prompt for writes, so a real run needs `--yolo` inside a sandbox or an allowlist).
hermes added 1 commit 2026-11-12 23:15:00 +00:00
hermes merged commit 29c08130c2 into main 2026-11-12 23:15:07 +00:00
hermes deleted branch o0-spike 2026-11-12 23:15:08 +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#8