Skip to content

Re-pin signed tags during immutable release publication - #130

Merged
kiwidream merged 1 commit into
1.0.0from
repin-immutable-release-tags
Jul 14, 2026
Merged

kiwidream merged 1 commit into
1.0.0from
repin-immutable-release-tags

Conversation

@kiwidream

@kiwidream kiwidream commented Jul 14, 2026 •

Copy link
Copy Markdown
Member

Summary

  • re-pin the exact GitHub-verified annotated tag object and commit target immediately before publication and again after immutable-state and asset polling
  • preserve omitted resumed-draft titles, snapshot explicit release notes before long-running validation, and map --make-latest auto to GitHub's make_latest=legacy behavior
  • extend the fake GitHub API for tag-move, signature, title, notes-snapshot, and latest-mode regressions, and document immutable-publication recovery

Fixes #126.

Testing

  • Built locally.
  • Ran focused unit or functional tests for the changed area.
  • Ran lint or formatting checks relevant to this change.
  • Not run. Reason: No C++ product build was run because this changes release tooling, behavioral tests, and release-process documentation only.

Focused and expanded validation:

GIT_CONFIG_GLOBAL=/dev/null python3 -m unittest \
  ci.release.test_publish_local_release \
  ci.release.test_validate_builder_attestations \
  ci.release.test_validate_key_metadata \
  ci.release.test_validate_release_artifacts \
  ci.release.test_verify_testnet_release_posture

(cd ci/checks && GIT_CONFIG_GLOBAL=/dev/null python3 -m unittest test_classify_merge_profile)

bash -n contrib/release-process/publish-local-release.sh
python3 -m py_compile \
  ci/release/test_publish_local_release.py \
  ci/release/test_validate_release_artifacts.py
git diff --check origin/1.0.0...HEAD

The expanded release suite passed all 162 tests, the merge-profile suite passed all 23 tests, and the final focused publisher/boundary suite passed all 33 tests. The complete Docker lint suite passed using ci/lint_imagefile and ci/lint/06_script.sh, including Ruff, ShellCheck, documentation, and subtree checks.

Target Branch

  • This PR targets main or a maintainer-requested release branch such as 0.1.x.

Target: 1.0.0.

Risk / Review Notes

  • Consensus, script, crypto, wallet, P2P, release, CI, or security-sensitive behavior changed.
  • No consensus, script, crypto, wallet, P2P, release, CI, or security-sensitive behavior changed.

Notes:

  • This changes the security-critical release publication state machine but does not change node consensus behavior.
  • Publication now fails before draft=false if the remote tag ref, annotated-tag object, commit target, or exact GitHub signature status differs from the locally pinned values.
  • A final mismatch after GitHub reports the release immutable fails closed with incident-recovery guidance because the publication may already be locked.
  • Draft metadata is finalized before publication; the final REST update carries only draft=false and the explicit latest-release policy.
  • New releases still default to make_latest=false, resumed drafts still preserve an omitted latest policy, and explicit auto is sent as GitHub's legacy value.

Docs / Process Impact

Choose exactly one:

  • I updated public docs because this PR changes user-visible behavior, integration guidance, release/process guidance, or expected validation.
  • No public docs update needed. Reason:

The release-process guide now documents the repeated exact tag pin, metadata behavior, notes snapshot, and recovery steps when final verification fails after immutable publication.

libbitcoinpqc Subtree Checklist (if src/libbitcoinpqc changed)

Not applicable; the subtree was not changed.

  • Source commit is reachable from an immutable release tag in Qbit-Org/qbit-libbitcoinpqc.
  • qbit imports the tagged upstream tree directly without pruning or a curated subtree branch.
  • Subtree import/update was performed with contrib/devtools/update-libbitcoinpqc-subtree.sh.
  • test/lint/libbitcoinpqc-subtree-check.sh passes locally.
  • Any default tag change in contrib/devtools/update-libbitcoinpqc-subtree.sh is intentional and matches doc/subtrees/libbitcoinpqc.md.

View with Codesmith Autofix with Codesmith
Need help on this PR? Tag /codesmith with what you need. Autofix is disabled.


Note

High Risk
Changes the security-critical local release publication state machine: publication aborts on remote tag/signature drift, and a post-immutable mismatch can leave a locked release requiring manual incident recovery.

Overview
Hardens publish-local-release.sh so publication only proceeds when GitHub still reports the same annotated tag object, commit target, and verified=true / reason=valid signature status as the local pin—checked at startup, immediately before draft=false, and again after immutable/asset polling. Tag drift or signature changes before publish leave the release a draft; a mismatch after immutability fails closed with immutable-publication recovery guidance.

Metadata and notes: explicit --notes-file content is UTF-8 snapshotted into the workdir before long validators (so later file edits cannot change the body). Resumed drafts keep title/prerelease/latest unless overridden; publish uses gh api PATCH (draft=false, explicit make_latest, with auto → legacy). Draft edits no longer force title/latest on publish.

Tests/docs: the fake gh harness simulates tag moves, verification sequences, PATCH publish, titles, and post-snapshot note mutation; release-process.md documents the repeated pin, snapshot behavior, and recovery when verification fails after an immutable release.

Reviewed by Cursor Bugbot for commit fb64ece. Bugbot is set up for automated code reviews on this repo. Configure here.

