Skip to content

Fix: prevent premature active-Build status handoffs - #1114

Merged
StarshipSuperjam merged 21 commits into
mainfrom
codex/active-build-continuity
Aug 27, 2026
Merged

Fix: prevent premature active-Build status handoffs#1114
StarshipSuperjam merged 21 commits into
mainfrom
codex/active-build-continuity

Conversation

@StarshipSuperjam

@StarshipSuperjam StarshipSuperjam commented Aug 27, 2026

Copy link
Copy Markdown
Owner

A green mechanical check below shows this change conforms to the engine's rules — not that it is correct. What covers correctness is the behavioural steps in Review you can run yourself and the change's honest self-report — not a reading of the diff for defects; a green check is never a substitute for that. Your merge is the binding gate.

About those checks: only the one that runs when the change is proposed for merge can stop a risky merge — a check that ran while the change was still being written is early advice. The engine's checks are proven against deliberately broken examples they must catch — the custom ones each against their own, the standard kinds against one shared example — so a passing check can't be one that quietly did nothing; a few are openly-noted exceptions where that kind of proof doesn't apply. Either way that speaks to the check, not to whether this change is right. And a check that could not run leaves its area unverified.

Purpose

Keep active Builds moving through durable model instructions while reserving operator-visible stops for genuine completion or authority boundaries.

The first implementation's Stop correction appeared as repeated operator-visible Hook feedback cards, replacing silent mid-Build idling with noisy intervention machinery.

  • Place the continue-until-terminal rule in the persistent shared and provider instruction floors, including Claude's compact re-ground pointer.
  • Remove the hard active-Build Stop evaluator whose correction is rendered as visible Hook feedback in Codex.
  • Keep genuine finding disposition finite and preserve the concise model-action self-wakeup denial.
  • Withdraw unused model-authored terminal authority and add an operator-runnable proof of the repaired boundary.
  • Repair the coordinator's rebase/reconcile resume deadlock while retaining strict wrong-worktree refusal.

Impact: Long unattended Builds are less likely to idle after a mere progress report, without filling the operator transcript with hook governance.

Scope

Repair active-Build continuity so it is durable for the model and quiet for the operator.

  • Shared conduct and provider-root instructions now define progress commentary as non-terminal during actionable Builds.
  • The routine active-Build Stop evaluator and its continuity state schema are removed from the close path.
  • Finding disposition remains the sole registered Stop owner and retains finite fail-open behavior.
  • The recognized self-wakeup denial remains concise, model-action scoped, and free of proactive toggle messaging.
  • Legacy terminal-condition compatibility is inert and rejects model-authored authority.
  • Tests, demo, CI assurance, knowledge graph, and generated provider surfaces are synchronized.
  • The coordinator's mandatory rebase reconciliation now advances the verified Build lineage and remains fail-closed for a different worktree.

