You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
spec(v3.0 r7)+orchestrate: Codex round 2 — the cure had the disease
DO NOT BUILD, 8 findings, 3 critical. Closed before wave 2 dispatches, so they
land ahead of the jobs they affect.
CRITICAL 1, and it is the finding of the day: task-17 builds the integration
authority and NOTHING was required to call it. Neither /v:dispatch nor /v:resume
had to invoke the gate, and task-9 did not even depend on task-17, so the script
might not exist in its worktree. That is precisely the defect this whole release
exists to fix -- 7,883 lines of correct sizing code with no caller -- reproduced
inside its own cure. task-9 now depends on task-17, dispatch and resume must
invoke the gate before integrating any commit, and AC-24 tests the call path
rather than the standalone script.
CRITICAL 2: 'atomic recheck' was an assertion. The recheck now lands behind an
expected-HEAD update-ref compare-and-swap, and the tests must prove a substituted
path, a mutated taxonomy and a stale concurrent authorization all fail.
CRITICAL 3: the spec on disk was r4 with 23 criteria while the manifest had 25
and task-13 was told they were copied verbatim from the spec -- an impossible
instruction. Spec is now r7 with AC-24 and AC-25 present.
Also: this run is pinned to the pre-cutover dispatcher/resume contract through
release (task-9 rewrites the very mechanism the remaining waves need); engine
selection PROBES a clamped spawn instead of inferring private-option support
from the version floor; UserPromptSubmit becomes an idempotent nudge gated on
'no active run and no covering record' rather than something that mints a record
on every prompt; the breaker numerator is negative actual outcomes; duration_ms
and failures[] reach AC-11; merge-at-most-once joins Record idempotence; and
AC-20 stops promising a universal Bash deny the design itself calls impossible.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: commands/v-epic.md
+125-1Lines changed: 125 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -133,6 +133,106 @@ Skip this entire subsection when §0's watch binding found `autonomy.watch` abse
133
133
A crash between the delete and the create leaves the epic temporarily Tier-1-unarmed rather than doubled — the conservative choice: Tier-2 (if armed) still covers resurrection in the interim, and worst case the epic simply waits for the next re-entry (human or Tier-2-fired) to re-arm Tier-1, which step 1's dedup (above) also protects against ever leaving two live Tier-1 entries behind.
134
134
4. **Commit** the `epic-state.json` writes from steps 1–3 (§9) before continuing to §1.
135
135
136
+
### 0d. Goal-condition arming (v2.18 Feature A, marathon-only, OPT-IN — offer it, never arm silently)
137
+
138
+
The armed goal is this plugin's only **blocking** primitive: a `Stop` hook
139
+
([`hooks/epic-goal-stop.sh`](../hooks/epic-goal-stop.sh), registered with `|| true`) that refuses
140
+
to let the turn end while a deterministically-evaluated goal is armed and unmet. It is orthogonal to
141
+
watch — watch resurrects an epic *after* a death, the goal stops the turn ending *before* one. Full
# --os {macos,linux} to override the auto-detected target
219
+
```
220
+
221
+
-**The offer is the whole wiring.** The shim prints a launchd plist / crontab line plus a runbook
222
+
and installs nothing; `/v:epic` runs it and shows the output. **You** must not run `launchctl`,
223
+
`crontab`, or any installer on the user's behalf — the shim's own AST selftest asserts it makes
224
+
exactly one `subprocess` call naming neither, and doing it from here would relocate exactly the
225
+
behavior that selftest forbids.
226
+
-**Never pre-fill `--allow-build`.** Its default artifact is the safe subset: the fired session
227
+
claims, checks liveness and reports, then **stops** — it refuses the build/commit/re-arm steps, and
228
+
that refusal is the safety system. `--allow-build` widens the allowlist to run a marathon
229
+
unattended; offer it only if the user asks for it, and never emit any permission-bypass flag.
230
+
-**`--watch` here is a presentation flag only.** It requests this offer; it does **not** opt an epic
231
+
into watch. That is `--init --watch` on a NEW epic (step 3), and the persisted `autonomy.watch`
232
+
stays the sole authority afterwards.
233
+
- The shim removes the desktop-app dependency; it does **not** make anything run while the machine
234
+
sleeps. Repeat the honest boundary below when you print it.
235
+
136
236
### 1. Per-iteration progress + breaker check (before every feature)
137
237
138
238
At the top of each loop pass, pick a **stable cycle id for this pass** (an incrementing counter held in your own scratch state, or a UUID minted once per pass and reused for every call *within* that same pass, so one pass is never double-counted):
@@ -348,6 +448,30 @@ Skip entirely when §0's watch binding found `autonomy.watch` absent/false. Othe
348
448
349
449
No task/entry matching the exact id/marker, on either tier, is expected and harmless — not a failure, and **not a controlled error either**: `--record-watcher-disarmed` on a `(provider, task_id)` pair this registry never recorded (an older-convention id from before this fix, or a create that crashed before its own `--record-watcher-armed` write) succeeds as a no-op (v2.11 MEDIUM-4 fix) rather than aborting the sweep — so both sweeps above always run to completion regardless of what the registry does or doesn't already know about. Because both sweeps key off the PROVIDER's own list (not the registry) and match EXACTLY (not by a prefix that could cross epics), a task that was created but never recorded is still found and deleted here, and a different epic's watcher is never touched — there is no crash window where a Tier-2 task survives forever, and no cross-epic collision. Commit the resulting `--record-watcher-disarmed` writes (§9) co-located with the SAME commit that records the terminal status — never leave a disarm uncommitted, per the v2.6.4 rule §9 already states.
350
450
451
+
### Goal disarm (v2.18, run at EVERY terminal exit — §7 and §8, only when a goal was armed)
452
+
453
+
Skip entirely when §0d never armed a goal. Otherwise, right before this invocation stops at **any**
454
+
terminal outcome — `done` (§8), `blocked_needing_human` from a tripped breaker or `halt_epic` (§7),
455
+
or exhausted reachable work (§7) — pop the armed record:
Idempotent by design: disarming when nothing is armed is a clean success with `mutated: false` and
464
+
writes nothing, so it is always safe to run. **It is a tidy-up, not a safety mechanism** — the hook
465
+
already stops holding the turn open by itself once the goal is `met` or the epic is `terminal`, so a
466
+
crash before this step cannot leave a session wedged; what it prevents is a *stale* record that a
467
+
later re-arm would have to `--replace-arm` around. Commit the write (§9) in the SAME commit as the
468
+
terminal status, exactly like the watch disarm above.
469
+
470
+
**Report `met`, not "the turn was released."** Take the terminal wording from `--goal-status`'s `met`
471
+
field (or the epic's own summary), never from the fact that the hook stopped blocking: a
472
+
breaker-tripped or `halt_epic` epic reports `met: false, terminal: true, should_continue: false`, and
473
+
calling that "goal met" would be a fabricated completion claim.
474
+
351
475
### 7. Halt-page runbook (whole-epic block only)
352
476
353
477
Page **only** when the epic itself is blocked — `blocked_needing_human` (tripped breaker or `halt_epic`) or exhausted reachable work. A single `blocked`/abandoned **feature** notice does **not** page here — it batches into the end-of-run report (§8) alongside a successful `done`. Commit first (§9) — the page must describe a state that is actually on disk in git, not one still sitting uncommitted in the worktree. **Run "Watch disarm" above before paging** (watch-only — a no-op when watch is off). The runbook carries, verbatim, every field the spec requires:
(Omit the `arbiter/` path when nothing was written there — e.g. a bare `done` mark.) Trigger points: a feature reaching `done` — **committed together with its `--mark-sample-audit-due` when sampled, so `done` is never on disk without the obligation** (§4); a `--clear-sample-audit-due` on a passed audit (§4); a `--record-audit-failed` reverting a failed sample-audit (§4); every `--record-disposition` + its accompanying `--update` (§5/§6 — `retry_fix`/`halt_feature`/`blocked_external`/`halt_epic`); a `--record-disposition` recovered from a `consumed` `--resume-challenge` (§2 `needs_arbitration`); every `--trip-breaker` (§1/§5/§7); every `--record-final-review` (§8); and once more, belt-and-suspenders, right before the halt-page (§7) or the terminal `done` report (§8). **(v2.11, watch-only, additive):** every `--renew-lease` and `--record-watcher-armed`/`--record-watcher-disarmed` write from §0c or "Watch disarm" — co-located with the SAME commit as the nearby trigger point above (§0c's initial arm/heartbeat batches into the epic's `init` commit or its own first-pass commit; a terminal disarm batches into the SAME commit as the halt-page's or the terminal `done`'s status write) — never a separate uncommitted write.
515
+
(Omit the `arbiter/` path when nothing was written there — e.g. a bare `done` mark.) Trigger points: a feature reaching `done` — **committed together with its `--mark-sample-audit-due` when sampled, so `done` is never on disk without the obligation** (§4); a `--clear-sample-audit-due` on a passed audit (§4); a `--record-audit-failed` reverting a failed sample-audit (§4); every `--record-disposition` + its accompanying `--update` (§5/§6 — `retry_fix`/`halt_feature`/`blocked_external`/`halt_epic`); a `--record-disposition` recovered from a `consumed` `--resume-challenge` (§2 `needs_arbitration`); every `--trip-breaker` (§1/§5/§7); every `--record-final-review` (§8); and once more, belt-and-suspenders, right before the halt-page (§7) or the terminal `done` report (§8). **(v2.11, watch-only, additive):** every `--renew-lease` and `--record-watcher-armed`/`--record-watcher-disarmed` write from §0c or "Watch disarm" — co-located with the SAME commit as the nearby trigger point above (§0c's initial arm/heartbeat batches into the epic's `init` commit or its own first-pass commit; a terminal disarm batches into the SAME commit as the halt-page's or the terminal `done`'s status write) — never a separate uncommitted write. **(v2.18, additive):** the `--arm-goal` write from §0d (batched into §0c's or the first pass's commit) and the `--disarm-goal` write from "Goal disarm" (batched into the SAME commit as the terminal status) — same rule, same reason.
392
516
393
517
### The honest boundary (v2.10 marathon + v2.11 auto-resurrection watch)
0 commit comments