refactor: #54 edtf-postgres becomes a workspace member - #59
Merged
Conversation
It sat outside the workspace because a member's [profile] is ignored, and the root profile is wasm-tuned (opt-level = "z", strip = "symbols") while a Postgres extension needs speed and its symbols. That is real, but it is not the whole story: Cargo takes per-package profile overrides, and opt-level and strip are both overridable (only panic, lto and rpath are not — and this workspace needs neither of those to differ). Verified in one build: edtf_core: opt-level=z strip=symbols edtf_postgres: opt-level=3 strip=<none> So the crate joins the workspace, with default-members holding the five pure-Rust crates so bare cargo build/test/clippy still need no $PGRX_HOME and never hit the mutually-exclusive pg14-pg18 features. This is the layout every serious pgrx project uses: ParadeDB sets default-members for exactly this reason, and both it and pgvectorscale keep the extension a member and the macOS linker flags in the ROOT .cargo/config.toml — Cargo does not read config files from crates inside a workspace, so a crate-local one silently stops applying. What this deletes: the hand-bump, check-version-drift.sh, the lint:versions gate, the crate's own Cargo.lock, and 40 lines of lint config mirrored from the root because it could not inherit. release-plz now owns edtf-postgres's version, tag, changelog and release like the other five, via version_group. semver_check is off for it: cargo-semver-checks builds the crate, which needs PGRX_HOME, and its contract is its SQL surface, not a Rust API. The find that matters most: cargo-deny had never audited this crate's ~150 dependencies, because the gate runs over the workspace and the crate was not in it. A published crate has been outside the supply-chain gate since it shipped. Bringing it in surfaced an unmaintained advisory (serde_cbor via pgrx, upstream pgrx#524), three permissive licenses, nine duplicate versions and fifteen build scripts — each now recorded with a reason that expires itself when upstream moves. None of this is new exposure; it was simply invisible. Verified locally: cargo pgrx test pg18 passes (6 tests, 13 SQL entities discovered), cargo check --all-features --all-targets needs no Postgres, cargo package -p edtf-postgres produces the same dependency set as the old standalone lockfile, and cargo deny is green. Refs #54
lefthook's pre-push ran cargo test/clippy --workspace --all-features, which now reaches edtf-postgres and enables pg14-pg18 at once — the hard error pgrx raises for multiple pg$VERSION features. It never surfaced in the Taskfile sweep because the hooks carry their own copies of those commands. Dropping --workspace also dropped edtf-postgres out of clippy entirely, since it is not a default member. It cannot rejoin the workspace gate: linting it needs $PGRX_HOME and exactly one pg feature. So it is linted in ci.yml's postgres job, which has both, against every Postgres major, at the same tier as everything else.
The action queries api.deps.dev and api.securityscorecards.dev for dependencies a PR ADDS. Every PR so far added none, so the calls were never made and the allowlist was never wrong. Bringing edtf-postgres into the workspace adds ~150 crates to the graph, the action went to score them, and egress-block turned it into a bare 'fetch failed'. Endpoints taken from what harden-runner reported blocked, same derivation as every other allowlist here.
This was referenced Jul 31, 2026
Closed
Merged
Closed
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Deletes the special-casing #54 was built to work around, rather than adding more of it.
The premise was wrong
edtf-postgressat outside the workspace because a member's[profile]is ignored, and the root profile is wasm-tuned (opt-level = "z",strip = "symbols") while a Postgres extension needs speed and its symbol table intact.That constraint is real. What I had asserted — that it was unfixable — was not. Cargo takes per-package profile overrides, and
opt-levelandstripare both overridable; onlypanic,ltoandrpathare not, and none of those need to differ here (root already setslto = "fat", matching, andpanicdefaults tounwindfor both).Proven in a single build:
The layout
default-membersholds the five pure-Rust crates, so barecargo build/test/clippyneed no$PGRX_HOMEand never hit the mutually-exclusivepg14–pg18features. Verified:cargo check --all-features --all-targetspasses with no Postgres present.This is what established pgrx projects do. ParadeDB sets
default-members = ["pg_search", "tokenizers"]with the same rationale in a comment; pgvectorscale keeps its extension a member too. Both put the macOS linker flags in the root.cargo/config.toml— because Cargo "does not read config files from crates within the workspace", so a crate-local one silently stops applying to anything run from the root.pg_searchhas no.cargo/at all.What this deletes
check-version-drift.sh, and thelint:versionsgate — release-plz now owns version, tag, changelog and release viaversion_groupCargo.lockand.cargo/config.tomlpublish-crates.shand the dual-workspace handling inpackage-all.shsemver_check = falsefor it: cargo-semver-checks builds the crate, which needs$PGRX_HOME, and its contract is its SQL surface, not a Rust API — the lib target exists only because pgrx requires one.The finding that matters most
cargo-deny had never audited this crate's ~150 dependencies. The gate runs over the workspace; the crate wasn't in it. A published crate has sat outside the supply-chain gate since it shipped.
Bringing it in surfaced an unmaintained advisory (
serde_cborvia pgrx — informational, not a vulnerability;patched = []because there is nothing to patch; tracked upstream at pgrx#524), three permissive licences, nine duplicate versions, and fifteen build scripts. Each is recorded with a reason, andunused-ignored-advisory = "deny"plus-D unmatched-skipmean every entry fails CI the moment upstream moves.None of this is new exposure. It was invisible.
Two things found by running it
lefthook.ymlcarries its own copies of the clippy and test commands, so the Taskfile sweep missed them —--workspace --all-featuresthere hit the pg-feature clash on push. Fixed.Dropping
--workspacethen droppededtf-postgresout of clippy entirely. It cannot rejoin the workspace gate — linting it needs$PGRX_HOMEand exactly one pg feature — so it is now linted in ci.yml's postgres job, against every Postgres major, at the same-D warningstier as everything else.Verified locally
cargo pgrx test pg18in the exact CI form — 6 passed, 13 SQL entities discovered.cargo packagewith the verify build, exact CI form — clean.cargo package -p edtf-postgresyields the same dependency set as the old standalone lockfile (225 → 227;wasm-bindgenwas already there viawhoami → web-sys).task lint --forcegreen.cargo deny checkgreen.task pg:lintgreen.Refs #54