Skip to content

HydraCache 0.38.0

Choose a tag to compare

@github-actions github-actions released this 13 Jul 15:59
· 1327 commits to main since this release

HydraCache 0.38.0

0.38.0 is a database correctness-automation release. It does not try to make
HydraCache a transparent DB proxy. Instead, it adds assisted production
guardrails: dependency evidence, generated hook plans, named consistency modes,
dimension profiles, an explicit SQLx transaction companion, reconciliation
reports, and correctness snapshots for staging gates.

Highlights

  • SQL dependency lint assistant in hydracache-sql-lint, with parser tests,
    baseline/suppression support, and hydracache-db runtime metadata that does
    not pull sqlparser into the production graph.
  • Generated DB hook plans for SQLite/Postgres/MySQL, SQLite runtime install, and
    Postgres CDC/notify scaffolding for durable invalidation intent.
  • Named consistency modes and read-your-writes tokens in hydracache, with
    explicit degraded/fail-closed outcomes for unsupported stronger modes.
  • Required dimension profiles for query keys/tags, including warn/deny modes and
    reasoned allowlists.
  • SQLx transaction companion that keeps the transaction boundary explicit while
    enqueueing durable outbox rows before commit; Diesel/SeaORM ship explicit
    deferred stubs.
  • Reconciliation reports for the two mandatory drift signals: outbox lag and
    hook/schema drift.
  • Actuator and sandbox correctness snapshots for staging/release checks.
  • Release-gate enforcement for the 0.37/0.38 follow-up items: checked-in
    performance budget baseline, xtask bench-budget, explicit SQL lint baseline
    drift checks, cargo deny check bans in CI, and named schema/frame compatibility
    tests.

Changes

  • Add crates/hydracache-sql-lint with relation extraction, lint modes,
    baseline diffs, suppressions, parser/property tests, and a CLI baseline path.
  • Extend QueryCachePolicy and query_cache_policy! with SQL dependency-lint
    metadata: sql, depends_on, dependency_lint, and lint_allow.
  • Add HookPlan, HookSchemaVersion, deterministic SQL renderers, SQLite
    runtime installation, and hook SQL/runtime tests.
  • Add hydracache-cdc-postgres as a deferred logical-replication connector
    scaffold with synthetic event tests.
  • Add ConsistencyMode, ConsistencyToken, ConsistencyOutcome, and
    HydraCache::get_with_consistency.
  • Add built-in DimensionProfiles and CustomProfile, plus key/tag link
    validation and dimension_validation = warn|deny.
  • Add InvalidationCollector and SqlxTransactionCompanion for durable and
    local-only SQLite transaction flows.
  • Add deferred Diesel/SeaORM transaction companion stubs and
    docs/adr/0015-transaction-companion-adapters.md.
  • Add ReconciliationReport, OutboxLag, HookDrift, and SQLite hook-schema
    reconciliation helpers.
  • Add /actuator/hydracache/correctness and /demo/correctness.
  • Add crates/xtask bench-budget, benches/baseline/0_37.json, CI benchmark
    compile checks, and a scheduled/manual performance-budget workflow.
  • Add root lint-baseline.json and make hydracache-sql-lint --check-baseline
    fail on new or stale baseline entries.
  • Add explicit outbox_schema_migration.rs and frame_version_compat.rs tests
    so release-gate names match the 0.37 hardening plan.
  • Bump the workspace crates to 0.38.0.

Verification

This release should pass:

  • cargo fmt --all -- --check
  • cargo check --workspace --all-targets --locked
  • cargo test --workspace --all-targets --locked
  • cargo clippy --workspace --all-targets --all-features --locked -- -D warnings
  • cargo test --doc --workspace --locked
  • RUSTDOCFLAGS="-D warnings" cargo doc --workspace --no-deps --locked
  • cargo deny check bans
  • cargo check -p hydracache --benches --locked
  • cargo check -p hydracache-db --benches --locked
  • cargo test -p xtask --test bench_budget --locked
  • cargo run -p xtask --locked -- bench-budget --current benches/baseline/0_37.json
  • cargo test -p hydracache-sql-lint --test lint_cli --locked
  • cargo run -p hydracache-sql-lint --bin lint --locked -- --check-baseline --baseline lint-baseline.json
  • cargo test -p hydracache-sql-lint --locked
  • cargo test -p hydracache-db --test dependency --locked
  • cargo test -p hydracache-db --test runtime_dep_isolation --locked
  • cargo test -p hydracache-db --features sqlx-outbox --test outbox_schema_migration --locked
  • cargo test -p hydracache-db --test profiles --locked
  • cargo test -p hydracache-db --test profile_runtime --locked
  • cargo test -p hydracache-db --test hook_sql_snapshot --locked
  • cargo test -p hydracache-db --features sqlx-outbox --test sqlite_hooks --locked
  • cargo test -p hydracache-db --lib reconcile --locked
  • cargo test -p hydracache-db --test reconcile --locked
  • cargo test -p hydracache-db --features sqlx-outbox --test reconcile_sqlite --locked
  • cargo test -p hydracache-sqlx --locked transaction
  • cargo test -p hydracache --locked consistency
  • cargo test -p hydracache --locked frame_version_compat
  • cargo test -p hydracache-actuator-axum --locked correctness
  • cargo test -p hydracache-sandbox --locked correctness

Optional Docker/runtime smoke tests remain opt-in and skip gracefully when their
database URLs or Docker environments are unavailable.