HydraCache 0.38.0
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, andhydracache-dbruntime metadata that does
not pullsqlparserinto 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 bansin CI, and named schema/frame compatibility
tests.
Changes
- Add
crates/hydracache-sql-lintwith relation extraction, lint modes,
baseline diffs, suppressions, parser/property tests, and a CLI baseline path. - Extend
QueryCachePolicyandquery_cache_policy!with SQL dependency-lint
metadata:sql,depends_on,dependency_lint, andlint_allow. - Add
HookPlan,HookSchemaVersion, deterministic SQL renderers, SQLite
runtime installation, and hook SQL/runtime tests. - Add
hydracache-cdc-postgresas a deferred logical-replication connector
scaffold with synthetic event tests. - Add
ConsistencyMode,ConsistencyToken,ConsistencyOutcome, and
HydraCache::get_with_consistency. - Add built-in
DimensionProfiles andCustomProfile, plus key/tag link
validation anddimension_validation = warn|deny. - Add
InvalidationCollectorandSqlxTransactionCompanionfor 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/correctnessand/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.jsonand makehydracache-sql-lint --check-baseline
fail on new or stale baseline entries. - Add explicit
outbox_schema_migration.rsandframe_version_compat.rstests
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 -- --checkcargo check --workspace --all-targets --lockedcargo test --workspace --all-targets --lockedcargo clippy --workspace --all-targets --all-features --locked -- -D warningscargo test --doc --workspace --lockedRUSTDOCFLAGS="-D warnings" cargo doc --workspace --no-deps --lockedcargo deny check banscargo check -p hydracache --benches --lockedcargo check -p hydracache-db --benches --lockedcargo test -p xtask --test bench_budget --lockedcargo run -p xtask --locked -- bench-budget --current benches/baseline/0_37.jsoncargo test -p hydracache-sql-lint --test lint_cli --lockedcargo run -p hydracache-sql-lint --bin lint --locked -- --check-baseline --baseline lint-baseline.jsoncargo test -p hydracache-sql-lint --lockedcargo test -p hydracache-db --test dependency --lockedcargo test -p hydracache-db --test runtime_dep_isolation --lockedcargo test -p hydracache-db --features sqlx-outbox --test outbox_schema_migration --lockedcargo test -p hydracache-db --test profiles --lockedcargo test -p hydracache-db --test profile_runtime --lockedcargo test -p hydracache-db --test hook_sql_snapshot --lockedcargo test -p hydracache-db --features sqlx-outbox --test sqlite_hooks --lockedcargo test -p hydracache-db --lib reconcile --lockedcargo test -p hydracache-db --test reconcile --lockedcargo test -p hydracache-db --features sqlx-outbox --test reconcile_sqlite --lockedcargo test -p hydracache-sqlx --locked transactioncargo test -p hydracache --locked consistencycargo test -p hydracache --locked frame_version_compatcargo test -p hydracache-actuator-axum --locked correctnesscargo 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.