Skip to content

Bump cratestack to 0.6.7, and correct the aws-lc-rs claim in AGENTS.md - #117

Merged
stephane-segning merged 1 commit into
mainfrom
claude/cratestack-067
Aug 3, 2026
Merged

Bump cratestack to 0.6.7, and correct the aws-lc-rs claim in AGENTS.md#117
stephane-segning merged 1 commit into
mainfrom
claude/cratestack-067

Conversation

@stephane-segning

Copy link
Copy Markdown
Contributor

Pull Request: Bump cratestack to 0.6.7, and correct the aws-lc-rs claim in AGENTS.md

1. Summary

This PR changes:

It solves:

  • Picks up the resolution of cratestack#334 (filed from this repo): install_fips_crypto_provider() returned Ok(()) while installing nothing, because crypto-aws-lc-rs was declared = []. #341 makes enabling it a hard compile_error! instead of a false success.
  • Removes a documentation landmine: the previous AGENTS.md text would have sent the next person chasing a non-existent upstream blocker.

2. Intent

The bump itself is small and behaviour-neutral here — we don't enable crypto-aws-lc-rs, so the new compile_error! never fires in this workspace. It's worth taking because it's the fix for an issue this repo reported, and because staying current is the pin discipline.

The AGENTS.md correction is the substantive part. A previous revision of that file — which I wrote — claimed aws-lc-rs reaches this tree from four independent paths including cratestack and sqlx, and concluded that getting off it was blocked on cratestack offering an opt-out. That was wrong, and it was wrong in the costly direction: it told the next reader that a thing they can do today is blocked upstream.

The error was reading cargo tree -i aws-lc-rs. That inverts on the shared rustls node and lists everything depending on it — not everything asking for aws-lc-rs. Because Cargo unifies features, one rustls in the graph carries both providers' feature flags regardless of who requested which, so cratestack crates appear in that output while actually having selected ring. cargo tree -e features -i rustls shows the real feature edges, and is now the command the docs point at.

3. Scope

In Scope

  • The version bump and lockfile.
  • The corrected aws-lc-rs section in AGENTS.md, including the diagnostic-command gotcha and the empirical result.
  • The stale M1 status line.

Out of Scope

  • Actually opting out of aws-lc-rs. Now known to be achievable with no upstream blocker (see Verification), but rustls-no-provider panics at reqwest::Client::new() unless the application installs a CryptoProvider in main first. That runtime path is unverified, so it deserves a deliberate change with a live TLS test — not a drive-by in a version-bump PR.
  • Real FIPS support. Still requires the cross-crate backend-selection work #341 explicitly deferred; the feature is now honest about not existing rather than silently lying.
  • Live sweep: cross-binary interference breaks #114's kill-9 gate (single-test binary, so not #102's within-binary cause) #116 (below) — pre-existing, unrelated to this bump.

4. Verification

I verified this change by:

  • Running automated tests
  • Running manual tests
  • Checking logs
  • Checking metrics
  • Testing error cases
  • Testing permissions/security behavior
  • Testing rollback or failure behavior, if relevant

Commands run:

