feat(recovery): bind deterministic PITR stop targets - #238
Draft
seonghobae wants to merge 9 commits into
Draft
Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks 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 |
This was referenced Aug 17, 2026
seonghobae
changed the base branch from
main
to
fix/recovery-evidence-weakref-coverage-b84f0c9
August 19, 2026 02:32
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.
Summary
Add a bounded, deterministic PostgreSQL PITR recovery-target binding seam without configuring a cluster, creating
recovery.signal, supplyingrestore_command, replaying WAL, promoting a target, or claiming RPO/RTO.Exact stack boundary
main:b84f0c94154043a3473939c01bb6471de5a129aefix/recovery-evidence-weakref-coverage-b84f0c95951b7a4d779903b8924abaef2a387cae50b7f54feat/postgres-pitr-target-b84f0c909430638a20c66e1f9d7e76da808df8f1f2e3a01pg_llm_batch/postgres_pitr_target.pytests/test_postgres_pitr_target.pytests/test_postgres_pitr_target_hardening.py0943063...is a non-destructive merge commit retaining the original PITR-target history and exact #233 head5951b7a...as parents. It includes #233's focused weak-reference coverage regression only as predecessor history; that test is not part of this PR's relative diff. No source or documentation was written directly to protected main.Fresh targeted writer inventory finds only
feat/postgres-pitr-target-b84f0c9on this exact source surface. Fresh formal-review inventory remains empty; absence of review is not approval.RED → GREEN lineage
c550f0d7cc75d6de5ae8d6e98f06afcc05d5f26c— initial failing contract; the production module did not yet exist.5e34dfc4613969aec94523f5269699f86bfdf89a— initial bounded implementation.dc7e3e3640d360a243184878199250db34418fdb— focused hardening coverage for non-string time-target rejection.Exact validation state
Pre-stack exact head
dc7e3e3...produced terminal-success Security Scan32045584627, SAST Semgrep32045584633, Release Acceptance32045584686, Python 3.10/3.12/3.14 unit lanes, PostgreSQL/container smokes, compile, Ruff, and 100% public-docstring coverage. CI32045584656failed only at repository aggregate coverage: the PITR-target module was exact 100%, 1379 tests passed, and the only uncovered branches were protected-mainpostgres_backup_evidence.py:65->exitandpostgres_schema_evidence.py:49->exit, owned by dependency-root #233. That predecessor evidence is RCA context only and does not transfer.For unchanged exact stacked head
09430638a20c66e1f9d7e76da808df8f1f2e3a01, repository-local workflows concluded terminal-success:32208888484: success;32208888474: success;32208888490: success; and32208888488: success.Those historical conclusions remain branch evidence only. Final integration still requires fresh proof that every then-required scanner actually analyzed the final contributor head under then-protected central semantics. No predecessor, synthetic, or stale evidence transfers.
Bounded contract
bind_postgres_pitr_recovery_target(...)consumes the exact protectedPostgresPhysicalRecoveryProfiletype and requiresbackup_method="pitr"with a WAL archive. The profile's reviewedrecovery_target_kindremains authoritative.The binder normalizes timezone-explicit time targets to UTC; bounds and canonicalizes normal 32-bit transaction IDs; canonicalizes non-zero LSN targets; bounds restore-point names and rejects control characters; requires an exact-boolean inclusive edge for time/XID/LSN and forbids it for name/immediate; permits only
latest,current, or an exact positive uint32 timeline; and emitsrecovery_target_action=pauseso isolated acceptance precedes any separate promotion decision.The result is structured server-setting authority only. It contains no shell command, filesystem path, credential, target-promotion authority, or deployment capability claim.
Explicit non-guarantees
This branch does not provide
restore_command, create or mutate PostgreSQL configuration, createrecovery.signal, verify WAL continuity, copy a base backup, start PostgreSQL, execute WAL replay, prove that a requested target is present in the archive, promote a cluster, prove catalog/RLS/application readiness, recover external Fernet/TLS/provider/host configuration, or establish RPO/RTO/HA/DR.Dependency and governance boundary — refreshed 2026-08-30
#233 is the exact predecessor and must integrate first. The former read-only central coverage/review failure is historical RCA, not the current capability boundary. Unchanged #233 now has fresh exact-contributor-head CI, Release Acceptance, Trivy Security Scan, Semgrep SAST and bounded Strix evidence under protected central semantics. None of that evidence transfers to this child.
#233 remains non-passing because its active same-head OpenCode formal state is still
CHANGES_REQUESTED, that disposition has not been superseded by a fresh qualifying semantic review, and no qualifying approval exists under live governance. Central.githubremains read-only; mutable control-plane/reviewer/provider truth is centralized in #244. Do not mutate central, copy its workaround, churn pg heads merely to manufacture events, or transfer predecessor evidence.This branch owns only the three PITR-target files above and does not mutate adjacent WAL receive, WAL filename-continuity, WAL-byte binding, timeline-history, canonical-documentation writer #229, or read-only central dependencies.
After #233 integrates, retarget/reconcile this PR non-destructively to then-current protected main, prove the relative diff remains exactly the three PITR-target files, and reacquire every exact-final-head/current-base CI, security, coverage, package, SBOM, provenance, release, review, and thread-resolution gate. Merge only with the qualifying independent non-author approval required by then-live policy.
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.
Refs #204, #233, #244.