Skip to content

chore(compat): move the three stale reader rows to their newest published patch - #391

Merged
rubenhensen merged 3 commits into
mainfrom
chore/379-move-stale-reader-rows
Aug 31, 2026
Merged

chore(compat): move the three stale reader rows to their newest published patch#391
rubenhensen merged 3 commits into
mainfrom
chore/379-move-stale-reader-rows

Conversation

@dobby-coder

@dobby-coder dobby-coder Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Closes #379.

Moves the three stale rows in COMPATIBILITY.md's reader list to the highest published patch of their line, and moves both gates' copies with them.

row was now
crates.io pg-core 0.6.3 0.5.10 0.6.5 0.5.10
npm @e4a/pg-wasm 0.6.1 0.6.5
npm @e4a/pg-js 2.3.3 1.11.0 2.4.0 1.11.0

0.5.10 and 1.11.0 are the highest in their lines and do not move. Each of the three is a replacement rather than an addition, as no_two_pinned_readers_share_a_minor_line requires. The "Checked against the registries" line reads 2026-08-31, re-measured today against crates.io and npm rather than copied from the issue body.

0.6.5 ships the deprecation

The issue asked for the comment in reader! to be re-checked rather than carried forward, and the claim in it has flipped. Published pg-core 0.6.5 does carry #[deprecated] on VERSION_V3 (pg-core-0.6.5/src/consts.rs:38 in the crates.io tarball); 0.6.3 carried none. So the two #[allow(deprecated)] the comment was written for are load bearing now instead of inert. Dropping the one on the import fails the build:

error: use of deprecated constant `pg_core::consts::VERSION_V3`: the name is one higher than the wire value it holds; use VERSION_2

The comment now records that instead of its opposite. 0.5.10 still contains no #[deprecated] at all, so in that module both allows stay inert.

WIRE_VERSION did not move: it is still 2 on both sides, and every reader opened every case it is meant to, so the moved versions speak the same container version.

Beyond the seven files the issue lists

Two JS tests name a reader by its id and would have thrown no reader configured the moment the pin moved: WASM_READER in test/gate-teeth.test.mjs, and the last assertion in test/manifest.test.mjs. The version literals in test/failures.test.mjs and the synthetic documents in support_window.rs and manifest.test.mjs are labels and fixtures rather than readers, so they are untouched.

Both gate READMEs name the pinned versions in their open-one-case command and in the reader table, so those follow the pins. One further line in pg-compat-js/README.md: its "adding a version" walkthrough used "pg-js-2-4-0": "npm:@e4a/pg-js@2.4.0" as the hypothetical, which this change turns into a real entry in package.json. It now reads 2.5.0, the way pg-compat/README.md uses an unpublished 0.7.0 for the same job. Revert that line if you would rather the example stayed as it was.

Testing

Both acceptance checks, against a sample set sealed by HEAD:

cargo test --manifest-path pg-compat/Cargo.toml --locked   # 18 passed
cd pg-compat-js && npm ci && npm test                      # 26 passed

Also green: cargo clippy --manifest-path pg-compat/Cargo.toml --all-targets --locked -- -D warnings, cargo fmt --check on pg-compat, and the pg-core, pg-pkg, pg-cli and pg-ffi suites as CI runs them.

Both lockfiles were regenerated by building (cargo check, npm install), not hand-edited.

