fix(release): verify Draft assets and replace an interrupted upload #2433
All Vouch review confidence checks passed
Residual risk 0.20 = Change Risk (0.50) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.50 · 587 lines diff across 7 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
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.382
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #2433"
general
weight: 0.35
endaye
Summary
Item 2 of the "now" plan in #2422. During 2.0.122.0 one asset upload (
lmdj-web-runtime-host-4.3.9-product-2.0.122.0.zip) stalled in GitHub'sstarterstate. Two defects let that reach publication.1. The
draftstep verified on metadata alone.draft_step.read_backchecks only that a Release exists with the right tag and plan digest.create_draftfailed mid-upload, the nextresumemarked the Draft verified even though one asset could never be downloaded.publish-release.ymlrun 39399785171 then failed at Reverify exact Draft.conflict.2.
create_draftcould not repair the Draft._resume_assetstreated thestarterasset as present and tried to download it (404) on every resume. Recovery needed an owner-authorised manual asset delete.Change
DraftCarriertakes a requiredverify_assets, wired by the trusted composition toverify_draft.- A Draft counts as this step's verified work only after every asset downloads and matches the plan.
- An incomplete or unreadable asset makes the step
pending, so advance resumescreate_draft.- A divergent asset still surfaces as
create_draft's namedTransitionError._resume_assets, on an unpublished Draft, removes a declared asset whosestateis notuploadedand uploads it again from the prepared bytes.- A completed upload is never deleted or replaced.
- A published Release is never edited: it raises instead.
- After removal the inventory is re-read to confirm the asset is gone.
GitHubClient.delete_incomplete_draft_assetissuesDELETE /repos/{repo}/releases/assets/{id}. It refuses anuploadedasset, an asset owned by another Release, a foreign API URL, and any non-204 response._compare_downloadand_download_and_verify_assetsname an incomplete asset and its state with the remedy:GitHub Release asset X upload is incomplete (state=starter); remedy: resume scripts/release.sh create-draft TAG while the Release is a Draft.Related Issue
Related issue: #2422
Verification
Current head:
6fd2a6cb2126ea082ea4287ae9957ec2e9e98b95, rebased on21c0d8007(#2431).New tests:
release_transitions_test:- an interrupted upload, modelled as a
starterasset, is named by the uncertain-upload read-back and byverify_draft;- a resumed
create_draftdeletes only that asset, re-uploads it and verifies all assetsuploaded;- a published Release with an incomplete asset is refused with no deletion.
release_draft_step_test: a Draft whose assets do not verify ispending, and advance repairs it throughcreate_draft; the carrier refuses a missing verifier.release_github_api_test: the client sends exactly oneDELETEfor astarterasset and refuses anuploadedasset, another Release's asset and a 404.Updated test:
test_publish_rejects_metadata_or_asset_identity_drift, caseasset-state. The case is still refused, now with the more specific "upload is incomplete (state=open)" before the snapshot comparison.Mutation proof: with
transitions.pyanddraft_step.pyrestored tomain, the new transitions tests fail and everyCarrierTestinrelease_draft_step_testerrors. With the change, all pass.All 78
tests/build/release_*_test.pysuites pass locally on the pre-rebase head. After the rebase, the six suites touching the driver, CLI, transitions, Draft step, enrollment and GitHub client pass again.git diff --cached --check: clean.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:fullrequired: noReason: release tooling and its Python tests 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: internal release-tool verification and recovery; no portal page or documented behaviour changes.
Pitfall Impact
Pitfall impact: none
Merge Danger
Door: two-way
Blast Radius: release Draft step and
create_draftresume.The only new remote write is deleting an asset whose upload never completed, on an unpublished Draft. Uploaded assets, tags and published Releases are untouched.
Release Impact
Release impact: none
Candidate tag: none
Profile: none
🤖 Generated with Claude Code