feat(recovery): observe paused WAL replay progress - #293
Draft
seonghobae wants to merge 10 commits into
Draft
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
seonghobae
changed the base branch from
main
to
fix/recovery-evidence-weakref-coverage-b84f0c9
August 21, 2026 00:21
This was referenced Aug 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bounded PostgreSQL recovery replay observation — Draft
Refs #204. Explicit child of #233.
Protected
mainis freshly verified at exactb84f0c94154043a3473939c01bb6471de5a129ae. Branchfeat/postgres-recovery-replay-observation-b84f0c9remains the sole targeted replay-observation lane. Its exact current head is16a03699d069ae424b9bacf16ddd9ba0db5b1c9f, based on dependency root#233@5951b7a4d779903b8924abaef2a387cae50b7f54. Relative changes remain limited to:pg_llm_batch/postgres_recovery_replay_observation.pytests/test_postgres_recovery_replay_observation.pytests/test_postgres_recovery_replay_serialization_snapshot.pyNo source or documentation was written directly to protected main. #233 remains independently blocked by its live review/control-plane state and must integrate first.
RED → narrow GREEN lineage
Test-first
fb04977925743f0130baf7f991cae2642e237537defined the initial missing replay-observation acceptance contract. Productione16ddb11e51573ff794b937c491d7c62088194b8added the caller-owned read-only observation seam. Regression/fixb2b8bce912a7d4d2614cec97a3d4388cd507f368→eac027f738970614b500313f22d8c52064a38764bound evidence to the exact live object plus observed field snapshot so public construction, copying, or prior mutation cannot fabricate package-observed provenance.LSN-width RED
00c876773161009922beeb56b4c47d3ead021825then exposed that ordinary PostgreSQL hexadecimal segment widths such as0/16B1970were rejected before database I/O. GREEN897515a023c2fd5499ff3ad7aea965f157c471b5narrowly accepts one through eight uppercase hexadecimal digits per LSN component while retaining the high-component leading-zero rule, nonzero requirement, fixed catalog-qualified query, bounded diagnostics, and provenance checks.A serialization review then found a TOCTOU boundary:
as_dict()successfully validated exact-object provenance and then re-read caller-visible frozen-dataclass fields.frozen=Trueis not an authority boundary againstobject.__setattr__(). RED559b7d600f0fbd34ecc435bc35bbae109f3defb8made that deterministic and GREEN80742ec0265e2cd0d708ca1dcb52d3d7ac95c4b2bound serialization to the immutable registry snapshot.Exact-head CI
32478052170on80742ec...then exposed a genuine owned-coverage defect: all Python 3.10/3.12/3.14 unit jobs and the container/PostgreSQL smoke passed, Ruff passed, public-docstring coverage was 100%, but exact production coverage was 99.96%. The sole uncovered path waspostgres_recovery_replay_observation.py:105, the fail-closed guard for provenance-registry disappearance between the predicate read and immutable-snapshot read.Current test-only
16a03699d069ae424b9bacf16ddd9ba0db5b1c9fadds deterministic concurrent-eviction modeling for that exact guard. It requires fail-closed provenance rejection if registry authority disappears between those two guarded reads. Production source is unchanged by this coverage repair.Claim boundary
The package executes one fixed
pg_catalog-qualified read-only query on a caller-owned already-connected isolated recovery target and accepts bounded evidence only when the same returned row shows recovery still active,pg_get_wal_replay_pause_state()exactlypaused, andpg_last_wal_replay_lsn()at or beyond the requested target.It does not start/configure PostgreSQL, create
recovery.signal, installrestore_command, validate WAL bytes or timeline ancestry, prove exact stop-target semantics, resume/promote recovery, prove application readiness, recover external secrets/configuration, or establish deployment RPO/RTO, HA/DR, CSAP, SOC 2, or certification claims. Existing recovery execution/configuration/evidence Drafts remain separate authority and are not protected-main truth.Exact-head validation / governance — refreshed after hosted completion
Fresh commit-scoped workflow inventory for exact unchanged current head
16a03699d069ae424b9bacf16ddd9ba0db5b1c9fnow shows:32488881547: completed / success;32488881637: completed / success;The CI/Release successes prove only their own exact checkout. Absent Security/SAST evidence and absent formal review remain non-passing. The failed
80742ec...coverage run is predecessor RED evidence and does not transfer. Keep this Draft stable; do not manufacture source churn merely to create workflow or review events.This PR remains Draft because #233 is not integrated, the current exact head lacks a complete terminal-success gate set, and qualifying final review/current-base governance is absent. After #233 reaches protected main, reconcile/retarget this Draft against then-current protected main and reacquire every exact-final-head/current-base quality gate, including supported Python through 3.14, exact 100% owned production statement/branch coverage, public-docstring coverage, security/SAST, package/SBOM/provenance/release acceptance, zero valid unresolved findings, and any formal independent approval actually required by live governance.
Queued, pending, cancelled, skipped-required, absent, neutral, stale, predecessor, status-only, synthetic, author-only, rate-limited, infrastructure-failed, dismissed, or conclusion-null evidence is non-passing.