Skip to content

arch audit safe cleanup - #110

Merged
isdaniel merged 1 commit into
mainfrom
refactor/arch-audit-safe-cleanup
Jul 27, 2026
Merged

arch audit safe cleanup#110
isdaniel merged 1 commit into
mainfrom
refactor/arch-audit-safe-cleanup

Conversation

@isdaniel

@isdaniel isdaniel commented Jul 27, 2026

Copy link
Copy Markdown
Owner
  • fix: postgres_timestamp_to_chrono no longer panics on a corrupt/adversarial
    timestamp on the live BEGIN/COMMIT parse path (saturating + euclidean + clamp).
  • Converge replication-slot SQL onto the prepare_* wrappers (add prepare_base_backup).
  • De-duplicate the standby-status-update frame and the feedback cap logic across backends.
  • Hoist shared wire-length constants; drop the syn full feature; misc doc fixes.

Breaking — public API

  • Removed: ReplicationError::{Generic, generic(), replication_connection()}
    (use connection()); impl Clone for SharedLsnFeedback (share via Arc, not a
    detached copy); ~18 unused BufferReader/BufferWriter methods
    (from_vec/read_i16/read_string/skip, most writer variants, Default/AsRef).
  • Narrowed visibility: CachePadded, PG_EPOCH_OFFSET_SECS (also dropped from the
    crate root re-export), build_sql_optionspub(crate).
  • Deprecated (still works): ChangeEvent::encode/decode — a bespoke binary codec
    redundant with the derived serde impls; use serde + bincode/postcard. It is NOT the
    pgoutput wire format (that lives in protocol / encode_message, untouched). Removal
    planned for a future major.

@codspeed-hq

codspeed-hq Bot commented Jul 27, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 50 untouched benchmarks


Comparing refactor/arch-audit-safe-cleanup (dfcc0c8) with main (99274d5)

Open in CodSpeed

@codecov

codecov Bot commented Jul 27, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 93.40659% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 94.96%. Comparing base (99274d5) to head (dfcc0c8).

Files with missing lines Patch % Lines
src/connection/native/connection.rs 14.28% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #110      +/-   ##
==========================================
- Coverage   94.98%   94.96%   -0.02%     
==========================================
  Files          27       27              
  Lines       20805    20708      -97     
==========================================
- Hits        19762    19666      -96     
+ Misses       1043     1042       -1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@isdaniel

Copy link
Copy Markdown
Owner Author

@copilot review

Copilot AI commented Jul 27, 2026

Copy link
Copy Markdown

@copilot review

Review found one high-severity issue: the PR removes multiple public APIs while Cargo.toml remains at 0.8.1. Existing 0.8.x consumers will fail to compile (BufferReader/BufferWriter methods, ReplicationError::Generic and constructors, SharedLsnFeedback: Clone, PG_EPOCH_OFFSET_SECS, and build_sql_options). Per the repository’s API policy, either restore/deprecate these APIs for 0.8.x or bump to 0.9.0 and add a README “Upgrading” note. The latest CI, fuzz, quality, and benchmark workflows are otherwise green.

@isdaniel

Copy link
Copy Markdown
Owner Author

@claude[agent] review

@Claude

Claude AI commented Jul 27, 2026

Copy link
Copy Markdown

@claude[agent] review

