Fix: prevent premature active-Build status handoffs - #1114
Merged
Conversation
StarshipSuperjam
force-pushed
the
codex/active-build-continuity
branch
from
August 27, 2026 22:01
99393a6 to
95be335
Compare
StarshipSuperjam
marked this pull request as ready for review
August 27, 2026 22:16
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
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.
Change profile — the shape of this pull request at a glance:
Part of #Nline 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.
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.)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.)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.)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.)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.
Impact: The repair changes session guidance and Engine-owned enforcement surfaces only.
Risk
5 risks, ranked, each with the bound that contains it.
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.
95be335728ff— candidate evidence, not merge evidence (log sha256:83a74f2409182ed26777d3bfff8f0d1cbd755e1f1bb985a010148d4a2aa9b50f)95be335728ff, scope full (tree241113f840bc) — candidate evidence, not merge evidence (log sha256:57d904fb2d9553077a7d6ee7c637a415d0b84198ebe9d4097cc8279653f7991f)33120740665for95be335728ff(tree241113f840bc), verified via its tree-bound receipt.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.
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.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.ARCH-1: The plan now requires one durable, atomic corrective-continuation claim per unchanged substantive-progress epoch, independent of ordinary snapshot bookkeeping.ARCH-2: The plan now requires trusted, kind-specific evidence before any terminal condition can stop a Build.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.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.PI-1: Only substantive Build progress can begin a new correction epoch; administrative writes cannot grant another continuation.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.PI-3: A model cannot end a Build merely by labeling its own state terminal; the condition must be backed by accepted evidence.RG-1: Concurrent or retried Stop calls can consume at most one corrective continuation for the same unchanged progress epoch.RG-2: Terminal conditions must come from trusted, validated evidence rather than an unverified model assertion.RG-3: Each stop condition gets the lifetime appropriate to its authority; unrelated code progress cannot silently cancel an operator pause..engine/policies/provider-exceptions.json,.engine/tools/close.py,.engine/tools/hooks.py,.engine/tools/session_economy.py.engine/operations/boot-session-start.md,.engine/policies/session-economy.md,.engine/provisioning/first-run-assets.json,.engine/schemas/build-state.v2.jsonand 9 more.engine/knowledge/graph.json,.engine/provisioning/module-surfaces.json.engine/tools/close.py.engine/tools/test_hooks.py.engine/docs/ci-assurance.md,.engine/knowledge/graph.json.engine/policies/provider-exceptions.json,.engine/tools/close.py,.engine/tools/hooks.py,.engine/tools/session_economy.py.claude/skills/engine-start/SKILL.md,.engine/conduct/defaults.md,.engine/operations/boot-session-start.md,.engine/policies/escalation.mdand 15 more.agents/skills/engine-start/SKILL.md,.engine/docs/ci-assurance.md,.engine/knowledge/graph.json,.engine/provisioning/module-surfaces.json95be335728ff, after: history was rewritten and the review bindings were re-anchored from99393a6dd3acto78c2e72a7391(base844829494130→78c2e72a7391, 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 carried78c2e72a7391to95be335728ff(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.
uv run --directory .engine --frozen -- python tools/demo_active_build_continuity.pyImpact: 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.
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