feat(recovery): inspect isolated restore application readiness - #296
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 |
|
Fresh hardening delta for exact head A current-branch review found a data-integrity gap in the candidate evidence boundary: the prior public The relative surface is still only the same three recovery-specific source/test files; fresh targeted branch inventory still finds no competing Exact-head hosted evidence is still non-passing as a complete set: CI |
Buyer-visible recovery acceptance slice
Protected
main@b84f0c94154043a3473939c01bb6471de5a129aeauthenticates bounded restore catalog/RLS shape but does not prove that an already-connected isolated restore target satisfies the minimum database-side prerequisites needed by this package. This Draft adds a separate observation-only seam for that bounded gap without promoting it into end-to-end application or DR readiness.Exact stack / writer boundary — refreshed from live refs
b84f0c94154043a3473939c01bb6471de5a129ae;#233@5951b7a4d779903b8924abaef2a387cae50b7f54;feat/postgres-restore-application-readiness-b84f0c9;754459739c98dcc3fb418338eed4bbcfd8b13c06;application-readinessbranch.Fresh formal-review and inline-thread inventories are empty. Targeted no-PR writer probes performed before the current source/test sequence found the separate health/CLI, checkpoint, JSONL and orchestrator-lifecycle branches do not contain this new restore-readiness production path. Canonical documentation remains separately occupied and is not changed here.
RED -> narrow GREEN -> live negative acceptance lineage
066b2af8dcbe8a1ca90f5fdf9cb0c4ded22b64a2: fixed content-free readiness contract imported the intentionally absent production module.8bbb65154f451fc426ac3fc962b026a00081269d: initial catalog-only implementation.6648b32dae64684576dc6a870284d520a420786cexposed that same-name/current-schema/zero-arg/callable health-function checks could accept a callable impostor with a different packaged result contract. Exact CI32476667314failed that intended contract on Python 3.10/3.12/3.14.ed664f803f7ba0f9a4c1816fa8b121deb6eaa23eauthenticates the packaged health catalog identity without invoking it: set-returningrecord, exactTABLE(component TEXT, is_ready BOOLEAN, detail TEXT)output types/modes/names, and non-security-definer identity, in addition to the existing current-schema/zero-input/function-kind/count/callability predicates.754459739c98dcc3fb418338eed4bbcfd8b13c06adds live PostgreSQL negative acceptance for both a callable same-name wrong-result-contract function and an exact-result-shapeSECURITY DEFINERimpostor. Each replacement exists only inside the test transaction and is rolled back; production source is unchanged by this final commit.Protected
pg_llm_batch/schema.sqlremains the source authority forpg_llm_batch_health_check() RETURNS TABLE(component TEXT, is_ready BOOLEAN, detail TEXT)with ordinary non-security-definer behavior.Bounded product / security contract
The candidate performs one fixed catalog-qualified read-only query on a caller-owned already-connected isolated target and accepts only exact primitive evidence for:
pg_tiktokenextension;tiktoken_count(text,text);tiktoken_encode(text,text);com_configtable reachable via schemaUSAGEand tableSELECT; andpg_llm_batch_health_checkfunction callable via schemaUSAGEplus functionEXECUTE, with the exact packaged result/catalog identity above.It does not invoke the health function, open another connection, inspect/accept a DSN, install extensions, grant privileges, alter search paths, mutate the target outside test-owned rollback transactions, start/resume/promote recovery, or reflect database diagnostics/schema names/relation contents/provider content/credentials in public evidence or errors.
This slice does not prove endpoint/provider credentials or connectivity, Fernet/TLS/key custody, exact PITR stop semantics, target promotion, end-user traffic readiness, achieved RPO/RTO, HA/DR, CSAP, SOC 2, or certification.
Exact-head hosted validation — current head remains non-passing as a complete gate set
Fresh commit-scoped workflow inventory for exact unchanged head
754459739c98dcc3fb418338eed4bbcfd8b13c06now shows:32499001130: completed / success;32499000978: completed / success;The two exact-head successes prove only their own checkout. Absent Security/SAST and absent formal review remain non-passing, and prior RED or predecessor-green evidence does not transfer. Keep the head stable unless a new exact current defect is proven.
Dependency / governance boundary
Keep this PR Draft. #233 must integrate first through live governance, and #233 itself remains blocked by its current independent-review/control-plane prerequisite tracked in #244. Focused defect/RCA truth for this lane is tracked in #295.
After #233 reaches protected main, reconcile/retarget this candidate against then-current protected main and reacquire every exact-final-head/current-base quality, supported-Python including 3.14, exact 100% owned production statement/branch coverage, public-docstring, security/SAST, package/SBOM/provenance/release, formal-review, thread-resolution and then-live governance gate.
Merge only an unchanged final head with zero valid findings and any qualifying non-author current-last-push approval required by live policy. No queued, pending, cancelled, skipped-required, absent, neutral, stale, predecessor, status-only, synthetic, author-only, rate-limited, infrastructure-failed, dismissed, or conclusion-null evidence transfers.
Refs #295, #204, #223, #233, #244.