Repository navigation
ci: bind the Required Merge Gate to its own event's runs, fail drafts, keep both sides of renames - #345
Conversation
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Nice work! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review |
|
Codex Review: Didn't find any major issues. Swish! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review |
|
Codex Review: Didn't find any major issues. Delightful! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
The gate read the Core Checks Gate and Full Validation Gate check runs by name across every check suite on the head commit. On #268 the newest Full Validation Gate after ready_for_review was the draft-era skipped one, so the gate failed although nothing had. The same selection lets the push runs of a branch head, which pass trivially for a docs-only push, pass an integration pull request from that branch before its own Full Validation has run. Each wait now reads a run of the workflow that reports the check: same head SHA, event, head branch and repository and, for a pull request, the same pull request. A workflow the event also started has to be read from a run created at most 60 s before this gate run, because GitHub stamps the runs of one event up to a second apart in either order, or at least 60 s after the previous gate run on that head, which is too late to be the previous event's. Core Checks does not run for ready_for_review, labeled or unlabeled, so on those events its newest run for the head is read. The newest matching run wins, and its check runs are read from its own check suite, so a re-run of it is seen. Only the gate job reads the API now, with actions: read and checks: read; the other jobs keep contents: read. The gate job was skipped for drafts, and a skipped required check counts as passing until the next gate run reports. Drafts now run the gate and fail it. Every changed-file step used git diff with rename detection, which names only the destination of a rename, so moving a source file into doc/ routed as docs-only and skipped source validation. All 31 sites in the three workflows now pass --no-renames. Refs #312 Refs #313 Refs #314 Co-Authored-By: Claude Opus 5.5 <[email protected]>
The gate read Core Checks' newest run for the head on ready_for_review, labeled and unlabeled, because core-checks.yml declared no pull_request types and GitHub starts it only for opened, synchronize and reopened. That fallback had no time bound and ignored the base: on a head branch with two pull requests, one could pass on the other's docs-only runs, and after a retarget a label or ready event read Core Checks from the old base, so the mainnet publication check of a 1.0.0 target never ran. Core Checks now declares the gate's types, the gate binds it exactly as it binds Full Validation, and the fallback and the event action input it needed are gone. A contract test requires both workflows to run, unfiltered, for every event the gate runs for. Nothing tested that the newest run of an event wins, or that the jq event and head SHA filters are needed: the suite passed with min_by, max_by(.id) or either filter dropped. New tests cover a pull request opened with a label, whose cancelled opened runs fall inside the window, a push run started in the same second as the pull request's synchronize runs, and a run for the next commit. The modelled listing is now ordered newest first, as GitHub lists runs. Refs #312 Co-Authored-By: Claude Opus 5.5 <[email protected]>
test/lint/lint-files.py requires files with a shebang line to have mode 755. ci/checks/test_changed_files_contract.py was added with mode 644, so the lint job failed. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
@codex review |
f1071de to
6b14e82
Compare
|
Codex Review: Didn't find any major issues. Bravo. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
…, keep both sides of renames (#345) * ci: bind the Required Merge Gate to its own event's runs The gate read the Core Checks Gate and Full Validation Gate check runs by name across every check suite on the head commit. On #268 the newest Full Validation Gate after ready_for_review was the draft-era skipped one, so the gate failed although nothing had. The same selection lets the push runs of a branch head, which pass trivially for a docs-only push, pass an integration pull request from that branch before its own Full Validation has run. Each wait now reads a run of the workflow that reports the check: same head SHA, event, head branch and repository and, for a pull request, the same pull request. A workflow the event also started has to be read from a run created at most 60 s before this gate run, because GitHub stamps the runs of one event up to a second apart in either order, or at least 60 s after the previous gate run on that head, which is too late to be the previous event's. Core Checks does not run for ready_for_review, labeled or unlabeled, so on those events its newest run for the head is read. The newest matching run wins, and its check runs are read from its own check suite, so a re-run of it is seen. Only the gate job reads the API now, with actions: read and checks: read; the other jobs keep contents: read. The gate job was skipped for drafts, and a skipped required check counts as passing until the next gate run reports. Drafts now run the gate and fail it. Every changed-file step used git diff with rename detection, which names only the destination of a rename, so moving a source file into doc/ routed as docs-only and skipped source validation. All 31 sites in the three workflows now pass --no-renames. Refs #312 Refs #313 Refs #314 Co-Authored-By: Claude Opus 5.5 <[email protected]> * ci: run Core Checks for every gate event and test run selection The gate read Core Checks' newest run for the head on ready_for_review, labeled and unlabeled, because core-checks.yml declared no pull_request types and GitHub starts it only for opened, synchronize and reopened. That fallback had no time bound and ignored the base: on a head branch with two pull requests, one could pass on the other's docs-only runs, and after a retarget a label or ready event read Core Checks from the old base, so the mainnet publication check of a 1.0.0 target never ran. Core Checks now declares the gate's types, the gate binds it exactly as it binds Full Validation, and the fallback and the event action input it needed are gone. A contract test requires both workflows to run, unfiltered, for every event the gate runs for. Nothing tested that the newest run of an event wins, or that the jq event and head SHA filters are needed: the suite passed with min_by, max_by(.id) or either filter dropped. New tests cover a pull request opened with a label, whose cancelled opened runs fall inside the window, a push run started in the same second as the pull request's synchronize runs, and a run for the next commit. The modelled listing is now ordered newest first, as GitHub lists runs. Refs #312 Co-Authored-By: Claude Opus 5.5 <[email protected]> * ci: make the changed-files contract test executable test/lint/lint-files.py requires files with a shebang line to have mode 755. ci/checks/test_changed_files_contract.py was added with mode 644, so the lint job failed. Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
## Summary This lands the v1.0.1 release branch on `main` as one commit, the same way `main` received v1.0.0 in #135. The `v1.0.1` tag will then be created on the resulting `main` commit. - **Source:** release branch `1.x.x` at `a7a70660ad6ecadbf77b89bc2fe85ba068a86a71`, this PR's head before the signed squash. `main` (`70fea84f5b`) is an ancestor of that commit, so the squash has exactly its tree: `35a01d570ceef5984ae84e15d4dc74adecb587be`. - **Signing:** the release coordinator squashes the head into one commit and signs it with `squash-sign`. The tree does not change. - **Rebuilt head:** this branch replays the 75 commits of `1.x.x` since `main` (`70fea84f5b..a7a7066`) with their trees, messages and authors unchanged, so their SHAs differ from `1.x.x`'s. The one change: #268 (`e374ba24cf`) is split into its pure libbitcoinpqc v0.3.2 import, which carries the subtree's directory and split (`1965d0da1e`) trailers, and the rest of #268. That way the squash keeps the subtree trailer that `test/lint/libbitcoinpqc-subtree-check.sh` needs on `main`. Without it, the check would find v0.1.1's split `ac72d1ffa0` and fail. The final tree is still `35a01d570ceef5984ae84e15d4dc74adecb587be`. ## Validation of this tree (on `a7a70660ad`) - Full Validation [43271045040](https://github.com/Qbit-Org/qbit/actions/runs/43271045040): passed. - Required Merge Gate [43271044819](https://github.com/Qbit-Org/qbit/actions/runs/43271044819): passed. - Core Checks [43271044808](https://github.com/Qbit-Org/qbit/actions/runs/43271044808), including the `mainnet publication posture` job: passed. - Nightly CI [43273463067](https://github.com/Qbit-Org/qbit/actions/runs/43273463067): dispatched on this commit. Its scanner results are triaged, and one job is being re-run after a runner infrastructure failure. - The release notes are `doc/release-notes-1.0.1.md`, from #181. The freeze and the changes since v1.0.0 are tracked in #174. ## Review Please review the release as a whole against `v1.0.0` (`git diff v1.0.0 a7a7066`), or through the individual `1.x.x` PRs listed in #174 and the release notes. This PR adds nothing beyond `1.x.x` at `a7a70660ad`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Squashed commits: 5aa60b3 fix: resolve finalized mainnet CI failures (#137) b83f87d wallet: avoid deferred keypool unlock deadlock (#143) 0716a7c qt: move PSBT signing off GUI thread (#145) 141a9de Build versioned RPC docs pages (#148) 73c064a test: stabilize REST chaininfo comparison (#149) 508c6ea wallet: default -fallbackfee to the minimum relay fee (#151) 6f703b6 wallet: publish descriptor top-ups after commit (#144) f9172e8 wallet: show fee-only change-only self-transfers (#150) 6de89ab qt: show consumed PQC usage when a generated proof fails verification (#129) (#161) 9084d83 fuzz: seed qbit targets and verify replay and mutation (#164) df533c5 qt: preserve and display consumed PQC usage in transaction signing flows (#167) fc835f4 ci: run classifier tests in Required Merge Gate (#160) 2053d83 release: fail closed when the release asset list cannot be read (#170) 7f11260 ci: harden the Required Merge Gate check-run poller (#171) 5b80d5f ci: validate maintained source in scheduled heavy workflows (#165) 4873900 wallet: batch P2MR counters across mixed descriptors (#163) 19043e0 script: cache successful P2MR PQC signature checks (#162) b262cd0 ci: forward IBD workflow timeout inputs to the harness flags (#159) 4b89e4a doc: correct the v1.0.0 release trust record (#175) 0d2de1e fuzz: repair stale pqc_sign_refused coverage anchor (#176) 0954b74 qt: keep fee-bump PQC usage visible without a notification backend (#177) 3ccf788 qt: keep Encrypt Wallet responsive during existing-wallet encryption (#178) 6d6cc7d wallet: close races around CWallet::EncryptWallet (#183) 54f6737 qt: answer address labels from the table model during wallet encryption (#182) 1339e6b doc: fix pipe rendering and tighten P2MR v1 consensus profile (#252) 422ba0e doc: document bounded30 usage-dependent security margin and raw-key counter limits (#264) 981605a script: cache verified P2MR data-signature checks (v1.0.1) (#265) a5292af policy: bound P2MR runtime stack bytes (#263) d3b02f4 net: bound the size of headers messages we send (#266) 0c60e64 Squashed 'src/libbitcoinpqc/' changes from ac72d1ffa0..1965d0da1e 2f6992b subtree: import libbitcoinpqc v0.3.2 signer stack scrub (#268) cbb1961 crypto: clear stack released by PQC secret-key operations (#270) 260ac73 wallet: take descriptor locks before EncryptWallet's transaction (#277) 243065c mining: reset cached block checks in IPC submitSolution (backport bitcoin/bitcoin#33745) (#289) bc9f1bd wallet: keep the SQLite lock when probing loaded wallet files (#297) 95b8b9f wallet: fail a send whose inputs a concurrent call spent (#298) ad3d708 depends: Update Qt to 6.8.4 and fix macOS accessibility use-after-free (#347) 660034c fuzz: re-anchor PQC coverage checks after #270 and run them in CI (#342) b178391 wallet: deferred P2MR keypool refill at startup and unlock; Lock() waits for key copies (#299) 6700285 test: fix race in p2p_auxpow_headers_size (#358) f6c2013 qt: fix send confirmation re-entrancy and dialog deletion during confirmation (#348) 1fe12ea wallet: fallback-fee follow-ups for #151 (discard rate, GUI warning, default test, help texts) (#346) d21acc4 ci: bind the Required Merge Gate to its own event's runs, fail drafts, keep both sides of renames (#345) a4e1f26 qt: keep PSBT signing results across shutdown, close and unload (#344) e783923 test: keep wallet_p2mr_deferred_keypool_tests within time limits under sanitizers (#361) 1538eed ci: run runner selection on GitHub-hosted Ubuntu (#362) 1b8d10f qt: ignore PSBT Sign while a signing attempt is in progress (#353) 01a9ab3 contrib: import libbitcoinpqc releases as one verified main-line commit (#360) 5b42181 guix: ship macOS debug symbols as dSYM bundles (#343) 6f080f0 wallet: remove deleted plaintext keys from the wallet file after encryption (#300) 98dbe5b wallet: re-encrypt plaintext PQC keys in encrypted wallets on unlock (#301) dff82fb ci: allowlist fuzz-seed format tags in the gitleaks scan (#367) c7c9fbd ci: retry the cargo-audit database fetch and fix the clang analyzer scan (#368) 8ee5231 contrib: add the rulesets for qbit-guix.sigs main (#371) f8ababf contrib: add public tools to stage, sign and combine release checksums (#374) c4d88af contrib: keep the release key policy in one place and tighten key-policy continuity checks (#375) 78405ad wallet: keep the lock state when changing the passphrase (#379) ea99d08 ci: keep the 32-bit ARM nightly unit-test shards within their time limit (#377) cb1f507 ci: run the mainnet publication posture check on every mainnet line (#385) 6582427 qt: wait for open dialogs before shutdown and wallet unload (#354) 7953475 qt: keep the GUI responsive during wallet encryption started outside it (#352) 0d87213 doc: replace the release docs with a runbook, a publisher reference and a release issue form (#376) 3de5e93 net: only use service bits learned from a direct connection when deciding which addresses to avoid (#380) 565eb46 photon: bound inbound relay state per peer and check blocks before submission (#381) 7b7066f ci: parse gpg status output on newline only and reject other line separators (#387) b1b0860 net: budget per-peer time spent validating rejected transactions (#386) 3ae934c photon: announce blocks under the low-order bits of their hash (#410) faaaaa8 wallet: refill P2MR keypools before walletpassphrase returns (#411) 9e74401 wallet: fail descriptor key encryption when the plaintext record is not erased (#418) e8a796d ipc: return false from submitSolution for a missing or undecodable coinbase (#419) 396940d net: request transactions held back by the validation budget later, and limit each connection's share of the pool (#422) 6ca0132 net, validation: attribute received blocks to their sender and check recovered blocks (#414) c65bea2 qt: add a play-money poker lobby based on Satoshi's 2009 design (#378) b3b5096 script: limit standard hashing of large P2MR stack elements (#415) ca5d4b5 release: prepare v1.0.1 (#181) b1c6d4e net: pass held-back transaction announcements on at most once per retry delay (#425) Co-authored-by: Claude Fable 5 <[email protected]> Co-authored-by: Alexander Miller <[email protected]> Co-authored-by: Sjors Provoost <[email protected]> Co-authored-by: Fabian Jahr <[email protected]> Co-authored-by: Dan Hepworth <[email protected]> git-subtree-dir: src/libbitcoinpqc git-subtree-split: 1965d0da1eb4d9e196613b8f3a5d0d866a221c53
## Summary Merges `1.x.x` (through #425, 51 commits, the v1.0.1 work) into `1.1.0`, which has not moved since the v1.1.0-rc1 prep (#256) on 2026-10-27. After this, `1.1.0` is `1.x.x` plus the PQ transport line (#233, #249, #255, #256). ## Sync point This commit is the squash of the merge of `1.x.x` at `a7a70660ad6ecadbf77b89bc2fe85ba068a86a71` into `1.1.0` at `1b6e6b677ddd7e965a374cf3419bde4dd09747e4` (reviewed merge commit `2f01f54d8dbc3984fbdc848b4d96eb220d75464e`, tree `d588767f7af07c937ea4d6525313897e9c9daf6e`). A squash does not record `1.x.x` as a parent, so the next sync must name that `1.x.x` commit as its merge base (`git merge-tree --merge-base=<that commit>`, or a local join commit with it as second parent) instead of using the base Git finds, which stays at `45e9e72c2d` and would raise every conflict below again. ## Conflict resolutions | Files | Resolution | | --- | --- | | `CMakeLists.txt`, `doc/man/*.1` | Keep v1.1.0-rc1. | | `src/init.cpp` | Keep both `-mlkemportable` and `-txvalidationbudget`. | | `required-merge-gate.yml`, `test_merge_gate_poller.py` | Both lines independently taught the gate to read only its own event's runs. Took the `1.x.x` implementation (#345) whole and re-added the `1.1.0` triggers, the PQ CI contract step and the `1.1.0` ruleset template. | | `ci.yml`, `core-checks.yml` | Took the `1.x.x` spelling of the identical `--no-renames` change and its mainnet-line rule (already covers `1.1.0`); kept the PQ jobs, the apt cache and the fuzz tooling step. | | `ci-nightly-heavy.yml` | Kept the job catalog; carried the 300 minute ARM shard limit (#377) into it. `test_scheduled_validation_contract.py` now reads the catalog. | | `classify_merge_profile.py` | Kept the `1.x.x` operator-key routing and the PQ unit and functional file sets. | | `release-process.md`, `test_verify_mainnet_ci_posture.py` | Took the `1.x.x` runbook and the removal (#376, #385). | | `.github/rulesets/1.1.0.json` | Not a conflict: matched to the `1.0.0` template, which the ruleset check from `1.x.x` requires. | ## Testing (local, x86_64 Linux, Release build) - Build: clean. - Unit tests: 187 of 188 pass, `script_assets_tests` skipped as usual. - Functional, in `--v2pqtransport` mode and again in default mode: every `p2p_v2_*`, `feature_pq_*`, `rpc_net`, `rpc_pqtransport`, and the 12 functional tests `1.x.x` added or changed (including `p2p_tx_validation_budget` and `p2p_auxpow_headers_size`). All pass. - `ci/checks/test_*.py`, `ci/release/test_*.py`, PQ canary, fuzz coverage anchors, seed check, PQ doc token lint: pass, except `test_verify_testnet_release_posture.py`, which fails identically on both parents on this host. Not run locally: the full functional suite, sanitizers, non-x86 and macOS jobs, fuzz replay. ## Follow-ups, not in this PR - Man pages keep the October date and are not regenerated; do that when the next release candidate is cut. - `test/rpc_docs/test_site_builder.py` fails on `1.1.0` before and after this merge (`getpqtransportinfo` is missing from the sample manifest). - `1.x.x` does not contain the v1.0.1 release commit on `main`; nothing here depends on it. Squashed commits: 4fb9dbe doc: fix pipe rendering and tighten P2MR v1 consensus profile (#252) d38cbd8 doc: document bounded30 usage-dependent security margin and raw-key counter limits (#264) 02a465d script: cache verified P2MR data-signature checks (v1.0.1) (#265) aa8ea86 policy: bound P2MR runtime stack bytes (#263) a1e8bd9 net: bound the size of headers messages we send (#266) e374ba2 subtree: import libbitcoinpqc v0.3.2 signer stack scrub (#268) 330b370 crypto: clear stack released by PQC secret-key operations (#270) b27130a wallet: take descriptor locks before EncryptWallet's transaction (#277) 21fee6e mining: reset cached block checks in IPC submitSolution (backport bitcoin/bitcoin#33745) (#289) 9c831be wallet: keep the SQLite lock when probing loaded wallet files (#297) 635919d wallet: fail a send whose inputs a concurrent call spent (#298) a5967f6 depends: Update Qt to 6.8.4 and fix macOS accessibility use-after-free (#347) baf158a fuzz: re-anchor PQC coverage checks after #270 and run them in CI (#342) dd86425 wallet: deferred P2MR keypool refill at startup and unlock; Lock() waits for key copies (#299) ee85afc test: fix race in p2p_auxpow_headers_size (#358) e112622 qt: fix send confirmation re-entrancy and dialog deletion during confirmation (#348) 863e6b1 wallet: fallback-fee follow-ups for #151 (discard rate, GUI warning, default test, help texts) (#346) 621b330 ci: bind the Required Merge Gate to its own event's runs, fail drafts, keep both sides of renames (#345) b5486bf qt: keep PSBT signing results across shutdown, close and unload (#344) 49b5013 test: keep wallet_p2mr_deferred_keypool_tests within time limits under sanitizers (#361) 993ab75 ci: run runner selection on GitHub-hosted Ubuntu (#362) 9574775 qt: ignore PSBT Sign while a signing attempt is in progress (#353) 594b934 contrib: import libbitcoinpqc releases as one verified main-line commit (#360) 535f69f guix: ship macOS debug symbols as dSYM bundles (#343) ea571b8 wallet: remove deleted plaintext keys from the wallet file after encryption (#300) 3a12925 wallet: re-encrypt plaintext PQC keys in encrypted wallets on unlock (#301) b10c761 ci: allowlist fuzz-seed format tags in the gitleaks scan (#367) 0a936d6 ci: retry the cargo-audit database fetch and fix the clang analyzer scan (#368) d647580 contrib: add the rulesets for qbit-guix.sigs main (#371) 26ebfc9 contrib: add public tools to stage, sign and combine release checksums (#374) d6a72d6 contrib: keep the release key policy in one place and tighten key-policy continuity checks (#375) bdc43f3 wallet: keep the lock state when changing the passphrase (#379) 33cb6e8 ci: keep the 32-bit ARM nightly unit-test shards within their time limit (#377) e26c22e ci: run the mainnet publication posture check on every mainnet line (#385) 73c704b qt: wait for open dialogs before shutdown and wallet unload (#354) dfbf4b8 qt: keep the GUI responsive during wallet encryption started outside it (#352) 843ba29 doc: replace the release docs with a runbook, a publisher reference and a release issue form (#376) c53393d net: only use service bits learned from a direct connection when deciding which addresses to avoid (#380) 9fc25e0 photon: bound inbound relay state per peer and check blocks before submission (#381) 3723aeb ci: parse gpg status output on newline only and reject other line separators (#387) 9935217 net: budget per-peer time spent validating rejected transactions (#386) a811585 photon: announce blocks under the low-order bits of their hash (#410) 1efb3ae wallet: refill P2MR keypools before walletpassphrase returns (#411) e9f4499 wallet: fail descriptor key encryption when the plaintext record is not erased (#418) 694c26d ipc: return false from submitSolution for a missing or undecodable coinbase (#419) 2f2ad3e net: request transactions held back by the validation budget later, and limit each connection's share of the pool (#422) 273353b net, validation: attribute received blocks to their sender and check recovered blocks (#414) 889d3e2 qt: add a play-money poker lobby based on Satoshi's 2009 design (#378) 6a3421d script: limit standard hashing of large P2MR stack elements (#415) 29c0ec9 release: prepare v1.0.1 (#181) a7a7066 net: pass held-back transaction announcements on at most once per retry delay (#425) 2f01f54 Merge 1.x.x into 1.1.0 Synced-From: 1.x.x@a7a70660ad6ecadbf77b89bc2fe85ba068a86a71 git-subtree-dir: src/libbitcoinpqc git-subtree-split: 1965d0da1eb4d9e196613b8f3a5d0d866a221c53 Co-authored-by: Claude Opus 5.5 <[email protected]> Co-authored-by: Alexander Miller <[email protected]> Co-authored-by: Sjors Provoost <[email protected]> Co-authored-by: Fabian Jahr <[email protected]> Co-authored-by: Dan Hepworth <[email protected]>
Summary
Fixes #312
Fixes #313
Fixes #314
(GitHub closes issues automatically only on merges into the default branch, so these stay open until
1.x.xreachesmain.)ci.ymlorcore-checks.yml) and match the gate's own run on head SHA, event, head branch and head repository, plus the PR number for pull requests. Check runs are then read from that run's check suite (/check-suites/{id}/check-runs), never from the commit-wide listing. The newest matching run wins, and a re-run stays in its suite, so it is seen.core-checks.ymlnow declares the gate'spull_requesttypes (opened,synchronize,reopened,ready_for_review,labeled,unlabeled).ci.ymlalready declared them. Both workflows therefore run for every gate event and are bound the same way, with no fallback. The gate job alone getsactions: readandchecks: read; the workflow-level token is nowcontents: readonly.if: ${{ always() }}). For a draft its step fails first with "Pull request #N is a draft: draft pull requests are not mergeable. Mark it ready for review to run the gate."ready_for_reviewstays in the triggers, so marking the PR ready starts a fresh gate run.git diff --name-onlychanged-file sites inrequired-merge-gate.yml,ci.ymlandcore-checks.ymlnow pass--no-renames. That includes the release-validator detection step incore-checks.yml; thebuild-smokejob is not touched.Where the brief's rule had to change, with evidence
The issue and brief proposed binding to runs "created at or after this gate run". Production data shows where that rule would leave the gate waiting forever, and it would then time out red:
SIBLING_RUN_SKEW_SECONDS). It also counts runs created at least 60 s after the previous gate run on the same head, which is too late to be the previous event's runs. A run created within 60 s after the previous gate run is treated as the previous event's, because the previous event's own runs can also be stamped after its gate run.core-checks.ymldeclared nopull_requesttypes, so it ran only foropened,synchronizeandreopened; on subtree: import libbitcoinpqc v0.3.2 signer stack scrub #268 at 17:46:13Z only the gate and Full Validation started. The first round read Core Checks' newest run for those events. An adversarial review showed that fallback had no time bound and ignored the base. With two PRs from one head branch, PR 7's gate passed on PR 8's green docs-only runs. After a retarget, a label or ready event read Core Checks from the old base, so the mainnet publication check for a1.0.0target never ran. Round 2 removes the fallback and gives Core Checks the gate's types instead. A contract test reads both workflow files and requires each one to run for every event the gate runs for: every gatepull_requesttype, the gate's branches forpull_request,pushandmerge_group, and nopaths,paths-ignoreorbranches-ignorefilter.I re-checked every claim in the three issues against the code and the API. All are confirmed with one exception: #312 says a maintainer had to re-run gate run 41101389289. That run shows
run_attempt: 1, so I could not confirm a re-run. The false red itself is confirmed: its log saysFull Validation Gate concluded skipped.Testing
A broken gate blocks every merge, so every test runs the gate's real
run:script, lifted out of the YAML, against a stubbedgh. The real changed-file steps run in a scratch git repository with git's default rename detection.ci/checks/test_merge_gate_poller.py(35 tests).FakeGhnow routes replies by endpoint and serves a model of GitHub built from the workflow-run fields the API returned for subtree: import libbitcoinpqc v0.3.2 signer stack scrub #268 and wallet: keep the SQLite lock when probing loaded wallet files #297. New tests:skipped, and the new run's gate job does not exist yet. The gate stays pending and passes once this event's check passes.1.x.xare green as docs-only, and GitHub ties them to the open PR. The PR's own runs are still running, so the gate stays pending.openedruns andlabeledruns seconds apart, all inside the window. The cancelledopenedruns are not read, including when the newer runs have the lower run IDs, and within one second the higher run ID wins.synchronizeruns in the same second, on the same commit and branch, and GitHub ties both to the PR. Only the event filter separates them.head_shafilter.ready_for_reviewis a trigger, and the token scopes are as above.ci/checks/test_changed_files_contract.py(new, 3 tests, run inclassify-changes). Every changed-file step of the three workflows runs forpull_request,push, the push of a new branch,merge_groupand thediff-treefallback, on a head that renamessrc/validation.cppandci/release/verify_release.pyintodoc/reference/. Both sides must be listed, and the real classifier must route the result assource. The release-validator step must reportchanged=true. A static scan of every workflow requires--no-renameson eachgit diff,git logorgit showthat names files.ci/checks/test_classifier_ci_contract.py: its fakeghalso serves the workflow-run listing.Fails on the base, passes with the fix. I replayed the new test files against the
21fee6ee8eworkflows:Full Validation Gate concluded skipped.for subtree: import libbitcoinpqc v0.3.2 signer stack scrub #268, rc=0 for the push-context fail-open, and rc=0 for a draft. Every pre-existing poller test and subtest still passes there.doc/reference/validation.mdanddoc/reference/verify_release.md, the release step reportedchanged=false, and the scan found 31 sites without--no-renames.previous + 1floor fails the "runs created just after the previous event" case.Mutation check of run selection (round 2). Each mutant below was applied to a copy of the workflows, and the poller suite was run against it. Every mutant fails at least one test:
max_by([created, .id])→min_by([created, .id])test_the_newest_run_of_this_event_wins(all 3 cases)max_by(.id)test_the_newest_run_of_this_event_wins("labeled created later, with lower IDs")max_by(created)test_the_newest_run_of_this_event_wins("same second").event == $eventtest_another_events_run_inside_the_window_is_not_read.head_sha == $shatest_a_run_for_another_commit_is_not_readcore-checks.yml's newtypes:test_every_event_the_gate_runs_for_starts_the_workflows_it_readsAcceptance commands, all passing:
for t in ci/checks/test_*.py; do python3 "$t"; doneon system Python 3.14.4 and on Python 3.12.15: all 8 files OK.actionlint1.7.12, with shellcheck, on all workflows: clean, as it was on the base.python3 test/lint/lint-files.py: passes afterf1071de905setci/checks/test_changed_files_contract.pyto mode 755 (it has a shebang and was added as 644, which failed CIlint). The otherci/checks/and.github/files this PR touches already had matching modes.Live: this PR changes
required-merge-gate.yml, so its own gate runs the new script.Opened as a draft, the gate failed: run 41927559959 reported
Pull request #345 is a draft: draft pull requests are not mergeable. Mark it ready for review to run the gate.On the hosted runner,classify-changesran all four contract suites, including the new changed-file contract, and they passed.Then I marked it ready. The round-1
ready_for_reviewgate (run 41927824888) was still polling more than 90 minutes later, so the new API reads worked live. A failure to read the runs listing fails closed within about 3 minutes. Its Full Validation run was still queued on the self-hosted runners when round 2 was pushed.Built locally.
Ran focused unit or functional tests for the changed area.
Ran lint or formatting checks relevant to this change.
Not run. Reason:
Target Branch
mainor a maintainer-requested release branch such as0.1.x. (1.x.x, for v1.0.1.)Risk / Review Notes
Notes:
Required Merge Gateon the shared head counts for both PRs.edited) still keeps the old base's gate result. I did not addeditedto the triggers: Full Validation and Core Checks do not run onedited, so a run bound to that event would wait for runs that never start. Every title or body edit would also cancel an in-progress gate through the concurrency group.concluded cancelled. Re-running the gate then reads the newer run.labeled,unlabeledorready_for_reviewevent now waits for a new Full Validation run and, with round 2, a new Core Checks run. Both workflows'cancel-in-progressconcurrency also cancels and restarts the runs already in progress for that PR. This costs runner time on every label change.Required Merge Gate. Right after the integration PR opens, the push gate's green check on the same SHA briefly satisfies it. This lasts until the PR's own gate run creates its check: it reports pending at first, then its verdict. The gate cannot close this window; only branch protection could.--no-renamesscan is line-based. Agit diffcommand split across backslash continuations is not matched by the scan. The behavioral test still runs every changed-file step that exists today.build-smokejob incore-checks.yml. This PR edits that file'son:block and changed-file steps, and the merge is clean.Docs / Process Impact
Choose exactly one:
ci/README.mdanddoc/development/public-branch-and-rulesets.mdsay nothing about drafts or about how the gate selects check runs, so they stay accurate. There is no release-notes fragment because node users see no change.🤖 Generated with Claude Code