Skip to content

feat: Add dba wal diagnostic command, release v0.6.0#13

Merged
jackschultz merged 2 commits into
mainfrom
land-wal-0.6.0
Jun 10, 2026
Merged

feat: Add dba wal diagnostic command, release v0.6.0#13
jackschultz merged 2 commits into
mainfrom
land-wal-0.6.0

Conversation

@jackschultz

Copy link
Copy Markdown
Owner

Lands the WAL diagnostic work that sat uncommitted since January, prepping the v0.6.0 release.

What's in here

  • pgcrate dba wal — WAL health monitoring: config, directory size/segment count (pg_ls_waldir), archiving status, generation rate (pg_stat_wal, PG14+ with graceful fallback), issue detection with severity. JSON envelope pgcrate.diagnostics.wal + schema file.
  • Capabilities wiringdiagnostics.wal capability with function-access probe (correct zero-row query() usage).
  • Version 0.6.0 + CHANGELOG section (v0.5.0 features were committed in January but never published; both ship in this release).

Validation

  • fmt/clippy clean; 453 unit + 155 integration tests green against live PostgreSQL 18.4
  • Emitted JSON schema-validated; exit-code semantics verified (warning → 1 human / 0 json, matching siblings)
  • Independently reviewed (approved-with-fixes — one changelog correction)

- Built: dba wal diagnostic (src/commands/wal.rs) — WAL config, directory
  size, archiving status, generation rate, issue detection; JSON envelope
  with pgcrate.diagnostics.wal schema; capabilities wiring; integration tests
- Fixed: check_function_access used query_one with LIMIT 0 (always 0 rows ->
  always errored -> diagnostics.wal capability always reported degraded);
  switched to query() so access detection is correct
- Version 0.6.0 in Cargo.toml/Cargo.lock; added v0.6.0 CHANGELOG section
- Validation: cargo fmt --check (pass), cargo clippy --all-targets (exit 0,
  no findings on touched files), cargo test --test integration (155 pass),
  wal+capabilities unit tests pass, dba wal/--json verified against live PG18
- Notes: plan's gotcha about an unused import in tests/diagnostics/wal.rs was
  stale (no such warning); pre-existing failures in doctor/role/extension/
  timeout integration tests reproduce on clean main and are out of scope
- Fixed: CHANGELOG v0.6.0 referenced nonexistent 'pgcrate inspect capabilities'; corrected to 'pgcrate capabilities'
- Noted: check_function_access is net-new code in this commit (not a repair of pre-existing code as the task framing implied); it correctly uses query() not query_one() — no LIMIT 0 trap remains in capabilities.rs
- Noted: 18 pre-existing integration failures (doctor/extension/role/timeout) confirmed identical on main — environmental drift, out of scope
@jackschultz jackschultz merged commit 1b89257 into main Jun 10, 2026
0 of 2 checks passed
@jackschultz jackschultz deleted the land-wal-0.6.0 branch June 10, 2026 13:56
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