security(state): reconverge publication roles after recovery - #217
Draft
seonghobae wants to merge 22 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 Sep 8, 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.
Refs #80 #192 #208 #209 #210 #216. Draft child of exact #216@
7c7b980b7a2f41e2a369a71bb32e945de7f30bfd.Causal RED lineage
3999f0583eddfe87bc07b7ef477998a66fefe246, hosted CI34259899229/ rust102174943790; checkout/toolchain/formatting passed, Test failed becausedeploy/postgresql/reputation_state_recovery.sqldid not exist.6a18312c9cc74d4b02daf54dc1033a4335a04a87, CI34263214416/ rust102186066201; real PostgreSQL 18.4 proved that after 0003 rollback/reapply, simply restoring runtime EXECUTE lets a later surviving generation publish withexpected_prior = NULLand become a new first head while prior publication evidence/head is missing.30bc7e77592b6b7cf4e861760aeea2af24f5fc50, CI34264941085/ rust102191822902; real PostgreSQL 18.4 failed from the complete 0002 predecessor because role convergence ran before migration 0003 existed (relation "public.reputation_source_publication" does not exist). Candidate09c6b896898f0a98e83d36d6ca0d87ff7e8ade3c, CI34265174608/ rust102192601576, then proved client-side\quit 3was not a reliable nonzero partial-shape refusal contract.Minimum causal repair
deploy/postgresql/reputation_state_recovery.sqlis a sequencer, not a second schema/role authority.\ir.ON_ERROR_STOP, returns nonzero, and remains untouched for diagnosis.reputation_state_roles.sql, invoked via relative\ir.(tenant_id, source_id)lacks an authoritative publication head, runtime outer-function EXECUTE is globally revoked. This prevents recovery from using the normalexpected_prior = NULLfirst-publication path to skip rollback-removed last-known-good evidence.Normal publication semantics remain unchanged.
StateAuthority::Postgresremains fail closed.Exact-current GREEN
Current exact head is
7a6cb5c55e7d440768792dfa3f750a1594ef3ebe. Fresh compare to exact #216 is ahead 22 / behind 0 with #216 as exact merge base. Parent-relative delta is exactly seven paths: recovery sequencer; three real PostgreSQL recovery regressions (owner, evidence-gap, supported-shape); Proposed recovery ADR; ADR index; Unreleased CHANGELOG.Exact-current hosted CI
34265888259, rust102195122469, is terminal SUCCESS on unchanged7a6cb5c...: hostedubuntu-24.04, exact checkout, pinned toolchain, formatting, all locked workspace tests including all PostgreSQL 18.4 recovery regressions, strict Clippy and cleanup passed. Fresh submitted reviews: 0. Fresh inline review threads: 0.Parallel preservation lanes were repaired rather than discarded. #214's valid migration-atomicity delta is fully transferred to exact #216 and #214 is now closed as verified-successor transfer. #215's valid complete-0002/complete-0003 preflight, partial-state refusal and restartability delta is reconstructed here; its unsafe NULL-prior post-recovery behavior is positively disproved by the #217 hostile RED and was not transferred. #215 is now closed as verified-successor transfer.
Remaining boundary
Keep Draft behind #216. This slice does not provide production login/principal membership, application repository/transaction wiring, pooled transaction-local tenant-context checkout/reset, startup migration locking/version compatibility, crash/retry/idempotency, authoritative backup/restore of generation plus publication history/head with retention/encryption/RPO/RTO, readiness/degraded evidence, protected integration or immutable release evidence. Those remain #80/#192 work. No force update, destructive rebase, self/model approval, routine bypass, gate weakening, no-op workflow churn, mutable foreign dependency, source copy or cross-service SQL.