Skip to content

deps(rust): Rust 1.99 and current crates (sqlx 0.9 and five majors) - #139

Merged
TusanHomichi merged 2 commits into
mainfrom
claude/136-rust-latest
Oct 15, 2026
Merged

TusanHomichi merged 2 commits into
mainfrom
claude/136-rust-latest

Conversation

@TusanHomichi

Copy link
Copy Markdown
Member

Primary Issue

Closes #136

Problem And Outcome

The maintainer's policy (2026-10-15): "use latest versions of packages here where it makes sense in general". The Rust side was a toolchain behind (pinned 1.98; latest stable 1.99.1) and six crates behind a major version. After merge, the workspace builds on Rust 1.99 with every direct dependency at its latest release, and nothing is held back. Existing installations keep working byte for byte.

Changes

Item Old → new
Toolchain 1.98 → 1.99 (1.99.1)
sqlx 0.8.6 → 0.9.0 (bundled SQLite 3.46.0 → 3.51.3)
axum-extra 0.10.3 → 0.12.6
sha2 0.10.9 → 0.11.1
argon2 0.5.3 → 0.6.0
getrandom 0.3.4 → 0.4.3
zip 8.6.0 → 9.0.3
clap, jiff, rust-embed, serde_json, tokio, uuid semver-compatible latest
  • sqlx 0.9 SqlSafeStr:
    • static queries rebuilt with concat!; their SQL text is byte-identical to before, as the reviewer verified by expanding them;
    • the installation export's spec-built SQL uses AssertSqlSafe, and quoted() now refuses " and NUL;
    • the pre-migration backup builds its Migrator through with_migrations.
  • argon2 0.6: hash_password_with_salt with our own 16 random bytes.
  • sha2 0.11: canonical::to_hex.
  • zip 9: fallible entry names become a NotAnArchive finding, which fails closed and is currently unreachable.
  • Clippy 1.99: its new lints are fixed, not allowed.
  • CHANGELOG.md under Unreleased/Changed.

Scope

Verification

  • Candidate revision: b165802eed2ff31e808f41985fa8f36fd8db36ff (tree 1985502e).
  • Local full proof (verifier role): scripts/proof.py passed 7/7 gates in 482 s with rustc 1.99.1.
    • 292 Rust tests passed, 0 failed, 3 ignored.
    • Browser: 62 expected, 0 unexpected, 0 flaky, 0 skipped, on system Google Chrome 155.
    • Receipt sha256 be8f3cdb…, archived on the maintainer machine.
  • Compatibility, executed (implementer role; repeated in part by the reviewer):
    • Data directories initialized by main (48ccb8e) and by the v0.2.0 release start under the new build:
      • doctor reports ok;
      • the _sqlx_migrations rows are identical (16);
      • record manifests are identical, and every old and new export verifies;
      • the old binaries also restart on the directories the new build served.
    • A tampered checksum is refused.
    • All four export kinds are byte-identical to the old build at a fixed instant.
    • argon2 0.5 hashes verify under 0.6 and the reverse; with a fixed salt both produce identical PHC strings.
  • New committed guards:
    • tests/upgrade_compat.rs pins the released migration checksums (released prefix only), the argon2 parameters, and a v0.5 hash. Its negative controls fail as they should.
    • zip_container::writer_pin pins the container writer's SHA-256 and every entry's metadata. The digest is identical under the old build (zip 8.6), and controls for permissions and extra fields fail.
  • Listed the exact verification commands run below
  • Added or updated tests when behavior changed (compatibility pins)
  • Added or updated an ADR when a durable decision changed (none changed)
  • All fixtures and examples are invented; no real agency data
- scripts/check-guidance-names.sh
- web/: npm ci, npm run check, npm run build
- cargo fmt --check
- cargo clippy --workspace --all-targets -- -D warnings
- cargo test --workspace
- cargo build -p consolebook-server
- web/: npm run e2e (system Google Chrome 155)

Review And Merge Notes

  • Independent review (reviewer role, read-only, frozen worktree at 3282072): 0 blocking, 1 should-fix, 4 nits.
    • Should-fix: the "byte-identical exports" claim had only scratch evidence. It is now pinned (b165802).
    • Nits applied: an unreachable-branch comment, #[must_use] placement, and the quoted() guard.
    • Nit declined: crypto-common 0.1.7. No stable lock exists with it, so Cargo's resolution of 0.1.6 stays.
    • The review independently confirmed: SQL text byte-identical, migrator semantics unchanged, connection defaults unchanged, argon2 output identical, archive verdicts unchanged, and no weakened tests.
  • Fix delta 3282072..b165802: self-reviewed by the integrator. Each fix carries its own negative control.
  • Known duplicates: sha2 0.10 and its digest crates remain inside sqlx-core 0.9.
  • Authority: the maintainer's dependency policy and standing PR permission (2026-10-15).
  • Operator impact: none at runtime beyond the patched libraries and SQLite 3.51.3. Building from source needs Rust 1.99.