@kiwidream
kiwidream merged commit 8ad6cd5 into 1.0.0 Jul 14, 2026
35 checks passed
kiwidream added a commit that referenced this pull request Jul 15, 2026
* ci: enable validation on 1.0.0 (#73)

* Fix scanner high findings (#72)

* Resolve scanner medium findings (#74)

* Reject malformed P2MR leaf versions in Qt (#82)

* Bind builder attestations to signed-tag source (#84)

* Bind builder attestations to release source

* Fix builder workflow source environment

* Restore verified release tag after checkout

* qt: avoid wallet shutdown deadlock during model adoption (#87)

* Use aggregate work rate for assumevalid burial (#88)

* p2p: use recent chainwork for anti-DoS thresholds (#89)

* qt: bind P2MR proofs to expected signer (#85)

* Complete restricted-output fundrawtransaction edge coverage (#86)

* test: extend restricted-output raw funding coverage

* test: use documented raw funding fee option

* Prevent closing wallet progress dialogs (#97)

* qt: minimize P2MR proof exports (#95)

* Fix Qt wallet shutdown lifetime (#90)

* Fix Qt wallet shutdown lifetime

* Fix Qt shutdown CI coverage

* Test active wallet shutdown during transaction preparation

* Use portable thread in Qt shutdown test

* validation: reject height-invalid AuxPoW substitutions (#106)

* Bound qbit-qt P2MR proof parsing (#96)

* Bound Qt P2MR proof parsing

* Fix GCC range-loop warning

* qt: bind proof limit to minimal export

* rpc: default to portable P2MR proofs

* test: update PQC usage RPC expectations

* doc: qualify legacy P2MR proof compatibility

* Cache Cadence lane predecessors (#108)

* build: prohibit PQC runtime test controls in qbit (#107)

* build: prohibit PQC runtime test controls

* build: prevent PQC production mode cancellation

* ci: make PQC build policy check executable

* ci: reset cached IWYU sources before tidy setup

* docs: show qbit version and full logo in RPC sidebar (#119)

* doc: update RPC docs branding

* test: handle missing MkDocs in RPC docs suite

* Activate P2MR validation weight v2 on testnet4 at height 60,000 (#109)

* Activate P2MR validation weight v2 at height 60,000

* test: cover P2MR weight in getblockchaininfo

* validation: pre-enforce forthcoming P2MR weight rule

* doc: bound block-wide P2MR verification work

* test: cover P2MR validation-weight boundaries

* test: avoid mixed enum flag expressions

* Make resumed release draft notes deterministic (#116)

* release: make draft notes deterministic

* release: harden draft validation edge cases

* P2MR v1 conformance and release framework (#118)

* doc: define the qbit P2MR v1 consensus profile

* test: add the qbit P2MR v1 conformance corpus

* ci: gate qbit P2MR v1 conformance with an independent oracle

* release: gate qbit P2MR v1 conformance and integration signoff

* ci: execute P2MR CHECKSIGADD and release validator tests

* build: preserve P2MR corpus line endings

* test: hard-fail invalid P2MR oracle signatures

* ci: initialize P2MR target directory at runtime

* ci: test p2mr release gate in release-only profile

* test: make p2mr v1 corpus fully reproducible

* test: execute p2mr data signature opcodes

* test: type p2mr generator mutation fixtures

* release: sync p2mr support matrix digest

* test: require CHECKSIGADD boundary fixtures

* test: fix rebased P2MR conformance checks

* test: close P2MR conformance review gaps

* test: align P2MR conformance with weight v2

* Harden P2MR corpus and oracle conformance evidence (#127)

* test: prove P2MR corpus mutation resistance

* test: cover P2MR signature opcode underflow

* release: sync hardened P2MR evidence digest

* qt: preserve PQC usage after signing failures (#128)

* qt: preserve PQC usage after signing failures

* docs: align release note with PR 128

* Enforce immutable local release publication (#117)

* release: enforce immutable local publication

* release: preserve resumed draft metadata

* release: fail closed on remote verification

* release: discover resumable drafts safely

* release: re-pin immutable publication tags (#130)

* Establish mainnet 3-of-5 release-key policy (#134)

* release: establish mainnet 3-of-5 signer policy

* ci: always verify operator policy approvals

* ci: use merge queue base for policy history

* Stage v1.0.0 mainnet launch; placeholder genesis and AuxPoW chain ID (#131)

* Stage v1.0.0 mainnet launch configuration

* test: derive subversion expectation from release version

* ci: enforce staged mainnet publication posture

* release: lock staged mainnet launch difficulty

* ci: test chain ID finalization contract

* release: separate staged and final genesis targets

* ci: require live chain ID assertion

* Activate future block time v2 at testnet4 height 60,000 (#133)

* Activate future block time v2 on testnet4

* Fix future-time v2 CI regressions

* test: isolate mempool limit synthetic chain

* test: preserve legacy timestamp scenarios

* test: derive nulldummy block time from tip

* test: keep sequence-lock blocks within time limit

* ci: retrigger validation after release rebase

* test: isolate pruning timestamps from future-time v2

* docs: publish v1.0.0 mainnet guidance

* consensus: pin mainnet genesis and ASERT anchor
@kiwidream kiwidream mentioned this pull request Jul 15, 2026
9 of 14 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant