Conversation
Codex exact-head audit — BLOCKEDAudited exact head [P1] Lease takeover makes an already-dispatched unknown result unrepresentable
After takeover, the old immutable intent's fence is necessarily stale. If that intent was dispatched and its response was lost, it must remain unknown and be reconciled by the new holder; abandoning it can lose a remote success and permit a later duplicate. The current schema has no valid record for that required situation. Reproduction: start from accepted fixture Please distinguish a stale pre-dispatch intent, which can be abandoned, from a stale-fenced post-dispatch unknown intent, which the current holder must reconcile without redispatch. Preserve the original immutable dispatch fence while representing the current reconciler's authority, and add accepted takeover-after-unknown plus rejected blind-retry fixtures. [P2] Qualification records are not internally fail-closed
Add status-specific reason/evidence invariants and executable semantic validation for cross-field/time checks (including [P2] The documented owner-stop/escalation contract cannot be encoded durablyThe canonical document says stale head and stale lease stop in Align the policy stop list with the state/doc contract and add a durable dedupe identity (on the work item or a closed escalation record), with duplicate-delivery/restart fixtures proving one owner notification within the configured count. [P2] Mutation intents are not bound to the work generation they authorizeThe work item has a monotonically increasing Bind each intent to [P2] Several required failure fixtures are labels, not executable contract cases
Represent the recovery scenarios as structured records/sequences validated against the contract (or a small normative transition validator) and test their required and forbidden transitions. That makes the fixtures consumable by dependent runtime/provider PRs as #1085 requires. Validation performed
|
Claude audit (merge-authority lane)Head SHA: |
Codex exact-head audit — BLOCKEDAudited exact head The five findings from the previous exact-head audit are materially addressed at the record/fixture level: takeover can now retain an unknown dispatched intent under separate reconciliation authority; qualification status/reason/evidence and time checks exist; owner stop reasons and an escalation key are durable; intents bind work generation; and recovery cases are structured executable sequences. Three remaining authority gaps prevent a PASS. [P1] The normative intent check still approves a stale holder for dispatch or retry
That contradicts Please make the semantic authority check operation-aware and fail closed: compare the intent's original epoch/token, tenant/repository scope, work generation, exact head, and a live current lease before dispatch/retry/result commit; compare [P1] Owner policy is not bound to work/action records, so valid records can exceed authorization and budgetsThe policy schemas define the allowlist, mutation set, and ceilings, but no normative check relates them to an action or work record. This violates the #1085 budget/authority scope and [P1] Recovery validation permits cross-scope takeover and cumulative-counter rollback
A lease from another scope cannot authorize recovery of this intent, and rolling counters backward bypasses the cumulative budget promised at Validation performed
|
Claude audit (merge-authority lane)Head SHA: |
Codex exact-head audit — BLOCKEDAudited exact head Counts: P0=0, P1=3, P2=1. The three P1s from the preceding audit are materially improved: mutation checks now bind the supplied generation, tenant/repository, lease identity, live fence and exact head; policy binding covers record-level authority and budget ceilings; and recovery rejects the previously demonstrated scope, identity, chronology and cumulative-counter rollbacks. Four remaining contract gaps prevent a PASS. [P1] A takeover-confirmed failure cannot perform the contract's same-intent retry
That leaves no truthful record for the documented rule at [P1] Recovery events do not bind the required source state or the actual work edgeThe pair helpers at
The test called a full transition matrix at [P1] Lease cadence binding allows authority beyond the owner TTL and renewal deadline
This materially widens mutation authority beyond the owner policy and contradicts [P2] Closed records still admit contradictory state/reason projectionsThe work schema accepts These contradictions are externally visible metadata and undermine the fail-closed status contract. Add state-specific work reasons and event-specific projection ID/state/reason constraints (or one normative semantic validator), with exhaustive accepted/rejected combinations. Validation performed
|
Claude audit (merge-authority lane)Head SHA: |
Claude audit (merge-authority lane)Head SHA: |
The v1.7 Operator work needs a stable authority and recovery boundary before any service or mutation runtime can safely consume it. This PR adds closed, versioned schemas, a normative semantic and policy-binding validator, and canonical accepted/rejected/executable transition fixtures for policy, provider qualification, work lifecycle, singleton lease fencing, durable mutation intent, response certainty, reconciliation, bounded budgets, and metadata-only projection.
The contract distinguishes stale prepared intents from already-dispatched unknown effects: takeover preserves the immutable work generation, lease identity, dispatch fence, and target while a separately fenced current holder reconciles without redispatch. Dispatch, original-holder retry, takeover-holder retry, reconciliation, and result commit fail closed against an independently supplied live lease, tenant/repository scope, current generation, and exact head. A confirmed failure after takeover may retry under the same intent only when current reconciliation authority matches the independently read lease; the original dispatch fence remains stale and immutable.
policy_binding_errorsbinds state records to the owner policy: tenant and repository admission, mutation authority, action attempts/reconciliations/time/spend, cumulative work time/spend, owner escalations, and lease cadence. Lease renewal and expiry are absolute offsets from the durable current-intervalacquired_atanchor, so shifting both deadlines cannot extend authority. Recovery binds each event to its allowed source and destination action tuples, requires worklast_transitionto equal the actual before-to-after edge, preserves scope and identity, and rejects chronology, timestamp, and cumulative-counter rollback.Terminal work state/reason pairs and projected event/identifier/state/reason families are closed in the schema. The executable catalog covers restart, duplicate delivery, takeover, stale head, timeout, partial success, budget exhaustion, escalation redelivery, and owner stop, plus named negative transitions for known-failure timeout regression, known-success stale-head abandonment, and false work-source edges.
The canonical contract documents human-only merge approval and remains contract-only. This PR does not add an Operator loop, active dispatch, service container, GitHub App mutations, remote Board ingress, or cloud schema changes.
Validation on exact head
531c4530680e53fcf9855a4e6aef4ac2cc2f6f54:git diff --checkpass.Closes #1085