Skip to content

cubs-halogen-probe-1: cubs-iteration executable and kit entries (FRONT-12 bootstrap) - #402

Draft
mecattaf wants to merge 7 commits into
mainfrom
campaign/cubs-iteration
Draft

mecattaf wants to merge 7 commits into
mainfrom
campaign/cubs-iteration

Conversation

@mecattaf

Copy link
Copy Markdown
Owner

The dotfiles half of the 7-day Halogen capability probe on the CUBS tree: one store executable and 120 generated kit entries. Nothing else in this repository moves; no switch, no unit, no arm. Doc: docs/local-ai/cubs-campaign.md. DECISIONS.md 2026-09-16 entry; DEFERRED.md DF-CUBS-1..5.

What is in it

  • pkgs/cubs-iteration/ — a writeShellApplication (runtimeInputs bash, coreutils, curl, findutils, git, gnugrep, gnused, jq, python3, util-linux, pkgs.llm-agents.pi) plus cubs-helpers.py (event-stream summariser, built-in diff guard). Reads one task JSON (or the kit's {worklist, id} pointer) on stdin; flock; receipt as the idempotent done marker; polls worker:8731/health until status ok, busy false (10 s, 20 min, then exit 69 and an outage receipt that never feeds the fuse); records /v1/models and /health.version; git worktree add of ~/agency/<repo> at its current HEAD on campaign/cubs-halogen-probe-1/<id>; optional setup_cmd; ONE fresh pi -p --mode json … --provider halogen --model halogen-qwen3.8-flash-next --thinking <task> --no-extensions --no-skills --no-prompt-templates --no-context-files --no-approve --tools read,bash,edit,grep,find,ls[,write] under a campaign-private PI_CODING_AGENT_DIR; the campaign's tools/spec-diff-guard.sh as the gate (built-in fallback, same rules); validation_cmd under a 10 min timeout; exactly one repair process fed bundle + diff + transcript; commit on pass (only allowed files, never a push); receipt.json in the campaign's schema + execution_id/exit_code, attempts.json beside it; one usage line at $TALLY_USAGE_SOURCE_PATH; SIGTERM → WIP commit + cancelled receipt inside the kernel's 30 s grace; 3-consecutive-fail fuse (exit 2). --dry and --help. Exit codes 0/1/2/64/65/69/75/78/143, documented.
  • home/tally-uplink.nixbuild:CUBS-1..40 (+ scope/eval noops) generated beside the untouched LOCAL-SMOKE trio: argv = the store executable, cwd ~/mecattaf/cubs-campaign, env_allowlist [], usage_source halogen-usage/1 under <rewrite state>/uplink/usage/cubs-*.jsonl, stdin = a static pointer {"worklist": ".../worklists/current.jsonl", "id": "CUBS-<n>"} (a store kit's stdin is static bytes — kit.mjs, uplink.mjs:623, exec.rs:747 — so the day's task cannot live there without a switch per day).
  • tests/tally-uplink/probe-cubs-iteration.sh — hermetic oracle (stub Pi + stub Halogen + throwaway repos), C1–C11.
  • docs/local-ai/cubs-campaign.md — the executable, receipt fields, exit codes, the two operator acts, DEFERRED table.

MEASURED

  • rendered kit: 123 entries; nix build .#checks.x86_64-linux.tally-uplink-topology → rc 0 (the check does not enumerate kit refs; no edit).
  • bash tests/tally-uplink/probe-cubs-iteration.shPROBE cubs-iteration: PASS (SIGTERM → rc 143 in 137 ms with Pi mid-run).
  • bash tests/tally-uplink/probe-FT-3-kit.sh → K1–K6 green; K7 red only because nix flake check --offline --no-build is red on the untouched main checkout today with the same source.drv error (pre-existing, not this change).
  • one real run of the built executable under env -i on a scratch repo against live Halogen with a campaign-private models.json (thinkingFormat qwen, supportsReasoningEffort true), --thinking low: pass first try, 17 s, 4 tool calls, prompt 12337 / completion 405 / reasoning 74 tokens, commit on the task branch, receipt + usage line written. First Pi-with-tools run against Halogen recorded on this box; a smoke, not a capability claim.

The three orchestrator defaults (Tom may flip any)

  1. cards say executor: review so the deployed floor lands the items on gpu-worker without a redeploy;
  2. envelope-pass semantics: with no evaluator lock the lake closes every finished item pass; the proof is the commit + receipt.json + usage line;
  3. --level 1 (cap 1, strictly serial).

The two operator acts left to Tom

  1. the coordinator switch, so the kit is live before the first proposal (an unresolvable argv_ref is a KitError);
  2. the non-dry tally-plan-arm … --level 1 with LAKE_TOKEN from ~/.local/state/tally-rewrite/lake-token in the shell. services.tally-uplink.plan stays null.

Deviations from the brief: the receipt follows the campaign repo's tools/receipt.schema.json (is_error_count, worktree_branch, sha256: digests, observed_failure_mode reserved for the review, the executable's mechanical reading in notes) plus execution_id and exit_code; the kit carries pkgs.llm-agents.pi rather than pi.nix's wrapper (empty roster, --no-extensions; DF-CUBS-5); a worklist line's setup_cmd and relative bundle_path are honoured because day-01.jsonl uses them.

