📝 Headless forks Phase 1: smoke results and phase close
This commit is contained in:
@@ -64,6 +64,8 @@ Intake 2026-10-16 12:18 +0200, Athanor `claude-opus-5-5[1m]`. Start commit `83f6
|
||||
| Block | Owner (model id) | Commit | Tokens (if known) |
|
||||
|---|---|---|---|
|
||||
| 1.1 Skeleton, state, `where`, `init` | fresh general-purpose agent, `opus` alias, stamped `claude-opus-5-5[1m]` | `d36ac2f`, `85d1e14` | 211,075 subagent tokens (harness total) |
|
||||
| 1.2 Launch and supervise | fresh general-purpose agent, `opus` alias, stamped `claude-opus-5-5[1m]` | `009a252`, `8f2c7d3` | 337,053 subagent tokens (harness total); harness duration 11,929 s |
|
||||
| 1.3 Phase tests, smoke | the Athanor, `claude-opus-5-5[1m]`, own Bash; no fallout agent needed | this run-log commit | smoke calls $0.49 client estimate (+ the killed fork, no result) |
|
||||
|
||||
Gate after 1.1 (Athanor, 12:29): G-unit `Ran 52 tests … OK`, exit 0; G-where exit 0, one JSON object. `--effort` values checked against `claude --help` 2.1.299 (low, medium, high, xhigh, max): match.
|
||||
|
||||
@@ -134,3 +136,60 @@ Gate after 1.1 (Athanor, 12:29): G-unit `Ran 52 tests … OK`, exit 0; G-where e
|
||||
- Left for later: warmth inference, pings, `rebase`, `rebase_due`/`retrain_due` reasons, `usage`, `tick` (Phase 2); `SKILL.md` (Phase 3).
|
||||
- Expected broken: `rebase`, `usage`, `tick` exit 2 "not implemented" (Phase 2).
|
||||
- Commits: `009a252` (code, tests, templates, this note), then a one-line follow-up filling in this hash.
|
||||
|
||||
### Block 1.3 — Phase tests and live smoke
|
||||
|
||||
- Model: `claude-opus-5-5[1m]` (the Athanor, own Bash)
|
||||
- Start / end: 2026-10-16 15:50:01 +0200 / 15:55:50 +0200 (`date`)
|
||||
- Done:
|
||||
- Gates after 1.2 (15:50): G-unit exit 0, `Ran 69 tests in 52.065s`, OK; G-where exit 0. Leftover-process check by command line (`_supervise`, the tests' temp prefix, `stub`): none.
|
||||
- Live smoke per plan §7 "Phase 1 tests and smoke", in the scratch clone (`…\scratchpad\headless-forks-p0\clone`, HEAD `9d3ddc1`, clean), run log `…\headless-forks-p0\smoke1\2026-10-16-15-smoke-run.md`, state dir beside it. Every `wait` ran from Bash with `timeout: 600000`. Briefs in `…\smoke1\brief-*.md`.
|
||||
- `init --model claude-opus-5-5 --cwd <clone>` → exit 0; binary via `CLAUDE_CODE_EXECPATH` (2.1.299); admission "exact id in the clone's `.claude/settings.json`".
|
||||
- `train --base B1` (read 3 Spire files, no edits) → `wait --all` exit 0: `ok`, 11.6 s, base context 23,676, cost $0.2129.
|
||||
- `fork --block S1` (sequential; write, `git diff --check`, commit, note) → `wait --all` exit 0: `cache: hit`, `fingerprint: ok`, `models_used: ["claude-opus-5-5"]`, note `notes/S1.md`, clone commit `38e2605`, cost Δ $0.0878.
|
||||
- `fork --block S2` → `wait --all` exit 0: `hit`, `ok`, same model, note `notes/S2.md`, commit `447b6cd`, cost Δ $0.0953.
|
||||
- `continue --job j0002` (append a line, commit) → `wait --all` exit 0: `ok`, commit `a54bb59`, cost Δ $0.0955 (= its raw `total_cost_usd` 0.39614 − S1's 0.30066).
|
||||
- `fork --block K1` (long read loop) → `wait j0005 --timeout 25` exit **3** (`running`, 5 turns) → `kill --job j0005`: snapshot supervisor `python.exe` 25952, `conhost.exe` 11208, `claude.exe` 29560, `conhost.exe` 5932; `taskkill_rc` 0; `survivors: []`. Independent check by pid + creation time: all four dead. Command-line sweep (`smoke1`, `_supervise`, the clone path): nothing. → `wait --all` exit **4** (`killed`, `reason: kill`, tokens and cost `null`).
|
||||
- `list` → `…\smoke1\list-final.json`.
|
||||
- First-request cache reads (raw streams): S1, S2, K1 each 23,674 of the base's 23,676 (0.9999); the continue 27,192 (the fork's own longer prefix).
|
||||
- All five streams ran `claude_code_version` 2.1.299. `raw/j0002.env.json` carries `CLAUDE_CODE_EXECPATH` (the 2.1.299 path) and `SPIRE_FORKS_CHILD=1`, and none of `CLAUDE_CODE_MESSAGING_TOKEN`, `VIRTUAL_ENV`, `CLAUDE_EFFORT`.
|
||||
- **No visible window**: checked during S1, the continue and K1 (supervisor + `claude.exe` + 2 `conhost.exe` each): no visible window of the tree, no visible console or Windows Terminal window on the desktop.
|
||||
- Ledger vs results (`…\probes\smoke_ledger.py`): 5 ledger lines, 5 result files; for every job, `status`, `flags`, `tokens`, `cost_delta_usd`, `cache`, `fingerprint`, `models_used`, `session`, `parent_session`, `turns`, `kind`, `block`, `base` are equal in both; every cost Δ equals the raw `total_cost_usd` difference.
|
||||
- Phase-end tests (15:55): G-unit exit 0, `Ran 69 tests in 51.915s`, OK; G-where exit 0.
|
||||
- Smoke results (from the ledger):
|
||||
|
||||
| Job | Kind | Block | Status | Cache | Fingerprint | Models used | in | out | cache write (1h) | cache read | Cost Δ | Turns | Wall s |
|
||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
||||
| j0001 | train | — | ok | — | ok | claude-opus-5-5 | 4 | 1,004 | 23,674 | 16,913 | $0.2129 | 4 | 11.6 |
|
||||
| j0002 | fork | S1 | ok | hit | ok | claude-opus-5-5 | 12 | 1,452 | 3,518 | 152,790 | $0.0878 | 6 | 18.6 |
|
||||
| j0003 | fork | S2 | ok | hit | ok | claude-opus-5-5 | 12 | 1,670 | 3,885 | 154,044 | $0.0953 | 6 | 23.1 |
|
||||
| j0004 | continue | S1 | ok | hit | ok | claude-opus-5-5 | 12 | 1,777 | 3,263 | 168,958 | $0.0955 | 8 | 20.1 |
|
||||
| j0005 | fork | K1 | killed (`kill`) | hit | ok | — | — | — | — | — | — | 6 | 26.0 |
|
||||
|
||||
Ledger file: `…\headless-forks-p0\smoke1\2026-10-16-15-smoke-run-forks\ledger.jsonl` (5 lines; not committed, it is scratch).
|
||||
- Deviations from plan: none in the smoke steps. The plan's "kill leaves no `claude` process behind" was checked by recorded pid + creation time (A18) and by a command-line sweep, not by process name.
|
||||
- Flagged for review:
|
||||
- `jobs/<job>.json` `turns` counts assistant message ids (2 for the training) while the result's `turns` is `num_turns` (4). Only the result/ledger value is reported; the job-file field is a progress counter. Harmless, but two meanings under one name.
|
||||
- The `continue` result's cache verdict is computed against the **base** context (27,192 / 23,676 → `hit`); its `parent_session` is the base session, not the fork it continues (1.2's documented choice).
|
||||
- Supervisor survival across the end of the Athanor's turn is still untested: every smoke job finished or was killed inside this turn (the procedure forbids hand-back with running jobs anyway).
|
||||
- The smoke base is small (23,676 tokens); the large-base behaviour was covered in P0.2, not re-run through the helper.
|
||||
- Left for later: Phase 2 (warmth inference, pings, `rebase`, `usage`, `tick`).
|
||||
- Expected broken: `rebase`, `usage`, `tick` exit 2 "not implemented" (Phase 2).
|
||||
- Commits: no code; only the run-log commit that adds this note and the Phase 1 close (`📝 Headless forks Phase 1: smoke results and phase close`).
|
||||
|
||||
### Phase 1 close
|
||||
|
||||
- Gate: G-where after 1.1, 1.2 and at phase end — exit 0 each time, one JSON object.
|
||||
- Tests: G-unit at phase end (15:55) — exit 0, 69 tests, 51.9 s. Live smoke — all plan §7 Phase 1 criteria met (above). No fallout block was needed, so no fix agent ran.
|
||||
- Flags for the reviewer (each with its block):
|
||||
- Phase 0 (handed over by Igor as flags for this review): every deviation and flag in "Block 0" and "Phase 0 close" above — P0.6 started before P0.1 (c) finished; `--no-hardlinks` clone; six tool-less calls outside the clone (main checkout, worktree); separate scratch dirs for `--agent` and P0.8; (d) produced with `TaskStop` because the Bash tool backgrounds at timeout; effort case run inside P0.2; rung-3 runs `r3-main`/`r3-tkill` on 2.1.283; P0.8 in an untrusted dir; effort unobservable; orphan background command; P0.6 ping read 0.916; visible windows before the fix and the retest; the 20-min clone; the clock jump.
|
||||
- 1.1: `preamble.md` written in 1.1 instead of 1.2 (the digest moved it: `init` hashes it).
|
||||
- 1.1: every deviation and "Flagged for review" line of its note — argparse sets declared early; N3 guard in the dispatch; `--help` as JSON; internal-error exit 2; extra `init` flags and nested thresholds; `where --binary`; two extra preamble lines; effort/permission-mode value sets (effort checked against `claude --help` 2.1.299 by the Athanor: match); per-run mcp path in the fingerprint hash; comma-splitting outside parentheses; stale-lock race window; invalid settings skipped, `[]` admits nothing; `ANTHROPIC_BASE_URL` kept and listed as unknown; access-denied treated as alive; `/tmp`-style paths; the permissive model regex.
|
||||
- 1.2: every deviation and "Flagged for review" line of its note — float `--max-minutes`; lost reaper before the cap and killing the leftover tree; immediate kill on the restriction warning; post-exit descendant sweep; no overrides on `train`; `wait --all` "settled" semantics; the reason vocabulary (timeout has `reason: null`); precedence of failure reasons; null usage without a result; train `last_hit` from its last event; continue without template, its parent session and cost basis; note detection; failed-base name reuse; `kill` of a finished job; the kill/finalise race (stale lock, possible duplicate ledger line); `last_orchestrator_call_at` at wait start/end only; stall on any stdout line; pid-reuse guard untested; `spawn_failed` only visible in `wait`.
|
||||
- 1.2: not tested — POSIX path, `--agent` drift, pid-reuse guard.
|
||||
- 1.3: the four flags in its note.
|
||||
- Phase 1 as a whole: the contract digest `docs/workpad/plans/2026-10-16-12-headless-forks-phase1-contract.md` (commit `670401d`) is an Athanor-written brief that pins semantics the build plan left open (state layout, CIM command, scrub additions incl. `CLAUDE_CODE_EXECPATH` and `SPIRE_FORKS_CHILD`, reason fields, the `init` idempotency rule, C8 admission rule). The reviewer should check it against the build plan rather than take it as given.
|
||||
- Not run / untested: supervisor survival past the Athanor's hand-back; POSIX; a large base through the helper; `stalled` with a real `claude` (stub only); `lost` with a real `claude` (stub only).
|
||||
- Spend (Phase 1): live smoke $0.49 client estimate (`total_cost_usd` of the four completed calls' deltas; the killed fork reported none). Unit tests spend nothing (stub). Subagent tokens: 1.1 211,075; 1.2 337,053 (harness totals); the Athanor's own unknown.
|
||||
- Processes at hand-back: none from this phase (command-line sweep at 15:54, and the suite's own teardown check).
|
||||
- Status: provisional until review, fix pass and re-check close.
|
||||
|
||||
Reference in New Issue
Block a user