🤖 Generated with Claude Code

TusanHomichi and others added 2 commits October 15, 2026 12:18
…ajors)

Toolchain 1.99; sqlx 0.9 (SqlSafeStr: static queries via concat!, the
spec-built installation export SQL audited with AssertSqlSafe; the pre-
migration backup builds its Migrator through with_migrations), argon2 0.6
(hash_password_with_salt from our own entropy), sha2 0.11, zip 9 (fallible
entry names become NotAnArchive findings), getrandom 0.4, axum-extra 0.12,
and the semver-compatible updates. Bundled SQLite moves 3.46.0 -> 3.51.3 with
sqlx. Clippy 1.99's assert_is_empty findings are fixed, not allowed.

Existing installations keep working byte for byte: databases initialized by
main and by the v0.2.0 release start, keep identical _sqlx_migrations rows
and record manifests, and verify; all four export kinds are byte-identical
to the old build at a fixed instant; old argon2 hashes verify. A new
upgrade_compat test pins the released migration checksums, the argon2
parameters, and a v0.5 hash, with negative controls.

Refs #136

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…uoting

A test writes a fixed archive through ArchiveWriter at a fixed instant and
pins its SHA-256 and every central-directory entry's metadata (stored, flags
0, mode 0644, DOS time, no extra fields); the same digest holds under the
pre-upgrade build (zip 8.6.0), so a future zip change that alters container
bytes fails instead of silently breaking cross-build determinism.
quoted() refuses an identifier containing a quote or NUL, so the installation
export's AssertSqlSafe rests on code, not a comment. The changelog records
the Rust 1.99 build requirement and bundled SQLite 3.51.3.

Refs #136

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-15T20:08:02.457968Z b165802 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@TusanHomichi
TusanHomichi merged commit 909bf92 into main Oct 15, 2026
9 checks passed
@TusanHomichi
TusanHomichi deleted the claude/136-rust-latest branch October 15, 2026 20:19
TusanHomichi added a commit that referenced this pull request Oct 15, 2026
…als (#145)

* test: one runtime test credential, and a guard against password literals

Integration tests no longer declare passwords: tests/support provides a
per-process password generated from OS randomness (plus wrong, fresh, and
too-short variants), the shared login and user helpers that 14 and 12 test
crates had each copied, and assertion messages that name no user. With no
literal there is nothing for CodeQL's hard-coded-credential and
cleartext-logging rules to flag in new test files (#126; recurred on #130
and #139).

tests/no_credential_literals.rs scans every test source and fails on a
password, passphrase, or secret literal in a binding, struct field, JSON key,
JSON-in-a-string, or a credential call, with its scan contract in the header,
an exact-path allowlist (upgrade_compat's argon2 0.5 fixture), and negative
controls for every shape it flags and every allowed shape it must not; against
the pre-change tests it reports 38 findings across 28 files.

Closes #126

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* test: close the credential guard's review gaps

Independent review found no blockers. Follow-ups: upgrade_compat again
checks a one-character near miss of the fixture password, built at run time
(a verifier that ignored the last byte passed the previous version); a
sensitive binding is flagged for any non-empty literal in its initializer
(arrays, vec!, Some, match/if arms, closures), a ("password", "literal")
pair and macro/turbofish credential calls are caught, and sign-in helpers
are matched by more names; empty literals are exempt, so absence and
empty-password tests read naturally; the header lists every remaining miss
with its reason. The controls move to a 149-case corpus checked against the
header in both directions, the walk skips symbolic links, and an unreadable
file is named. Against the pre-change tests: 38 findings in 26 files.

Refs #126

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
This was referenced Oct 15, 2026
TusanHomichi added a commit that referenced this pull request Oct 15, 2026
A minor release under ADR 0022: the complete installation export (#130), the
web stack on SvelteKit 3 and Vite 8 (#140) with the browser floor it brings
(Chrome/Edge 111, Firefox 114, Safari 16.4), Rust 1.99 and SQLite 3.51
(#139), and doctor's migration verdict matching serve (#144, ADR 0029).
Upgrading from 0.2.0 runs no migration. Versions agree across Cargo and web
(tests/release_version.rs); the changelog, README, roadmap, and install guide
name 0.3.0.

Refs #146

Co-authored-by: Claude Opus 5.5 <[email protected]>
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.

deps(rust): move to the latest stable toolchain and current crates (sqlx 0.9 and five other majors)

2 participants