# confirm the fix is really in 0.6.7, and that 0.6.0's SQLSTATE fix didn't regress with it
grep -A8 'crypto-aws-lc-rs' cratestack-pg-0.6.7/src/lib.rs
grep -c 'cool_error_from_sqlx'                  cratestack-sqlx-0.6.7/src/query/write/*.rs
grep -c 'CoolError::Database(error.to_string())' cratestack-sqlx-0.6.7/src/query/write/*.rs

cargo build --workspace && cargo fmt --all --check
cargo clippy --workspace --all-targets -- -D warnings
cargo test --workspace

# live, against a real Postgres 16
DATABASE_URL=... cargo test --workspace -- --ignored

Results:

0.6.7 crypto-aws-lc-rs  → compile_error!(...) — #341's fix present, not inferred from the version
0.6.7 write paths       → 33 cool_error_from_sqlx, 0 raw CoolError::Database  (no regression of #87)

cargo build --workspace → clean, no source changes needed
fmt / clippy -D warnings→ clean / 0 errors
cargo test --workspace  → 198 passed, 0 failed
live sweep              → 62 passed, 1 failed  ← see below, not this bump

The aws-lc-rs claim, tested rather than argued. Setting default-features = false, features = ["rustls-no-provider"] on the four authkestra pins:

$ cargo tree -i aws-lc-rs
error: package ID specification `aws-lc-rs` did not match any packages

It leaves the graph entirely. Confirming the sources agree: cratestack-sqlx selects sqlx-core's _tls-rustls-ring-webpki; cratestack-client-rust selects reqwest's rustls-tls, which in reqwest 0.12 expands to rustls-tls-webpki-roots__rustls-ring. Both ring. The aws-lc-rs edge was reqwest 0.13's defaults via authkestra-engine, exactly as marcjazz/authkestra#179 described. That experiment was reverted, not shipped — see Out of Scope.

The one live failure is not from this bump. #114's kill_9_mid_submit_reclaims_and_resubmits_without_losing_the_message fails under the full sweep and passes in isolation. It reproduces on main at =0.6.3, so it predates this change. Filed as #116, with what I think is a decisive detail: that binary contains exactly one test, so within-binary concurrency — the cause #102 was closed on — cannot explain it. It's cross-binary interference, made sharp by #114 spawning a real sms-worker subprocess whose claim loop selects by predicate and will claim other suites' rows.

5. Screenshots / Evidence

No UI. Evidence is the command output above.

6. Risk Assessment

Risk level:

  • Low
  • Medium
  • High

Potential risks:

  • Four patch versions in one jump (0.6.4 → 0.6.7), so more than just #341 comes along.
  • The new compile_error! would break any build enabling crypto-aws-lc-rs.

Mitigation:

7. AI Usage Declaration

AI was used for:

  • Understanding existing code
  • Generating code
  • Refactoring
  • Generating tests
  • Drafting documentation
  • Reviewing the diff
  • Not used

Human verification:

  • I understand every meaningful change in this PR
  • I checked generated code manually
  • I checked generated tests manually
  • I removed unsupported AI assumptions
  • I accept responsibility for this PR

(Left unchecked by the assistant that opened this PR — these are human-accountability claims and can only be truthfully made by the reviewing human. Please check off what applies after your own review before merging.)

8. Reviewer Focus

Please focus your review on:

  • Correctness
  • Architecture
  • Security
  • Performance
  • Tests
  • Maintainability
  • Edge cases

Specifically:

  1. The corrected AGENTS.md section is the part worth actually reading. It now states the opposite of what it said yesterday, so it's worth confirming you agree with the reasoning rather than taking my word for the reversal — the cargo tree -e features -i rustls output is the evidence.
  2. Is dropping aws-lc-rs something you want soon? It's now a small, self-contained change (authkestra feature flags + installing a ring provider in main), gated only on a live TLS test. Happy to open it as its own issue or PR.
  3. Live sweep: cross-binary interference breaks #114's kill-9 gate (single-test binary, so not #102's within-binary cause) #116 is knowingly left failing in the full sweep rather than silenced. If you'd rather have a green sweep today, the cheap interim is a just live-test recipe that runs each --test target in turn — say the word and I'll add it.

Picks up cratestack/cratestack#341, which resolved the issue this repo
filed as cratestack/cratestack#334: cratestack-pg's
install_fips_crypto_provider() returned Ok(()) while installing nothing,
because crypto-aws-lc-rs was declared as an empty feature. Enabling it
is now a hard compile_error! instead of a false success. Verified the
fix is present in 0.6.7's vendored source rather than inferred from the
version, and that 0.6.0's SQLSTATE fix has not regressed alongside it
(33 cool_error_from_sqlx calls, 0 raw CoolError::Database mappings
across the twelve write paths).

We do not enable crypto-aws-lc-rs, so the compile_error! does not reach
this workspace; the bump is behaviour-neutral here.

AGENTS.md correction, which matters more than the bump. A previous
revision of this file — mine — claimed aws-lc-rs reaches this tree from
four independent paths including cratestack and sqlx, and that getting
off it was blocked upstream. That was wrong. It came from reading
`cargo tree -i aws-lc-rs`, which lists everything depending on the
shared rustls rather than everything asking for aws-lc-rs; Cargo unifies
features, so one rustls carries both providers' flags regardless of who
requested which. `cargo tree -e features -i rustls` shows the real
edges.

What the sources actually say: cratestack-sqlx selects sqlx-core's
_tls-rustls-ring-webpki, and cratestack-client-rust selects reqwest's
rustls-tls, which in reqwest 0.12 expands to __rustls-ring. Both
hard-select ring. The aws-lc-rs edge is reqwest 0.13's default features
via authkestra-engine — precisely what marcjazz/authkestra#179 made
opt-out-able in 0.3.3.

Confirmed by experiment, not argument: setting default-features = false
plus rustls-no-provider on the four authkestra pins makes
`cargo tree -i aws-lc-rs` report "did not match any packages". So a
static musl/scratch build or a cargo-deny policy banning aws-lc-rs is
reachable today with no upstream blocker. Deliberately not done in this
commit — rustls-no-provider panics at reqwest::Client::new() unless the
application installs a CryptoProvider first, and that runtime path is
unverified. It deserves a live TLS test, not a drive-by.

Also refreshed a stale line: M1 is done (#23, #24, #25 all merged,
closing #18), not still open.

Verified: cargo build --workspace, fmt --check, clippy -D warnings (0),
cargo test --workspace (198 passed), and the full live sweep against a
real Postgres 16 — 62 passed, 1 failed. That failure is #114's kill-9
gate and is not caused by this bump: it reproduces on main at 0.6.3,
passes in isolation, and its binary holds exactly one test, so it cannot
be #102's within-binary cause. Filed as #116.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@changeset-bot

changeset-bot Bot commented Aug 3, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 859d712

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@stephane-segning
stephane-segning merged commit 3a7ee7e into main Aug 3, 2026
4 of 5 checks passed
@stephane-segning
stephane-segning deleted the claude/cratestack-067 branch August 3, 2026 14:02
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.

1 participant