🤖 Generated with Claude Code

mecattaf and others added 4 commits September 16, 2026 11:23
…ase (cubs-halogen-probe-1)

A writeShellApplication for the campaign's kit entries: block on
worker:8731/health until busy:false (10 s poll, 20 min deadline, then exit 69
and a receipt that says outage), one fresh `pi -p --mode json` process on the
task's own git worktree from ~/agency/<repo>'s current HEAD, the campaign's
diff guard (built-in fallback with the same rules), the task's validation
command under a 10 min timeout, exactly one repair process fed bundle + diff
+ transcript, a commit on pass (never a push), receipt.json in the campaign's
schema plus attempts.json, one usage line at $TALLY_USAGE_SOURCE_PATH, a
SIGTERM trap that commits WIP and writes a partial receipt within the
kernel's 30 s grace, and a 3-consecutive-fail fuse (exit 2). --dry prints
the plan; --help lists the exit codes.

Runs under the kernel's empty environment: HOME from the passwd entry, every
tool a store path, the two profile bins appended last for a validation_cmd
that reaches for nix.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…FRONT-12 bootstrap)

120 generated entries beside the untouched LOCAL-SMOKE trio: build:CUBS-<n>
runs the cubs-iteration store executable with cwd ~/mecattaf/cubs-campaign,
an empty env_allowlist, usage_source halogen-usage/1 under the rewrite
state's uplink/usage/cubs-*.jsonl, and a static stdin POINTER
{worklist, id} into worklists/current.jsonl that the script resolves; the
scope()/eval() cells are the existing noopEntry. A kit entry's stdin is
static bytes in a store file (lake kit.mjs, uplink.mjs:623), so the day's
task JSON cannot live there without a switch per day.

MEASURED: the rendered kit carries 123 entries; nix build
.#checks.x86_64-linux.tally-uplink-topology -> rc 0.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…the executable and the CUBS kit

Stub Pi (event stream + scripted edit) and stub Halogen (http.server) in a
scratch dir; throwaway git repos as the CUBS tree. Clauses C1..C11: usage
and exit codes, env -i --dry on the kit's own stdin, pass with commit +
usage line + ledger + idempotent rerun, fail + one repair, the fuse and its
reset, the spec.md guard, outage without touching the fuse, SIGTERM -> WIP
commit + cancelled receipt inside 25 s and a clean retry, the events
summariser, readKit over all 120 CUBS refs, the topology check.

MEASURED: PROBE cubs-iteration: PASS (all clauses).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… receipt, the exit codes, the two operator acts, DF-CUBS-1..5

docs/local-ai/cubs-campaign.md records what cubs-iteration does step by
step, the receipt field sources, the exit-code table, why the kit's stdin is
a pointer (kit.mjs / uplink.mjs:623 / exec.rs:747), the MEASURED kit and
check outputs, the hermetic oracle, one MEASURED real run against Halogen
(pass first try, 17 s, 4 tool calls, usage summed), and the two acts left to
Tom: the coordinator switch and the non-dry arm.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
mecattaf and others added 3 commits September 16, 2026 11:31
…per-attempt timeout -k 30, settings.json, newline gate)

From the smoke-pi-halogen lane (GO-WITH-FIXES): `pi -p` reads a non-TTY
stdin to EOF as prompt text, so every Pi process now gets </dev/null after
the task JSON has been read in full; each Pi process runs under
`timeout --foreground -k 30 <budget>` (1200 s first attempt, 900 s repair)
because a dropped Halogen connection leaves Pi's own auto-retry hanging;
the health gate uses `curl --max-time 5`; preflight requires
pi/settings.json beside models.json (compaction reserveTokens /
keepRecentTokens live there); a trailing-newline gate over the allowed
touched files follows the diff guard (git diff --check misses it); bash tool
calls are already counted per attempt in tool_call_names / attempts.json and
reasoning tokens in usage — the doc now says so. The probe gains clauses for
Pi's stdin, settings.json reachability, the bash count and the newline gate.

MEASURED: PROBE cubs-iteration: PASS.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…g_tokens, attempts_path; timeout exit 124; stray_files emits exactly one JSON array under pipefail

stray_files() captured the guard pipeline and appended `|| echo '[]'`; the guard
exits 1 on any violation (including "empty diff" when nothing is untracked), so
under pipefail it printed two JSON values, `jq --argjson stray` failed, and the
receipt stayed `pending`. It now captures into a local and prints `${out:-[]}`.

probe-cubs-iteration.sh C8b: a tracked-file-only edit and a stray untracked file
both leave a terminal receipt that validates against the campaign's
tools/receipt.schema.json (stdlib validator). C6b/C6c reset the fuse so the
guard clauses no longer blow it for the clauses after them.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
… so campaign days 2-7 need no second coordinator switch

The kit now renders 603 entries: 200 labels x 3 cells, plus the unchanged
LOCAL-SMOKE trio. probe C10 resolves all 200 through the pinned lake's readKit
and refuses build:CUBS-201. docs/local-ai/cubs-campaign.md follows. The fuse
rule is unchanged.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant