fix(pg-compat): move the crates.io reader pin to 0.6.3 - #354
Conversation
crates.io serves pg-core 0.6.3, so the 0.6 line's pin was two patches
behind what COMPATIBILITY.md declares the window to be ("the highest
published patch of each line"). Replace the =0.6.1 entry rather than add
one: =0.6.1 and =0.6.3 are semver-compatible, cargo unifies them to a
single version, and the two `=` requirements then conflict.
tests/support_window.rs gains a guard for that constraint, since the
README's own worked example was a same-minor version. Both spots that
resolve `VERSION_V3` carry #[allow(deprecated)] so the first pin that
reaches a release carrying the #339 rename does not turn pg-compat-lint's
`-D warnings` red; an allow on the `use` alone leaves the WIRE_VERSION
initializer warning.
Closes #352
…t pins by semver Three review nits from the gatekeeping pass on #354, none of them behaviour changes to the pin move itself. `#[allow(deprecated)]` reads as a live constraint but is inert against the versions this crate actually pins. Measured: published pg-core 0.6.3 and 0.5.10 contain no `#[deprecated]` anywhere, so the deprecation exists only in this tree (`pg-core/src/consts.rs`, #339 via #345) and neither allow suppresses anything today. Keeping them is right — they are for the pin that first ships it — but the code comment and the CLAUDE.md sentence both stated the clippy `-D warnings` hard error as a constraint in force, which invites the conclusion that 0.6.3 deprecates `VERSION_V3`. Both now say preemptive, and CLAUDE.md says so explicitly because it is auto-loaded agent context. `minor_line` keyed on `major.minor`, but the doc comment justified the guard by semver compatibility, and those two only coincide while the major is `0`. From 1.0.0 on cargo's compatibility bucket is the major alone, so `=1.0.0` and `=1.1.0` conflict exactly as `=0.6.1`/`=0.6.3` do and the guard would have waved them through. Latent today since pg-core is 0.6.x, but it is the silent-green class this test exists to close. `README.md`'s `manifest.json` example still showed `"version": "0.6.1"` in `sealedBy`. Unlike the other references this field is HEAD's own pg-core version rather than a reader pin — the sealer on this branch emits `0.6.3` — so it re-drifts on every release. Now a placeholder, matching the block's other placeholders, with the reason in the field's bullet. Gates re-run green on this tree: 13 tests over four targets, `cargo fmt --check` and `cargo clippy --all-targets --locked -- -D warnings` both exit 0.
…t pins by semver Three review nits from the gatekeeping pass on #354, none of them behaviour changes to the pin move itself. `#[allow(deprecated)]` reads as a live constraint but is inert against the versions this crate actually pins. Measured: published pg-core 0.6.3 and 0.5.10 contain no `#[deprecated]` anywhere, so the deprecation exists only in this tree (`pg-core/src/consts.rs`, #339 via #345) and neither allow suppresses anything today. Keeping them is right — they are for the pin that first ships it — but the code comment and the CLAUDE.md sentence both stated the clippy `-D warnings` hard error as a constraint in force, which invites the conclusion that 0.6.3 deprecates `VERSION_V3`. Both now say preemptive, and CLAUDE.md says so explicitly because it is auto-loaded agent context. `minor_line` keyed on `major.minor`, but the doc comment justified the guard by semver compatibility, and those two only coincide while the major is `0`. From 1.0.0 on cargo's compatibility bucket is the major alone, so `=1.0.0` and `=1.1.0` conflict exactly as `=0.6.1`/`=0.6.3` do and the guard would have waved them through. Latent today since pg-core is 0.6.x, but it is the silent-green class this test exists to close. `README.md`'s `manifest.json` example still showed `"version": "0.6.1"` in `sealedBy`. Unlike the other references this field is HEAD's own pg-core version rather than a reader pin — the sealer on this branch emits `0.6.3` — so it re-drifts on every release. Now a placeholder, matching the block's other placeholders, with the reason in the field's bullet. Gates re-run green on this tree: 13 tests over four targets, `cargo fmt --check` and `cargo clippy --all-targets --locked -- -D warnings` both exit 0.
d49d2b7 to
5777c20
Compare
There was a problem hiding this comment.
VERDICT: approve
Rules + review sign-off — cycle 1
The pin move is correct and every gate is green. Nothing here blocks. The review pass found three nits and no bugs, and rather than send the PR back for prose I fixed all three on the branch in 5777c20 — so the inline comments below are a record of what was found and what it turned out to be, not homework.
What I verified independently, not from the PR body
- crates.io really does put
0.6.3at the top of the0.6line. The index serves0.3.0-rc.0 … 0.3.1, 0.5.6 … 0.5.10, 0.6.0, 0.6.1, 0.6.2, 0.6.3, so=0.6.3and=0.5.10are the highest published patch of each line — which is exactly whatCOMPATIBILITY.mddeclares the window to be. The PR body's version list is accurate. - All four acceptance commands, re-run here.
seal-sampleswrites the set;cargo test --manifest-path pg-compat/Cargo.toml --lockedis 13 tests over four targets, all passing (10 + 0 + 2 + 1, matching the body's count);cargo fmt -- --checkexits 0;cargo clippy --all-targets --locked -- -D warningsexits 0.cargo test -p pg-core --features test,rust,streamis green too. - The new guard has teeth, measured rather than argued. Adding a second
0.6.xentry toreaders()failsno_two_pinned_readers_share_a_minor_linewith the exact message the body quotes. And the fix in the second comment below is not cosmetic: with the originalmajor.minorbucketing, a tree pinning both1.0.0and1.1.0left that test reporting ok — silent green on precisely the collision it exists to catch. With the fix it fails, naming both. Both probes were undone with the inverse edit;git statusis clean against the pushed commit. - The
.gitattributesCRLF trap does not apply to this suite, which is worth recording because two sibling gates in this repo family did have it.tests/support_window.rsreachesCOMPATIBILITY.mdthroughparse_crates_io_readers, and that parser istext.lines()plusline.trim()/trim_start()throughout, anchored on a single-lineHEADERconstant. Rust'sstr::lines()strips a trailing\r, so a Windows checkout parses identically. No multi-line anchor, nor##"literal, nothing to pin — the two entries the root.gitattributesdoes carry are for the spec-mutation gates, which is the shape that needs it. - Dropping the
#268reference fromCLAUDE.mdis correct, not a lost pointer — #268 is closed. Same for the code comment's#339: that is the issue, closed by #345, which is the commit that actually added the in-tree deprecation. - The lockfile carrying both
reqwestlines at once is right:0.6.3is off the legacyirmachain and pullsreqwest 0.12, while=0.5.10still drags0.11.27. Visible in the clippy run, which checksirma v0.2.1andirmars v0.2.2side by side.
Why the three nits were worth a commit and not a loop
All three were accuracy, not behaviour. The load-bearing one is the first: the PR's own reasoning about #[allow(deprecated)] is sound in principle but was reproduced against a scratch crate rather than the real dependency, and the resulting prose described a constraint as in force when it is preemptive. CLAUDE.md is auto-loaded agent context, so a wrong constraint there is the kind of thing a later run acts on. Fixing the file and leaving the same sentence standing in CLAUDE.md would just have re-found it next round, so both surfaces moved together.
One thing I introduced and then corrected in the same commit: generalising minor_line past 0.x made the guard's own panic text ("two same-minor = pins") wrong for the 1.x case it now catches, along with the matching sentences in README.md and CLAUDE.md. All three now say compatibility bucket and spell out the 0.x / 1.0.0-on split.
State
Gates re-run green on 5777c20 before pushing. CI was still in flight at review time; I flip this out of draft once it lands green, and it then needs a maintainer approval — the bot cannot self-approve, which is why this is a COMMENT carrying VERDICT: approve rather than an APPROVE.
|
/dobby solve conflicts |
|
On it — I'll take a look at PR #354, sort out the merge conflicts, and push the resolution to the branch. |
…-0-6-3 # Conflicts: # CLAUDE.md
|
Done, but you beat me to the merge button! I resolved the Verified against the merged tree: pg-compat gate (13/13), pg-compat-js (23/23), pg-core suite, fmt/clippy, and the wasm suite under Node. The red "wasm tests in browsers" checks aren't related to the conflict — firefox failed to install via apt in CI, which cancelled the rest of that matrix; my run on One loose end: while checking the |
Moves
pg-compat's crates.io reader pin from=0.6.1to=0.6.3, guards theconstraint that makes a same-minor pin impossible, and corrects the two
documents that describe it.
crates.io serves
0.6.3, 0.6.2, 0.6.1, 0.6.0, 0.5.10, …, so the 0.6 line's pinwas two patches behind the window
COMPATIBILITY.mddeclares ("the highestpublished patch of each line"). The 0.5 line's
0.5.10was already correct.What changed
pg-compat/Cargo.toml:=0.6.1replaced by=0.6.3, key renamed tomatch the existing convention. Not added alongside; see below.
pg-compat/src/lib.rs: thereader!invocation and itsreaders()entrymove to
0.6.3. Both places that resolveVERSION_V3carry#[allow(deprecated)].pg-compat/Cargo.lock: regenerated. 0.6.3 is off the legacyirmachain(chore(pg-core): drop or replace the legacy irma 0.2.1 dependency #263), so it pulls
reqwest 0.12while the=0.5.10pin keepsreqwest 0.11. Both lines now sit in that lockfile.pg-compat/tests/support_window.rs: newno_two_pinned_readers_share_a_minor_line.COMPATIBILITY.md: thecrates.iorow only. Thenpmandnugetrows areuntouched.
pg-compat/README.md: the "Adding a version" example moves to a cross-lineversion, and the constraint is stated with its reason.
CLAUDE.md: the three bullets that named=0.6.1as the pin.#[allow(deprecated)]needs two attributes, not oneThe issue asked for one line on the import. Measured, that is not enough: an
allow on a
useitem covers only theuse, and the lint fires again onpub const WIRE_VERSION: u16 = VERSION_V3;, which resolves the deprecated itemthrough that import. Reproduced against a scratch crate with the same shape:
Under
pg-compat-lint's-D warningsthat is the same hard error the attributeexists to prevent, so the const carries one too. Neither renames the constant;
the published crates only have the old name.
The guard, red
A real second
0.6.xpin never reaches the test. Cargo refuses to resolve themanifest, which is the constraint itself:
So the guard is shown red the way it is reachable: a second same-minor entry in
readers(), which is step 2 of the README recipe and the state someone lands inbefore the manifest bites.
Both probes reverted afterwards; the tree here has neither.
Acceptance check
All four run green on this branch:
The gate is 13 tests over four targets, all passing: 0.6.3 opens every case in
the HEAD-sealed set, both modes, both recipients, no abort. Also ran the two
suites that read the same
Reader listblock, both green:cargo test --manifest-path pg-core/Cargo.toml --features test,rust,streamand
PG_COMPAT_ARTIFACTS=/tmp/wire npm --prefix pg-compat-js test(23 pass,0 cancelled).
Closes #352
Part of #327