Reviewed. The only valid finding was the missing version bump for the removed public APIs. Bumped the workspace version 0.8.1 → 0.9.0 (including the pinned pg-walstream-macros dep and README install snippets) and added a README "Upgrading — 0.8.x → 0.9.0" section listing the removals, visibility narrowings, and the ChangeEvent::encode/decode deprecation. cargo build and cargo test --lib (1215 passed) are green. Commit f24f78f.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • 192.0.2.1
    • Triggering command: /home/REDACTED/work/pg-walstream/pg-walstream/target/debug/deps/pg_walstream-317aff38a59ebb45 /home/REDACTED/work/pg-walstream/pg-walstream/target/debug/deps/pg_walstream-317aff38a59ebb45 /home/REDACTED/work/pg-walstream/pg-walstream/target/debug/build/aws-lc-sys-5b1ef8/home/REDACTED/work/pg-walstream/pg-walstream/target/debug/build/aws-lc-sys-5b1ef8d3f2478a78/out/57454e98e6b3bf86-sha3_keccak4_f1600_alt.o /home/REDACTED/work/pg-walstream/pg-walstream/target/debug/build/aws-lc-sys-5b1ef8/home/REDACTED/work/pg-walstream/pg-walstream/target/debug/build/aws-lc-sys-5b1ef8d3f2478a78/out/57454e98e6b3bf86-sha3_keccak_f1600.o /home/REDACTED/work/pg-walstream/pg-walstream/target/debug/build/aws-lc-sys-5b1ef8/home/REDACTED/work/pg-walstream/pg-walstream/target/debug/build/aws-lc-sys-5b1ef8d3f2478a78/out/2d40dbbd793ef942-jitterentropy-base.o /home/REDACTED/work/pg-walstream/pg-walstream/target/debug/build/aws-lc-sys-5b1ef8/home/REDACTED/work/pg-walstream/pg-walstream/target/debug/build/aws-lc-sys-5b1ef8d3f2478a78/out/2d40dbbd793ef942-jitterentropy-gcd.o d3f2478a78/out/libaws_lc_0_43_0_crypto.a d3f2478a78/out/e616dc00b7af72b9-ntt.o d3f2478a78/out/e616dc00b7af72b9-nttfrombytes.o d3f2478a78/out/e616dc00b7af72b9-ntttobytes.o d3f2478a78/out/e616dc00b7af72b9-nttunpack.o d3f2478a78/out/e616dc00b7af72b9-polyvec_basemul_acc_montgomery_cached_asm_k2.o d3f2478a78/out/e616dc00b7af72b9-polyvec_basemul_acc_montgomery_cached_asm_k3.o d3f2478a78/out/e616dc00b7af72b9-polyvec_basemul_acc_montgomery_cached_asm_k4.o d3f2478a78/out/e616dc00b7af72b9-poly_compress_d10.o d3f2478a78/out/e616dc00b7af72b9-poly_compress_d11.o d3f2478a78/out/e616dc00b7af72b9-poly_compress_d4.o d3f2478a78/out/e616dc00b7af72b9-poly_compress_d5.o d3f2478a78/out/e616dc00b7af72b9-poly_decompress_d10.o d3f2478a78/out/e616dc00b7af72b9-poly_decompress_d11.o d3f2478a78/out/e616dc00b7af72b9-poly_decompress_d4.o (packet block)
  • invalid_host_that_does_not_exist
    • Triggering command: /home/REDACTED/work/pg-walstream/pg-walstream/target/debug/deps/pg_walstream-317aff38a59ebb45 /home/REDACTED/work/pg-walstream/pg-walstream/target/debug/deps/pg_walstream-317aff38a59ebb45 /home/REDACTED/work/pg-walstream/pg-walstream/target/debug/build/aws-lc-sys-5b1ef8/home/REDACTED/work/pg-walstream/pg-walstream/target/debug/build/aws-lc-sys-5b1ef8d3f2478a78/out/57454e98e6b3bf86-sha3_keccak4_f1600_alt.o /home/REDACTED/work/pg-walstream/pg-walstream/target/debug/build/aws-lc-sys-5b1ef8/home/REDACTED/work/pg-walstream/pg-walstream/target/debug/build/aws-lc-sys-5b1ef8d3f2478a78/out/57454e98e6b3bf86-sha3_keccak_f1600.o /home/REDACTED/work/pg-walstream/pg-walstream/target/debug/build/aws-lc-sys-5b1ef8/home/REDACTED/work/pg-walstream/pg-walstream/target/debug/build/aws-lc-sys-5b1ef8d3f2478a78/out/2d40dbbd793ef942-jitterentropy-base.o /home/REDACTED/work/pg-walstream/pg-walstream/target/debug/build/aws-lc-sys-5b1ef8/home/REDACTED/work/pg-walstream/pg-walstream/target/debug/build/aws-lc-sys-5b1ef8d3f2478a78/out/2d40dbbd793ef942-jitterentropy-gcd.o d3f2478a78/out/libaws_lc_0_43_0_crypto.a d3f2478a78/out/e616dc00b7af72b9-ntt.o d3f2478a78/out/e616dc00b7af72b9-nttfrombytes.o d3f2478a78/out/e616dc00b7af72b9-ntttobytes.o d3f2478a78/out/e616dc00b7af72b9-nttunpack.o d3f2478a78/out/e616dc00b7af72b9-polyvec_basemul_acc_montgomery_cached_asm_k2.o d3f2478a78/out/e616dc00b7af72b9-polyvec_basemul_acc_montgomery_cached_asm_k3.o d3f2478a78/out/e616dc00b7af72b9-polyvec_basemul_acc_montgomery_cached_asm_k4.o d3f2478a78/out/e616dc00b7af72b9-poly_compress_d10.o d3f2478a78/out/e616dc00b7af72b9-poly_compress_d11.o d3f2478a78/out/e616dc00b7af72b9-poly_compress_d4.o d3f2478a78/out/e616dc00b7af72b9-poly_compress_d5.o d3f2478a78/out/e616dc00b7af72b9-poly_decompress_d10.o d3f2478a78/out/e616dc00b7af72b9-poly_decompress_d11.o d3f2478a78/out/e616dc00b7af72b9-poly_decompress_d4.o (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

@isdaniel
isdaniel force-pushed the refactor/arch-audit-safe-cleanup branch 3 times, most recently from 233635f to 76efde0 Compare July 27, 2026 06:00
… functions

refactor: remove unused methods and streamline BufferReader and BufferWriter implementations
refactor(error): eliminate generic error type and related methods for clarity
refactor(lib): adjust visibility of PG_EPOCH_OFFSET_SECS constant
refactor(lsn): simplify SharedLsnFeedback by removing Clone implementation and related tests
refactor(sql_builder): change build_sql_options to crate visibility
fix(stream): update error handling to use protocol-specific error type
refactor(types): update CachePadded and PG_EPOCH_OFFSET_SECS to crate visibility
@isdaniel
isdaniel force-pushed the refactor/arch-audit-safe-cleanup branch from 76efde0 to dfcc0c8 Compare July 27, 2026 06:27
@isdaniel
isdaniel merged commit 80a3720 into main Jul 27, 2026
25 checks passed
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.

3 participants