Reviewed by dobby: the code-comments rule over the full diff (no breach — the only comment touched is the reader! deprecation rewrite, which records a live constraint in an already densely commented file), plus a correctness pass over all 11 files — cargo test --workspace --locked 394 passed, pg-compat 18 passed, pg-compat-js 26 passed, clippy -D warnings and cargo fmt --check clean — approve, with the two findings fixed in this PR at 948ad99.
Fixed: pg-compat-js/src/readers.mjs:61installedPackage's doc comment used pg-js-2-4-0 as a hypothetical alias, which this PR turns into a live entry resolving to the opposite package; moved to 2.5.0/pg-js-2-5-0, the second occurrence of the collision the body already caught for README.md.
Fixed: pg-compat-js/package-lock.jsonnpm install had left the hoisted transitive @e4a/pg-wasm at 0.6.1 (both pg-js readers declare ^0.6.1), so the two @e4a/pg-js legs unsealed through a version the reader list no longer declares while a fresh @e4a/pg-js@2.4.0 install gets 0.6.5; npm update @e4a/pg-wasm moves it, lockfile only, and the gate still opens every case.
Attention: nothing pins or asserts that hoisted transitive, so the next pin move can silently re-split it — installedPackage() checks only the alias, and pg-compat-js/test/manifest.test.mjs compares only what it returns. Worth an overrides entry or one assertion there, in its own PR.

…shed patch

The reader list is "the highest published patch of each line in the support
window", but both gates check the document against their own copy and never
against a registry, so all three movable rows had drifted: pg-core 0.6.3 with
0.6.5 published, @e4a/pg-wasm 0.6.1 with 0.6.5 published, @e4a/pg-js 2.3.3 with
2.4.0 published. 0.5.10 and 1.11.0 are already the highest in their lines and
do not move.

Each move is a replacement, not an addition: two `=` pins on one minor line do
not resolve, which `pg-compat/tests/support_window.rs` holds the crate to.

The deprecation comment in `reader!` is now the other way round. pg-core 0.6.5
is the first pinned release that ships the `#[deprecated]` on `VERSION_V3`, so
the `#[allow(deprecated)]` pair it was written for is load bearing rather than
inert; dropping either one fails `pg-compat-lint`'s clippy `-D warnings`.

Both lockfiles are regenerated, not hand-edited. The two gate READMEs and the
two JS tests that name a reader by id follow the pins.

Closes #379

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@dobby-coder
dobby-coder Bot requested a review from rubenhensen August 31, 2026 07:43
dobby-coder Bot and others added 2 commits August 31, 2026 08:05
….4.0 alias

`pg-js-2-4-0` was a safe hypothetical while it existed nowhere. This PR makes
it a live `package.json` entry pointing at `@e4a/pg-js@2.4.0`, so the doc
comment's `npm:@e4a/pg-wasm@2.4.0 under a pg-js-2-4-0 alias` read as a claim
about a real alias that resolves to the opposite package. Bumped to
`2.5.0`/`pg-js-2-5-0`, the same unpublished-version trick this PR already
applied to README.md's step-2 walkthrough and pg-compat/README.md uses for
0.7.0. Second occurrence of that collision; the first was caught, this one was
missed.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
`npm install` left the hoisted transitive `@e4a/pg-wasm` at 0.6.1: both pg-js
readers declare `^0.6.1` and 0.6.1 still satisfies it. Before this PR the pin
and the transitive were both 0.6.1 and agreed by coincidence; moving the pin to
0.6.5 split them, so the two `@e4a/pg-js` legs (the three `stream*` cases)
unsealed through a version the reader list no longer declares, while a consumer
installing `@e4a/pg-js@2.4.0` fresh today gets 0.6.5 — a combination the gate
did not exercise. `installedPackage()` only checks the alias, so nothing caught
it.

`npm update @e4a/pg-wasm`; lockfile only, package.json untouched. Verified
after `npm ci` that the transitive resolves to 0.6.5, and the gate still opens
every case: 26 passed.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@dobby-coder
dobby-coder Bot marked this pull request as ready for review August 31, 2026 08:06
@rubenhensen
rubenhensen merged commit 5c1a3cc into main Aug 31, 2026
67 checks passed
@rubenhensen
rubenhensen deleted the chore/379-move-stale-reader-rows branch August 31, 2026 08:56
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.

the three stale reader rows: move pg-core to 0.6.5, pg-wasm to 0.6.5, pg-js to 2.4.0

1 participant