← Back to Pull requests

fix(release): recheck verified steps through their immutable identity on resume #2446

Closed
unknown closed this pull request without merging on Oct 21, 2026 02:17 UTC
View on GitHub
unknown unknown commented on Oct 21, 2026 01:40 UTC
Author

Summary

Item 3 of the "now" plan in #2422. Every resume re-drove each journal-verified step through its complete far-side observation: the candidate source proof, the batch verdict bundle and controller attestations, every Draft asset download with signature checks, and each reviewed PR's full inventory. During 2.0.122.0 that cost 25–30 minutes per round and roughly 10 hours of the release, re-proving facts that cannot change.

Change

  • ReleaseDriver rechecks a transition the journal records as verified through the backend's recheck; a begun but unverified transition is still observed in full. A recheck answer is held to the observation rules: verified must carry evidence, and evidence that differs from the record is evidence-conflict. None keeps the step's full observation; an exception is evidence-unknown with its sanitized cause in the failure note.

  • ReleaseBackend takes an optional recheck= and refuses an object that is not one.

  • New tools/release/verified_recheck.py: VerifiedRecheck reads only immutable identities and fails closed on drift.

  • - candidate: the retained transition state still hashes to the recorded evidence; both squash merges (cut, witness) are still their PR's merge commit and reachable canonical history.
    - verification: the executor run is still a completed, passed first attempt of the policy-pinned batch workflow on canonical main, for the witness the candidate recorded; once the reviewed intent record exists it must bind the same batch reference digest, run and target.
    - intent / changelog / promotion / published_record: the PR is still merged from the retained reviewed head, its merge commit is canonical history, and the gate digest recomputed from the retained review receipt and the live merge commit equals the record.
    - draft: the Release under the tag still carries the prepared plan digest, the recorded numeric id (draft or published) and exactly the plan's asset inventory (name, size, uploaded).
    - publication: the dispatched Release is published, not a draft, with the dispatched plan and the plan's asset inventory.
    - runtime / creator: the recorded deployment run is still a completed, passed, dispatched first attempt of the retained dispatch's pinned workflow id, with its head on canonical main.
    - prepared, tag, changelog_site, final answer None: their full observation is already a few local reads or two route fetches.
  • entry_composition.compose_recheck / cli.release_recheck bind it to the request's own operation journals; run and resume enroll it on the backend.

  • lmdj-release skill: the resume paragraph now states what a verified step is rechecked against and that drift still fails closed.
  • Nothing here relaxes a gate: a step reaches verified only through its carrier's full observation, #2318's first-attempt and zero-drift rules are unchanged (a re-run executor is a conflict), and no remote state is written.

    Related Issue

    Related issue: #2422

    Premise refresh (issue-done §0)

    Base: origin/main at 54439f207926841b9411c805d70252c5df66b33f. At that revision orchestration_driver._advance observed every verified transition through the full carrier observe; no recheck path existed (grep -rn recheck tools/release found none). Successor PRs #2431 and #2433 changed failure notes and Draft asset verification only. The premise is still outstanding and is delivered here.

    Verification

    New tests, each fixing one fact:

  • release_orchestration_driver_test (6): a verified transition is rechecked and not re-observed; a None answer keeps the full observation; a begun transition is observed in full; a conflict answer stops at evidence-conflict with its cause in the failure note; differing evidence is not adopted; a raising or invalid recheck is evidence-unknown / refused.

  • release_verified_recheck_test (23): every covered step reverifies from identity reads only; cheap steps answer None; a moved merge, a non-canonical merge commit, a missing PR or Release, a drifted local record, a Release that dropped the plan, a still-draft publication, a re-run/failed/foreign run, a run of another workflow id or off main, a PR merged from another head, an asset inventory that drifted from the plan, an intent that binds another batch, a foreign witness and a reference of another shape all fail closed; private canonical JSON reads; backend enrollment.

  • release_cli_orchestration_test (2): run and resume enroll the composed recheck on the backend; the entry composes it for the request's operations directory.
  • Mutation proofs (file restored with a fresh mtime and __pycache__ cleared, exit read each time):

  • driver always observes (recheck path removed): 6 driver tests fail; restored: 46 pass.

  • _candidate without the moved-merge comparison: test_a_moved_pull_request_merge_is_a_conflict fails for both PRs; restored: 18 pass.

  • cli without recheck=: test_run_and_resume_enroll_the_composed_recheck_on_the_backend fails; restored: 32 pass.

  • c6e267c without the reviewed-head comparison, the asset-inventory comparison and the workflow_id binding: 14 cases across three tests fail; restored: 23 pass.
  • Commands run on the committed head:

    python3 tests/build/release_orchestration_driver_test.py   # 46 OK
    python3 tests/build/release_verified_recheck_test.py       # 23 OK (after c6e267c)
    python3 tests/build/release_entry_enrollment_test.py       # OK
    python3 tests/build/release_cli_orchestration_test.py      # 32 OK
    python3 tests/build/release_skill_test.py                  # OK
    python3 tests/build/ci_change_scope_test.py                # OK (two added files owned)
    python3 tests/build/release_suite_runner.py --shards 4     # shards 0 and 2 (39 modules, 960 tests) OK;
                                                               # shards 1 and 3 killed at the 1200 s worker limit under host load 8-9
    python3 tests/build/<module>.py  # each of the 40 modules from shards 1 and 3, one at a time: 40 PASS, 0 FAIL
                                     # (all 79 release_*_test modules green on this head)
    git diff --cached --check                                  # clean
    

    Not exercised: a live resume against a real request (none is active). The ≤ 5 minute target follows from the reads each step now makes (one PR read per reviewed PR, one run read per batch/deploy run, one Release read) plus the entry's own fetch and composition.

    PR Review

    Head SHA: c6e267cfed88204bea398424f8199487b7d05d72. The review of 9b554ab raised five findings; three were fixed in c6e267c (asset inventory, run workflow id + head, reviewed head) and two answered with reasoning in their threads (verdict-bundle re-read is the full proof this change removes; exceptions map to evidence-unknown with the cause in the failure note, as _observe does). Current-head review evidence is re-checked with scripts/ci/review_wait.py before merge.

    CI Scope

    Expected mode: focused
    Expected selected lanes: ci_contract deploy_contract docs_static
    Expected skipped lanes: core_asan core_coverage core_macos core_ubuntu creator package portal web_runtime_host web_runtime_lab web_toolchain
    ci:full required: no
    Reason: release tooling, its Python tests and the release skill only.

    Version Management

    Version impact: none
    Reason: release tooling only; no Module, Host, Contract or Product identity changes.

    Documentation Impact

    Documentation impact: none
    Affected portal pages:
    Reason: release-tool behaviour and the .agents skill; no page under apps/docs-site/docs/ changes.

    Pitfall Impact

    Pitfall impact: none — reason: tooling defect whose regression tests express the invariant (a verified step is rechecked through immutable identity, drift fails closed); no process knowledge outside the code.

    Merge Danger

    Door: two-way
    Blast Radius: resume of a request with verified steps. The recheck performs no remote write; a false verified would require the retained private journal, the PR merge commit, the run and the Release to all agree with the record.

    Release Impact

    Release impact: none
    Candidate tag: none
    Profile: none
    Channel: none
    Intent disposition: none
    Release assets: none
    Release gates: none
    Reason: no release is active; tags, Releases and the ledger are untouched.

    Transition authority

    Authorized transitions: push | PR | merge (standing Task authorization in CLAUDE.md; cleanup not requested)
    No tag, Release, deploy, publication, or Channel promotion is implied.

    🤖 Generated with Claude Code

    Diff: 650 lines (+487 / -163) across 8 files Reviewer: endaye Review duration: 36m
    All Vouch review confidence checks passed
    Residual risk 0.22 = Change Risk (0.52) × (1 − Review Confidence (0.57)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.52 · 650 lines diff across 8 files
    0.52
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    56%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.388
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #2446"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 56.8% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 52% (MEDIUM) · Higher = larger blast radius
    52%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 56.8% · Lower = rushed or shallow review
    56.8%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 22.5% · Safe to merge
    22.5%
    Repository