Repository navigation
3.x.x: the release guide's notes rewrite fails closed: no tag push or release after a failed or empty rewrite (#825) - #832
Conversation
… release after a failed or empty rewrite (#825) docs/releasing.md now runs the tag, the notes rewrite and the release in one subshell under `set -e -o pipefail`. A failed `git tag`, `git show` or `sed`, or notes that come out empty or blank, stop it before `git push` and `gh release create`, so a failed rewrite can't publish an empty body. The notes are rewritten from the local tag before it is pushed, into a mktemp file. The sed expressions use `|` as their delimiter, which neither the patterns nor the replacements contain. On v3.1.1's notes the new command's output is byte-identical to the old one's. Refs #825 (item 3). Co-Authored-By: Claude Opus 5.5 <[email protected]>
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. |
| trap 'rm -f "$notes"' EXIT | ||
| git fetch origin main --tags | ||
| git tag -s v<version> <release-main-sha> -m 'qbit-mining-bootstrap <version>' | ||
| git verify-tag v<version> |
There was a problem hiding this comment.
1. [low · pre-existing] The block never checks that the signed tag's commit is on origin/main; verify-tag only checks the signature
docs/releasing.md:87
Pre-existing: not introduced by this PR.
Line 86 signs a tag on whatever commit <release-main-sha> names. Line 87 (git verify-tag) checks only the signature. Line 85 fetches origin main, but nothing compares the tag's commit with origin/main. Nothing downstream does either: prism-load-l3.yml runs on any v* tag push. If an operator pastes a wrong SHA, for example a commit on another branch, the block still signs it, pushes it and publishes a release on it. Lines 120-121 say a public tag is never recreated, so the wrong release becomes permanent. The new block is meant to fail closed, but it covers only the notes, not the tag's target. The old block had the same gap.
| reviewed PR, and the resulting commit is identified and verified as above | ||
| before it is tagged. | ||
| - **Public:** the tag is never recreated. Check `gh release view v<version>`; | ||
| if there is no release, run the block again without its `git tag -s` and |
There was a problem hiding this comment.
2. [low · nit] The Public recovery can't get past git fetch --tags when the local tag differs from the public one
docs/releasing.md:121
Suppose the local v<version> is a different object from origin's, for example because two people tagged the same version and one push lost. Since git 2.20, git fetch origin main --tags (line 85) refuses to overwrite the local tag ('would clobber existing tag') and exits non-zero, so set -e stops the block. ls-remote shows the tag is public, so lines 120-122 say to rerun without git tag -s and git push. That rerun still starts with the same fetch and fails every time. Only the Not public branch tells the operator to delete the local tag. The block fails safe and publishes nothing wrong, but the documented recovery dead-ends. A fix is to add a step to the Public branch: delete the local tag, then fetch the public one.
|
|
||
| When it stops, first check whether the tag is public: | ||
| `git ls-remote --tags origin refs/tags/v<version>`. | ||
| - **Not public:** delete the local tag (`git tag -d v<version>`), fix the |
There was a problem hiding this comment.
3. [low · nit] The Not public recovery deletes the local tag without checking it, even one that existed before the run
docs/releasing.md:116
Lines 109-110 say a tag that already exists also stops the block. If an unpushed local v<version> existed before the run, line 116 says to git tag -d it without inspecting it. That contradicts lines 128-129 ('inspect its target and contents instead of replacing it'). If the stop came at mktemp or git fetch (lines 83-85), no tag exists yet and git tag -d just errors. The impact is low because the tag is local only and line 75 already requires confirming the tag doesn't exist.
…and CI checks vendored sqlx-core against upstream's .crate plus recorded patches (#825) ## Problem #825 items 1 and 2, from #818's and #794's reviews: 1. **verify-ca without a root certificate passes startup.** Since #818, sqlx-postgres refuses every `sslmode=verify-ca` connect that has no `sslrootcert` (or `PGSSLROOTCERT`). But nothing at startup checked for it, so a `PRISM_DATABASE_URL` or peer URL like that passed `check-config` and startup, then failed every connect. 2. **Nothing ties `vendor/sqlx-core` to upstream.** `check_vendored_sqlx_core.py` checked that both lock files build the vendored copy and that its advisories are reviewed. It never checked the files, so an unrecorded edit to the vendored TLS code would pass CI. ## Change ### Startup refuses verify-ca without a root certificate (item 1) - **Which settings.** `PRISM_DATABASE_URL` (frontend, `check-config`, the database commands and the public reader) and `PRISM_PEER_DATABASE_URL` / `PRISM_PEER_DATABASE_URL_FALLBACK` (the dual writer). Each is refused by name, with the connect's own message: > sslmode=verify-ca requires sslrootcert: verify-ca does not check the server's host name, so it trusts only the root certificates in sslrootcert, never the public roots; set sslrootcert, or use sslmode=verify-full - **Resolved as the connect resolves them.** The mode and certificate come from SQLx's `PgConnectOptions::from_url`, the parser the connect itself uses, so there is no second parser: the URL's `sslmode` and `sslrootcert` win over `PGSSLMODE` and `PGSSLROOTCERT`. `ssl_root_cert` has no getter, so it is read back through `to_url_lossy()`, as the existing password check already does. An empty `sslrootcert` names no file, so it counts as none. The certificate file is not read here; a missing or unusable file is still the connect's error, as before. - **Other modes are unchanged:** `verify-full`, `require`, `prefer`, `allow` and `disable`. - **One more refusal.** `PRISM_DATABASE_URL` is now parsed with the client's parser, as the peer URLs already were. A URL the client can't use (for example `sslmode=sometimes`) is refused at startup, by name, instead of at the first connect. - **`make doctor` shows it.** `scripts/check-env.sh` relays only known, value-free public-reader errors, so the new refusal showed as a generic image error. It now relays `public PRISM_DATABASE_URL: sslmode=verify-ca requires sslrootcert`. ### CI checks vendored sqlx-core against upstream's `.crate` plus recorded patches (item 2) - **The recorded changes are patches.** `vendor/sqlx-core.patches/` holds one `diff -u` patch per change, each with a description above it: - `0001-sqlx-4251-poll-ready-waits-on-either-direction.patch` (transact-rs/sqlx#4251, #771); - `0002-sqlx-3861-verify-ca-accepts-not-valid-for-name-context.patch` (transact-rs/sqlx#3861, #713); - `0003-verify-ca-trusts-only-sslrootcert.patch` (the local change, #818). - **CI rebuilds the tree from upstream and compares.** The step that checks the lock files now downloads `sqlx-core-0.8.6.crate` from static.crates.io, as the alert step downloads promtool. The checker: - refuses the `.crate` unless its SHA-256 is the `ee6798b1…68dc6` that `vendor/sqlx-core/README.md` records, and reads it in memory, never extracting it; - applies the patches in name order, each hunk only at the line it names and on exact context, with no offset and no fuzz; - accepts `\ No newline at end of file` only on a file's last line, so a marker can't join a line onto the next one that review reads as separate; - allows free text only before a patch's first file, and refuses anything else outside the hunks; - fails unless the result is `vendor/sqlx-core` byte for byte: no file differs, none is missing, none is a symbolic link, and none is added but `README.md` and `reviewed-advisories.toml`. The build reads neither of those: `Cargo.toml` names no `readme` or build script, and no source includes them. - **A change to a patched file has to change its patch.** The review's edit, `tls_rustls.rs`'s verify-ca store to `let mut cert_store = public_roots();`, now fails. It passes only once a patch records it. - **Recording a change.** `--unrecorded-diff` prints what the tree changes beyond the recorded patches, as the next patch. The README's "Changing this copy" gives the steps. - **Two README rules.** The README must record the `.crate`'s SHA-256 exactly once, and it must name every patch file. The second keeps its change list in step with the patches; it checks nothing the README says. - **Locally, no flag needed.** Without `--upstream-crate`, the script uses Cargo's cached `.crate` if there is one. Without one, it skips the source check and says so. - **The Python tests use the real crate too.** The `python-tests` job downloads the same `.crate` and names it in `SQLX_CORE_UPSTREAM_CRATE`, so the real-tree tests run in CI. If it is named but missing, they fail rather than skip. - **The manifest is gone.** I kept the earlier offline premise until review showed it was false: `ci.yml` already downloads promtool. The patch check covers everything `vendor/sqlx-core.sha256` did. The manifest's only extra was working without the `.crate`, which CI now always has. And its upstream/patched/added labels were the part offline CI could not check. Removing it also removes `--write-manifest` and its README gate, which a whitespace edit or a deleted manifest got past. **What this proves, and what it doesn't.** - **It proves** that `vendor/sqlx-core` is upstream 0.8.6 plus the recorded patches, byte for byte. - **It doesn't judge the patches.** A patch that trusted the public roots again would pass, and so would a commit that changed both the code and its patch. - **The control is review.** Review every change under `vendor/sqlx-core.patches/`, where each change to the vendored code is a diff against upstream. `sqlx_tls_verify_ca.rs` and `sqlx_tls_readiness.rs` check what the three changes do. - **Two files are unchecked:** edits to the README and to `reviewed-advisories.toml`. The README says the same. ## Tests run All local. The Python checks and guards ran again on this head, after merging 3.x.x: - **Vendored source:** `python3 -m unittest -v tests.test_check_vendored_sqlx_core`: 19 passed. I ran it with `SQLX_CORE_UPSTREAM_CRATE` set to a `.crate` freshly downloaded from static.crates.io, as CI sets it, and again with Cargo's cached copy. With the variable naming a missing file, the two real-tree tests fail. The tests cover: - the real tree is 0.8.6 plus the 3 patches: 4 of 100 files patched, README.md and reviewed-advisories.toml added; - the review's `public_roots()` edit to the real `tls_rustls.rs` fails, and passes only once its `--unrecorded-diff` is saved as a patch; - each of these fails: an edited upstream file, a patched file changed beyond its patch, a removed patch, an added source file, an added `build.rs`, `.cargo-ok`, a missing upstream file, a symbolic link, and a `.crate` other than the README's; - each of these patches is refused: - a hunk at another line, on other context, or with a `+` start that disagrees; - an insertion past a file's end, and a no-newline marker that joins two lines, even when the tree matches what a lenient applier makes of them; - a patch that creates a file, or touches a file upstream lacks or one outside the crate; - timestamps, two paths, short, long or miscounted hunks, text between hunks, a malformed header, or a hunk before any file; - no hunks, a file named twice, no final newline, or no file at all; - a stray file, an upper-case name, a symlink or a directory in `vendor/sqlx-core.patches/`; - a last line without a newline, on either side, round-trips through `--unrecorded-diff`; - edits to the README and to `reviewed-advisories.toml` pass. A README that records two `.crate` SHA-256s fails, and so does one that doesn't name a patch (without the hint to record a patch); - a `.crate` whose version is not the vendored `Cargo.toml`'s fails, and the error names the version; - without `--upstream-crate`, the script checks against Cargo's cached `.crate`, and skips the source check when there is none; - `ci.yml` downloads the `.crate` before the check and the Python shard, and passes it to both. - **CI's step, run locally as written** (with `RUNNER_TEMP` set): it downloaded the `.crate` (SHA-256 `ee6798b1…68dc6`) and the check passed. - **check-env:** `python3 -m unittest -v tests.test_check_env_public_credentials`: 13 passed. The new relay test fails without the `check-env.sh` line. - **Startup, through the real binary** (unchanged by the follow-up commit; run on `d3cb5a92`): - `cargo test --locked -p qbit-prism-server --test config_cli --no-fail-fast`: 32 passed. - `verify_ca_without_a_root_certificate_fails_before_startup`: 10 cases over the three URL settings, covering `sslrootcert` absent or empty, `PGSSLROOTCERT`, `PGSSLMODE`, verify-full and require. - `startup_refuses_verify_ca_with_the_message_the_connect_gives`: startup's error equals `PgConnection::connect`'s, against a fake server that answers the SSLRequest with `S` and then sees no further byte. - `cargo test --locked -p qbit-prism-server --test public_database_config --no-fail-fast`: 6 passed, through `check-public-database-config` and `public-api`. - `cargo test --locked -p qbit-prism-server --lib config::`: 13 passed. - With the check disabled, the new verify-ca tests fail. - `cargo fmt --all -- --check` passes. `cargo clippy --locked -p qbit-prism-server --all-targets -- -D warnings` passes, apart from the three known `mismatched_lifetime_syntaxes` warnings in vendored sqlx-core. - **Guards:** `check_vendored_sqlx_core.py --upstream-crate <.crate>`, `check_prism_pool_acquires.py`, `check_gate_env_reads.py`, `check_prism_settings.py`, `check_deleted_test_map.py` and `check_toolchain_pin.py` all pass. `bash -n scripts/check-env.sh` passes, and the workflow parses as YAML. No new PostgreSQL-gated tests, settings or deleted tests. ## CI - **Correction to this PR's first body.** CI does run `tests/test_check_vendored_sqlx_core.py`: `run_python_test_shard.py` discovers `tests/test_*.py`, and run 41738227640's shard 2 ran all 18 of the earlier tests. Its upstream test was skipped there because no `.crate` was cached. The `python-tests` job now downloads one. - **What CI runs.** The lint job's vendored-sqlx-core step runs the source check against the downloaded `.crate`. CI's full suites cover the rest of `qbit-prism-server`. ## Known, and out of scope - **A whitespace-only `sslrootcert`** passes the startup check. The connect still refuses it. - **Some `tools.rs` commands skip the startup check.** They read the database URLs directly: - `fatal-state show` (`tools.rs:902`) - `submission-hold show` (`:1142`) - `candidates list` (`:1242`) - recover planning (`:1410`) - node-identity repersonalise's peer URLs (`:971-976`) The connect still refuses each with the same message. - **`policy-transition`** checks the target configuration with the process's own `PG*` environment. It applies only the `PRISM_` and `QBIT_` settings from its `--to` file, and it can't change `PRISM_DATABASE_URL` anyway. Item 3 (the release notes rewrite) is #832. Items 4 and 5 are not in this PR. Refs #825 🤖 Generated with [Claude Code](https://claude.com/claude-code) Squashed commits: d3cb5a9 3.x.x: startup refuses sslmode=verify-ca without a root certificate, and CI checks every vendored sqlx-core file against a manifest (#825) 3a7cfc8 3.x.x: CI checks vendored sqlx-core against upstream's .crate plus recorded patches, and doctor relays the verify-ca refusal (#825) a078cba Merge remote-tracking branch 'origin/3.x.x' into orca/825-release-and-tls-guards a18fba8 3.x.x: a vendored sqlx-core patch applies only as it reads: no line joined by a no-newline marker, no insertion past the end (#825) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…and CI checks vendored sqlx-core against upstream's .crate plus recorded patches (#825) ## Problem #825 items 1 and 2, from #818's and #794's reviews: 1. **verify-ca without a root certificate passes startup.** Since #818, sqlx-postgres refuses every `sslmode=verify-ca` connect that has no `sslrootcert` (or `PGSSLROOTCERT`). But nothing at startup checked for it, so a `PRISM_DATABASE_URL` or peer URL like that passed `check-config` and startup, then failed every connect. 2. **Nothing ties `vendor/sqlx-core` to upstream.** `check_vendored_sqlx_core.py` checked that both lock files build the vendored copy and that its advisories are reviewed. It never checked the files, so an unrecorded edit to the vendored TLS code would pass CI. ## Change ### Startup refuses verify-ca without a root certificate (item 1) - **Which settings.** `PRISM_DATABASE_URL` (frontend, `check-config`, the database commands and the public reader) and `PRISM_PEER_DATABASE_URL` / `PRISM_PEER_DATABASE_URL_FALLBACK` (the dual writer). Each is refused by name, with the connect's own message: > sslmode=verify-ca requires sslrootcert: verify-ca does not check the server's host name, so it trusts only the root certificates in sslrootcert, never the public roots; set sslrootcert, or use sslmode=verify-full - **Resolved as the connect resolves them.** The mode and certificate come from SQLx's `PgConnectOptions::from_url`, the parser the connect itself uses, so there is no second parser: the URL's `sslmode` and `sslrootcert` win over `PGSSLMODE` and `PGSSLROOTCERT`. `ssl_root_cert` has no getter, so it is read back through `to_url_lossy()`, as the existing password check already does. An empty `sslrootcert` names no file, so it counts as none. The certificate file is not read here; a missing or unusable file is still the connect's error, as before. - **Other modes are unchanged:** `verify-full`, `require`, `prefer`, `allow` and `disable`. - **One more refusal.** `PRISM_DATABASE_URL` is now parsed with the client's parser, as the peer URLs already were. A URL the client can't use (for example `sslmode=sometimes`) is refused at startup, by name, instead of at the first connect. - **`make doctor` shows it.** `scripts/check-env.sh` relays only known, value-free public-reader errors, so the new refusal showed as a generic image error. It now relays `public PRISM_DATABASE_URL: sslmode=verify-ca requires sslrootcert`. ### CI checks vendored sqlx-core against upstream's `.crate` plus recorded patches (item 2) - **The recorded changes are patches.** `vendor/sqlx-core.patches/` holds one `diff -u` patch per change, each with a description above it: - `0001-sqlx-4251-poll-ready-waits-on-either-direction.patch` (transact-rs/sqlx#4251, #771); - `0002-sqlx-3861-verify-ca-accepts-not-valid-for-name-context.patch` (transact-rs/sqlx#3861, #713); - `0003-verify-ca-trusts-only-sslrootcert.patch` (the local change, #818). - **CI rebuilds the tree from upstream and compares.** The step that checks the lock files now downloads `sqlx-core-0.8.6.crate` from static.crates.io, as the alert step downloads promtool. The checker: - refuses the `.crate` unless its SHA-256 is the `ee6798b1…68dc6` that `vendor/sqlx-core/README.md` records, and reads it in memory, never extracting it; - applies the patches in name order, each hunk only at the line it names and on exact context, with no offset and no fuzz; - accepts `\ No newline at end of file` only on a file's last line, so a marker can't join a line onto the next one that review reads as separate; - allows free text only before a patch's first file, and refuses anything else outside the hunks; - fails unless the result is `vendor/sqlx-core` byte for byte: no file differs, none is missing, none is a symbolic link, and none is added but `README.md` and `reviewed-advisories.toml`. The build reads neither of those: `Cargo.toml` names no `readme` or build script, and no source includes them. - **A change to a patched file has to change its patch.** The review's edit, `tls_rustls.rs`'s verify-ca store to `let mut cert_store = public_roots();`, now fails. It passes only once a patch records it. - **Recording a change.** `--unrecorded-diff` prints what the tree changes beyond the recorded patches, as the next patch. The README's "Changing this copy" gives the steps. - **Two README rules.** The README must record the `.crate`'s SHA-256 exactly once, and it must name every patch file. The second keeps its change list in step with the patches; it checks nothing the README says. - **Locally, no flag needed.** Without `--upstream-crate`, the script uses Cargo's cached `.crate` if there is one. Without one, it skips the source check and says so. - **The Python tests use the real crate too.** The `python-tests` job downloads the same `.crate` and names it in `SQLX_CORE_UPSTREAM_CRATE`, so the real-tree tests run in CI. If it is named but missing, they fail rather than skip. The download carries the same-tree skip's condition (#839), like the job's other steps, so a run that skips the shard skips it too. - **The manifest is gone.** I kept the earlier offline premise until review showed it was false: `ci.yml` already downloads promtool. The patch check covers everything `vendor/sqlx-core.sha256` did. The manifest's only extra was working without the `.crate`, which CI now always has. And its upstream/patched/added labels were the part offline CI could not check. Removing it also removes `--write-manifest` and its README gate, which a whitespace edit or a deleted manifest got past. **What this proves, and what it doesn't.** - **It proves** that `vendor/sqlx-core` is upstream 0.8.6 plus the recorded patches, byte for byte. - **It doesn't judge the patches.** A patch that trusted the public roots again would pass, and so would a commit that changed both the code and its patch. - **The control is review.** Review every change under `vendor/sqlx-core.patches/`, where each change to the vendored code is a diff against upstream. `sqlx_tls_verify_ca.rs` and `sqlx_tls_readiness.rs` check what the three changes do. - **Two files are unchecked:** edits to the README and to `reviewed-advisories.toml`. The README says the same. ## Tests run All local. The Python checks and guards ran again on this head, after merging 3.x.x: - **Vendored source:** `python3 -m unittest -v tests.test_check_vendored_sqlx_core`: 19 passed. I ran it with `SQLX_CORE_UPSTREAM_CRATE` set to a `.crate` freshly downloaded from static.crates.io, as CI sets it, and again with Cargo's cached copy. With the variable naming a missing file, the two real-tree tests fail. The tests cover: - the real tree is 0.8.6 plus the 3 patches: 4 of 100 files patched, README.md and reviewed-advisories.toml added; - the review's `public_roots()` edit to the real `tls_rustls.rs` fails, and passes only once its `--unrecorded-diff` is saved as a patch; - each of these fails: an edited upstream file, a patched file changed beyond its patch, a removed patch, an added source file, an added `build.rs`, `.cargo-ok`, a missing upstream file, a symbolic link, and a `.crate` other than the README's; - each of these patches is refused: - a hunk at another line, on other context, or with a `+` start that disagrees; - an insertion past a file's end, and a no-newline marker that joins two lines, even when the tree matches what a lenient applier makes of them; - a patch that creates a file, or touches a file upstream lacks or one outside the crate; - timestamps, two paths, short, long or miscounted hunks, text between hunks, a malformed header, or a hunk before any file; - no hunks, a file named twice, no final newline, or no file at all; - a stray file, an upper-case name, a symlink or a directory in `vendor/sqlx-core.patches/`; - a last line without a newline, on either side, round-trips through `--unrecorded-diff`; - edits to the README and to `reviewed-advisories.toml` pass. A README that records two `.crate` SHA-256s fails, and so does one that doesn't name a patch (without the hint to record a patch); - a `.crate` whose version is not the vendored `Cargo.toml`'s fails, and the error names the version; - without `--upstream-crate`, the script checks against Cargo's cached `.crate`, and skips the source check when there is none; - `ci.yml` downloads the `.crate` before the check and the Python shard, and passes it to both. - **CI's step, run locally as written** (with `RUNNER_TEMP` set): it downloaded the `.crate` (SHA-256 `ee6798b1…68dc6`) and the check passed. - **check-env:** `python3 -m unittest -v tests.test_check_env_public_credentials`: 13 passed. The new relay test fails without the `check-env.sh` line. - **Startup, through the real binary** (unchanged by the follow-up commit; run on `d3cb5a92`): - `cargo test --locked -p qbit-prism-server --test config_cli --no-fail-fast`: 32 passed. - `verify_ca_without_a_root_certificate_fails_before_startup`: 10 cases over the three URL settings, covering `sslrootcert` absent or empty, `PGSSLROOTCERT`, `PGSSLMODE`, verify-full and require. - `startup_refuses_verify_ca_with_the_message_the_connect_gives`: startup's error equals `PgConnection::connect`'s, against a fake server that answers the SSLRequest with `S` and then sees no further byte. - `cargo test --locked -p qbit-prism-server --test public_database_config --no-fail-fast`: 6 passed, through `check-public-database-config` and `public-api`. - `cargo test --locked -p qbit-prism-server --lib config::`: 13 passed. - With the check disabled, the new verify-ca tests fail. - `cargo fmt --all -- --check` passes. `cargo clippy --locked -p qbit-prism-server --all-targets -- -D warnings` passes, apart from the three known `mismatched_lifetime_syntaxes` warnings in vendored sqlx-core. - **Guards:** `check_vendored_sqlx_core.py --upstream-crate <.crate>`, `check_prism_pool_acquires.py`, `check_gate_env_reads.py`, `check_prism_settings.py`, `check_deleted_test_map.py` and `check_toolchain_pin.py` all pass. `bash -n scripts/check-env.sh` passes, and the workflow parses as YAML. No new PostgreSQL-gated tests, settings or deleted tests. ## CI - **Correction to this PR's first body.** CI does run `tests/test_check_vendored_sqlx_core.py`: `run_python_test_shard.py` discovers `tests/test_*.py`, and run 41738227640's shard 2 ran all 18 of the earlier tests. Its upstream test was skipped there because no `.crate` was cached. The `python-tests` job now downloads one. - **What CI runs.** The lint job's vendored-sqlx-core step runs the source check against the downloaded `.crate`. CI's full suites cover the rest of `qbit-prism-server`. ## Known, and out of scope - **A whitespace-only `sslrootcert`** passes the startup check. The connect still refuses it. - **Some `tools.rs` commands skip the startup check.** They read the database URLs directly: - `fatal-state show` (`tools.rs:902`) - `submission-hold show` (`:1142`) - `candidates list` (`:1242`) - recover planning (`:1410`) - node-identity repersonalise's peer URLs (`:971-976`) The connect still refuses each with the same message. - **`policy-transition`** checks the target configuration with the process's own `PG*` environment. It applies only the `PRISM_` and `QBIT_` settings from its `--to` file, and it can't change `PRISM_DATABASE_URL` anyway. Item 3 (the release notes rewrite) is #832. Items 4 and 5 are not in this PR. Refs #825 🤖 Generated with [Claude Code](https://claude.com/claude-code) Squashed commits: af6780d 3.x.x: startup refuses sslmode=verify-ca without a root certificate, and CI checks vendored sqlx-core against upstream's .crate plus recorded patches (#825) 64ee188 Merge remote-tracking branch 'origin/3.x.x' into orca/825-release-and-tls-guards 12b8887 3.x.x: python-tests downloads upstream sqlx-core only in a run that runs the shard (#825) Co-Authored-By: Claude Opus 5.5 <[email protected]>
Problem
docs/releasing.mdpipesgit show v<version>:doc/release-notes-<version>.mdthroughsed -Einto/tmp/qbit-release-notes.md, then runsgh release create --notes-fileon it. Each line runs regardless of the one before. Ifgit showorsedfails, the redirect has already truncated the file, andgh release createpublishes an empty body, or whatever partial outputsedwrote (#825 item 3, from #811's review).The reviewer's claimed GNU sed misparse of the
#in a bracket expression was not reproduced: GNU sed 4.9 rewrites all 17 links in the 3.1.1 notes. The change makes the procedure fail closed anyway.Change
The tag, the rewrite and the release now run in one subshell under
set -e -o pipefail:git fetch,git tag -s,git verify-tag,git showorsedstops it, a failure on either side of the pipe included. So does notes output that is empty or blank (grep -q '[^[:space:]]', a strictly stronger test thantest -s).git push, so missing or empty notes stop the block before anything is public, and beforeprism-load-l3.ymlstarts.v<version>tag that already exists locally, possibly on another commit, stops it instead of being published.mktempfile with an EXIT trap, not a fixed path under/tmp.|as their delimiter, which neither the patterns nor the replacements contain. The expressions are otherwise unchanged.git ls-remoteshows the tag as public. If it isn't, delete the local tag and start again. If it is, never recreate it: rerun the block withoutgit tag -sandgit push.This is the only copy of the command: a search of the tracked files and the release skills found no other.
This is its own PR so it can merge before 3.1.2 is published. #825's items 1 and 2 (the verify-ca startup check and the vendored sqlx-core source manifest) touch Rust and CI and follow in a separate PR.
Tests run
The proof script ran the block exactly as
docs/releasing.mdholds it, with<version>= 3.1.1 and<release-main-sha>=v3.1.1^{commit}. It stubbedgit fetch/tag/verify-tag/pushandgh, recording each call, so nothing touched the remote. It ran under both bash 5.3.9 and dash 0.5.12-12ubuntu3, with identical results:e97423db) and the new block's rewrite, both run ongit show v3.1.1:doc/release-notes-3.1.1.md, give byte-identical output (cmp).sedthat fails after partial output, exits 0 and still callsgh release create.CI
Docs-only: no code or workflow changes. CI's own checks are enough.
Refs #825
🤖 Generated with Claude Code
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.