Change profile — the shape of this pull request at a glance:

  • Size: 27 files changed, +279 / −79 lines.
  • Kinds of thing touched: 13 tools, 3 policys, 1 codex-skill, 1 conduct, 1 doc, 1 operation, 1 schema, 1 skill, 5 other files (not in the engine's map).
  • Where: .engine/tools, .engine/policies, .engine/provisioning, .agents/skills, .claude/skills, .engine/conduct, .engine/docs, .engine/knowledge, .engine/operations, .engine/schemas, AGENTS.md, CLAUDE.md.
  • Shape: 21 commits on this branch — a standalone change unless a Part of #N line below says it is one slice of a larger effort.

This is a description, not a gate — it never blocks a merge. It is here so you can weigh the change by what it touches, not by its line count.

Impact: The result is a cross-provider behavior repair with focused Engine state, hook, policy, test, and generated-surface updates.

Behaviors

The capabilities this change delivers, each with the test that exercises it.

  • An authorized actionable Build treats a progress report as commentary and continues unless it is complete or reaches a real authority boundary. — test_boot.py locks the rule into both provider root floors., demo_active_build_continuity.py verifies Codex, Claude, and Claude compact surfaces. (The rule is generated into persistent provider instructions rather than relying on transient conversation history.)
  • Routine active-Build Stop handling no longer emits operator-visible continuation feedback cards. — test_close.py and test_hooks.py verify the remaining registered Stop owner and finite repeated-Stop behavior., demo_active_build_continuity.py verifies the routine continuity evaluator is absent from close.py. (The deleted build_continuity evaluator and continuity-state schema cannot silently retain the old hard-Stop path.)
  • The recognized model self-wakeup action remains denied with concise continue-or-wait guidance and no toggle tutorial. — test_session_economy.py exercises the recognized action boundary and denial copy., demo_active_build_continuity.py verifies denial text and the absence of toggle names. (Operator-created and platform scheduling remain outside the model-action restriction.)
  • Model-authored terminal-condition data cannot manufacture authority. — test_build_state_store.py rejects non-null legacy terminal claims., test_build_coordinator.py verifies new state and status omit the inactive field. (Only legacy null compatibility remains for the in-flight snapshot.)
  • A required target-branch rebase can re-anchor the Build without disabling wrong-worktree protection or stranding later coordinator verbs. — test_build_coordinator.py exercises clean and divergent reconcile paths, rewritten-head admission, legacy lineage anchors, and wrong-worktree refusal. (Only reconcile waives the pre-reconcile ancestry mismatch; successful reconciliation advances the durable lineage anchor.)

Out of scope

This is a quiet continuity repair, not a general scheduler or a guarantee against runtime termination.

  • Provider outages, process death, hard limits, or an application closed by the operator. — No in-repository policy can keep a terminated runtime executing.
  • Operator-created automations, platform Routine scheduling, and provider scheduling capability. — The restriction intentionally applies only to the recognized action invoked by the session model.
  • Arbitrary shell sleeps, loops, goals, or polling behavior outside recognized action identifiers. — The action gate cannot honestly claim semantic enforcement over unrecognized behavior.
  • Automatic merging or bypassing a valid authority escalation. — Submission still ends with a PR for operator approval, and real authority boundaries remain valid stops.

Impact: The repair changes session guidance and Engine-owned enforcement surfaces only.

Risk

5 risks, ranked, each with the bound that contains it.

  • Persistent guidance can reduce premature handoffs but cannot mechanically restart a model after the provider has ended execution (the most safety-sensitive edit). The limitation is explicit; both provider floors and Claude compaction grounding carry the rule, and no false deterministic guarantee is made.
  • Removing the routine evaluator could accidentally weaken genuine finding stops. close.py retains the registered finding-disposition owner, with repeated-Stop and demo coverage proving its finite behavior.
  • The wakeup denial could expand into operator-facing configuration governance. Tests and demo lock the denial to recognized model action copy without toggle names, notices, or resumption prompts.
  • Legacy terminal-condition state could be mistaken for trusted authority. New state omits it and compatibility accepts only null while rejecting every non-null claim.
  • Allowing reconciliation past a stale ancestry anchor could mask execution in the wrong checkout. The waiver is exclusive to reconcile, wrong-worktree identity still refuses, exact contribution comparison runs before mutation, and successful events become durable lineage anchors.
  • Guardrail disclosure. The most sensitive change removes a Stop-path enforcement mechanism, so persistent instruction coverage, provider-specific proof, finite finding ownership, and candid limitation disclosure carry the safety bound.
  • Accepted residual (SC-01, operator decision 2026-08-27). The operator chose quiet persistent model guidance over a deterministic Stop correction that Codex renders as routine operator-visible Hook feedback; the inability to restart a provider-ended model is disclosed.

Impact: The change favors a quiet and honest best-effort continuity rule over a deterministic mechanism that visibly interrupts the operator.

Validation

Exact-head candidate validation, focused reconciliation and continuity suites, the six-branch demo, generated-artifact checks, and final reconciled independent QA are green.

  • Engine CI — the full mechanical check suite — passed at 95be335728ff — candidate evidence, not merge evidence (log sha256:83a74f2409182ed26777d3bfff8f0d1cbd755e1f1bb985a010148d4a2aa9b50f)
  • Engine self-tests — affected selection against the merge base, with a run record — passed at 95be335728ff, scope full (tree 241113f840bc) — candidate evidence, not merge evidence (log sha256:57d904fb2d9553077a7d6ee7c637a415d0b84198ebe9d4097cc8279653f7991f)
  • Merge proof — imported engine-ci run 33120740665 for 95be335728ff (tree 241113f840bc), verified via its tree-bound receipt.
  • Caveat: The continuity rule is model guidance, not a hidden provider continuation primitive; a model or provider can still terminate despite the instruction.
  • The engine's live helpers answered this session.
  • Regeneration updated 4 of the engine's generated surfaces (.codex/agents, .engine/docs/ci-assurance.md, .engine/knowledge/graph.json, .engine/provisioning/module-surfaces.json) from the final tree — generated paths only.

Impact: The exact rebased commit is locally proven across the full Engine suite and focused reconciliation tests; final engine-ci proof is imported from GitHub before readiness.

Review

Standard QA drove the quiet repair and ended clean after one narrow comment correction.

  • Coverage. standard depth. Plan review ran before any code, on the plan side: architecture, feasibility, product-intent, risk-governance read the sealed plan; the deliverable review (divergence-hunter, security-governance, spec-conformance, technical-integrity, usability) ran after. What effort those reviewers ran at is self-reported by the spawning session and by the reviewers themselves; nothing in this engine verifies it.
  • Code execution. With this PR, reviewers ran the change's code to judge it — one or more in a throwaway copy that never touched your project, and one or more directly in this checkout.
  • Initial Standard QA found that the visible hard-Stop path contradicted the repaired operator experience, Codex lacked equivalent persistent grounding, terminal claims were over-authoritative, and executable proof was incomplete; the implementation was repaired accordingly.
  • Scoped repair QA found only two stale repeated-Stop ownership comments; those comments were corrected without changing runtime behavior.
  • Final scoped confirmation re-read the single authored comment-fix commit across spec conformance, divergence, and usability; all three lenses returned clean.
  • After current main required a rebase, final reconciled QA re-read the exact rebased contribution and the coordinator lineage fix across the same three lenses; all returned clean.
  • The plan review in full. 13 finding(s), of which 0 render above. The other 13 were settled before the build began (10 blocking, 3 serious) and are not restated here. The complete text stays in this workstation's plan library, which is local and never published — it is not readable from a clone of this repository.
  • Operator decisions at this plan's consent gates, in their own words. Recorded by the session, not independently proven.
    • approve (2026-08-27T18:20:44Z) — “Good. Lets do the design review at standard depth.”
    • findings-presented (2026-08-27T19:14:59Z) — “Proceed wil the seal on plan revision 4.”
    • seal (2026-08-27T19:15:08Z) — “Proceed wil the seal on plan revision 4.”
    • bind (2026-08-27T19:18:13Z) — “$engine-start”
  • Finding SC-01. QA correctly noted that quiet guidance cannot mechanically restart a model after a provider ends execution; restoring the hard Stop correction was rejected because it recreates the operator-visible Hook feedback defect.
  • Finding SC-04. QA asked about additional wakeup aliases; the current provider inventory exposes no known alias beyond canonical ScheduleWakeup, so unknown actions continue to fail toward allow rather than inventing deny vocabulary.
  • The rest of the review record. A further 10 finding(s) were raised and settled without leaving anything outstanding — 8 in deliverable (4 serious, 3 blocking, 1 nit); 2 in repair (2 nit). Each is recorded in full in this Build's own evidence, which travels with the handoff.
  • Plan-review disagreement ARCH-1: The plan now requires one durable, atomic corrective-continuation claim per unchanged substantive-progress epoch, independent of ordinary snapshot bookkeeping.
  • Plan-review disagreement ARCH-2: The plan now requires trusted, kind-specific evidence before any terminal condition can stop a Build.
  • Plan-review disagreement FEAS-1: The one-correction budget will be enforced by a separate atomic record that survives retries and cannot be reopened by routine coordinator writes.
  • Plan-review disagreement FEAS-2: The wakeup restriction is limited to model-callable scheduling actions the gate can identify; the plan no longer claims to police every possible loop or polling behavior.
  • Plan-review disagreement PI-1: Only substantive Build progress can begin a new correction epoch; administrative writes cannot grant another continuation.
  • Plan-review disagreement PI-2: Operator pause and cancellation remain in force until a trusted resume or new Build; other holds expire only when their own evidence becomes stale.
  • Plan-review disagreement PI-3: A model cannot end a Build merely by labeling its own state terminal; the condition must be backed by accepted evidence.
  • Plan-review disagreement RG-1: Concurrent or retried Stop calls can consume at most one corrective continuation for the same unchanged progress epoch.
  • Plan-review disagreement RG-2: Terminal conditions must come from trusted, validated evidence rather than an unverified model assertion.
  • Plan-review disagreement RG-3: Each stop condition gets the lifetime appropriate to its authority; unrelated code progress cannot silently cancel an operator pause.
  • Escalation recorded. repair round 2 of 3 proceeded past the escalation point on recorded operator guidance: This is the final QA confirmation requested after implementation, not a plan review or a new implementation review.
  • Escalation recorded. repair round 3 of 3 proceeded past the escalation point on recorded operator guidance: Complete final QA on the reconciled implementation and the coordinator deadlock fix; do not reopen plan design or create another plan.
  • Repair rounds. 3 round(s) ran after the deliverable review, 3 of which dispatched a review panel. A panel round is what spends the budget; the budget is 3 panel rounds, and 6 rounds of any kind is the absolute ceiling. Passing either stop needs recorded operator guidance, disclosed above. Whether the repairs are widening is judged on code and guarded surface only; regenerated and documentation churn is listed below but never compared. A file counts as guarded if it was protected at ANY point since the deliverable review, so a guard retired mid-build still reads as guarded rather than quietly becoming ordinary work.
    • round 1: counted, scoped re-review across 3 lenses, lenses named deliberately; the fix moved 13 authored file(s), 2 derived file(s), 4 guarded file(s), 260 lines
      • guarded: .engine/policies/provider-exceptions.json, .engine/tools/close.py, .engine/tools/hooks.py, .engine/tools/session_economy.py
      • authored: .engine/operations/boot-session-start.md, .engine/policies/session-economy.md, .engine/provisioning/first-run-assets.json, .engine/schemas/build-state.v2.json and 9 more
      • derived: .engine/knowledge/graph.json, .engine/provisioning/module-surfaces.json
    • round 2: counted, scoped re-review across 3 lenses, lenses named deliberately; the fix moved 1 authored file(s), 2 derived file(s), 1 guarded file(s), 17 lines
      • guarded: .engine/tools/close.py
      • authored: .engine/tools/test_hooks.py
      • derived: .engine/docs/ci-assurance.md, .engine/knowledge/graph.json
    • round 3: counted, scoped re-review across 3 lenses, lenses named deliberately (the base moved, so this round is measured from the deliverable review and its size is the branch's, not one fix's); the fix moved 19 authored file(s), 4 derived file(s), 4 guarded file(s), 358 lines
      • guarded: .engine/policies/provider-exceptions.json, .engine/tools/close.py, .engine/tools/hooks.py, .engine/tools/session_economy.py
      • authored: .claude/skills/engine-start/SKILL.md, .engine/conduct/defaults.md, .engine/operations/boot-session-start.md, .engine/policies/escalation.md and 15 more
      • derived: .agents/skills/engine-start/SKILL.md, .engine/docs/ci-assurance.md, .engine/knowledge/graph.json, .engine/provisioning/module-surfaces.json
    • Worth a look before you merge. the last two counted rounds were measured from different starting points, so whether the repairs are widening could not be judged. Read their sizes above as separate facts, not as a trend.
  • Reviewed vs submitted. submitted 95be335728ff, after: history was rewritten and the review bindings were re-anchored from 99393a6dd3ac to 78c2e72a7391 (base 84482949413078c2e72a7391, the contribution differs at: .engine/docs/ci-assurance.md, .engine/knowledge/graph.json, .engine/provisioning/module-surfaces.json, .engine/tools/boot.py, .engine/tools/build_coordinator.py, .engine/tools/test_boot.py, .engine/tools/test_build_coordinator.py); a post-review repair carried 78c2e72a7391 to 95be335728ff (27 files changed, 279 insertions(+), 79 deletions(-)). These are listed by kind; their order relative to one another is not recorded.

Spec-derived acceptance steps

Success is defined by this plan's obligations, accepted Engine policy, provider Stop semantics, and the operator demo; no product specification is claimed.

Impact: The final implementation and its comment-only follow-up are covered by clean independent QA receipts.

Demonstration

A step you can run yourself that drives the changed surface and can genuinely fail.

  • Run: uv run --directory .engine --frozen -- python tools/demo_active_build_continuity.py
  • It PASSES when: The command reports all six quiet-continuity branches passed and exits zero.
  • It FAILS when: Any labeled check fails or the command exits nonzero.

Impact: Run it to watch the change work — an unrun step is a promise, not proof.

Files of interest

The paths that most determine this change.

  • .engine/conduct/defaults.md — Defines the shared active-Build continuity law.
  • AGENTS.md — Carries the continuity rule in Codex's persistent project instruction floor.
  • CLAUDE.md — Carries the same rule in Claude's persistent project instruction floor.
  • .engine/tools/close.py — Owns genuine finding disposition without the removed routine continuity feedback path.
  • .engine/tools/session_economy.py — Implements the narrow recognized model-action wakeup denial.
  • .engine/tools/demo_active_build_continuity.py — Provides the operator-runnable end-to-end construction proof.
  • .engine/tools/build_coordinator.py — Keeps the mandatory post-review rebase and evidence re-anchoring path usable without weakening worktree identity.

Impact: These files contain the durable behavior boundary, action gate, and executable proof.

AI involvement

How this change was produced and who decided what.

  • Codex (GPT-5.6) — Implemented the repair, ran validation, maintained the Build record, and prepared the pull request.
  • Engine QA panel (Independent Codex reviewer agents) — Reviewed spec conformance, divergence, and usability at Standard depth, then confirmed the reviewer-requested comment repair.
  • Operator decision, 2026-08-27: Keep the wakeup restriction scoped to model actions without proactive operator-facing toggle governance.
  • Operator decision, 2026-08-27: Remove routine operator-visible Stop feedback and use persistent model guidance, accepting that it cannot mechanically restart a model after a provider ends the turn.
  • Operator decision, 2026-08-27: Treat this as an implementation repair to sealed plan revision 4, with QA after the repair and no successor plan review.
  • The operator chose quiet model-action guidance and rejected routine visible Stop enforcement; Codex implemented that boundary, generated artifacts, and gathered independent QA evidence.

Impact: AI performed the implementation, mechanical validation, and reviewer orchestration; the operator retained product intent, scope, and acceptance authority.

Release-Impact: patch — backward-compatible correction or change to an existing feature

@StarshipSuperjam StarshipSuperjam added the engine-coordinator-owned Staged by the Build coordinator; reach ready only through submit apply. label Aug 27, 2026
@StarshipSuperjam
StarshipSuperjam force-pushed the codex/active-build-continuity branch from 99393a6 to 95be335 Compare August 27, 2026 22:01
@StarshipSuperjam
StarshipSuperjam marked this pull request as ready for review August 27, 2026 22:16
@StarshipSuperjam
StarshipSuperjam merged commit 28a9ce2 into main Aug 27, 2026
10 checks passed
@StarshipSuperjam
StarshipSuperjam deleted the codex/active-build-continuity branch August 27, 2026 22:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

engine-coordinator-owned Staged by the Build coordinator; reach ready only through submit apply.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant