Skip to content

Approve bounded publication of validated retained suspends - #283

Closed
zibi-pplx wants to merge 1 commit into
codex/logical-backup-upload-proofsfrom
pr283
Closed

zibi-pplx wants to merge 1 commit into
codex/logical-backup-upload-proofsfrom
pr283

Conversation

@zibi-pplx

@zibi-pplx zibi-pplx commented Oct 11, 2026 •

Copy link
Copy Markdown
Collaborator

Allow a managing-organization administrator to approve publication of an already sealed, validated retained full suspend when ordinary historical publisher authority is unavailable. Bind approval to artifact/generation, capture evidence, exact logical manifest, stable metadata, uploader incarnation, and current sandbox state, for at most 24 hours.

Begin permits one active attempt. Ready validates uploaded logical/object evidence and consumes the approval atomically. Expiry, revocation, changed state, or supersession prevents Ready while allowing failure reporting. An explicit approval takes precedence over an older failed registration. A consumed grant never becomes ordinary retry authority, including after attempt pruning, and an older registration cannot bypass that requirement. A larger abandoned generation without materialization is not itself supersession. Ready/revoke races serialize through the sandbox lock.

Issuance defaults off until all readers and workers enforce the contract. The admin routes do not seal captures, enqueue uploads, clear quarantine, change placement, or wake a VM. Preserve original retained bytes; use independently owned staging copies. Grant-aware readers and retained audit schema are rollback floors after issuance. The administrator attests source validation; worker hashes are not independent attestation against a compromised uploader. See docs/backup-recovery.md for the outcome matrix and rollout contract.

Validation: the full internal API nextest inventory passed all 389 tests with zero skips; real RPC/TokenReview/live-pod/PostgreSQL cases cover expiry, revocation, wrong proofs/objects, changed state, successor materialization, abandoned successors, exact replay, failure/retry, and Ready/revoke concurrency. The compressed-versus-logical byte-count regression failed before correction. All 228 admin tests passed, including authorization and the rollout gate; sealed-manifest validation, SQL audit constraints, and refreshed OpenAPI snapshot pass. Workspace all-target/all-feature Clippy and affected aarch64 Linux musl compilation/lint pass. Public diff review and Gitleaks passed.

Stack (land in order): #318 schema → #319 materialization ownership → #345 backup caller identity → #346 upload evidence → #283 retained-artifact recovery.

Rebuilt against d1abc66fe48bccaaa715e09593f875f7c6c4d11d. The schema is separate because current CI requires migration-only PRs. All existing PRs are reused.

Scope boundary: no file overlap with #828 (2a4988b6), #829 (1b696768), or #837 (58ceff04). Both compositions—#828+#829 and #837+#829—passed aarch64 Linux musl Clippy and all 98 selected snapshot/teardown tests each. These are component tests, not live Firecracker recovery evidence. Capture, encrypted sealing, teardown handoff, and source cleanup remain with those workstreams. Linux/KVM held-volume recovery, manager-restart/handoff failure, and live restore of the same artifact have not been validated here; issuance must remain disabled until that deployment evidence exists.

AI assistance: Codex contributed implementation, tests, and this description.

@zibi-pplx
zibi-pplx changed the base branch from main to pr281 October 11, 2026 18:10
@zibi-pplx zibi-pplx changed the title Recover retained backups after retirement and pace teardown retries Authorize retained artifact backups after execution retirement Oct 11, 2026
@zibi-pplx
zibi-pplx changed the base branch from pr281 to main October 11, 2026 18:35
@zibi-pplx
zibi-pplx changed the base branch from main to pr281 October 11, 2026 18:35
@zibi-pplx
zibi-pplx added this pull request to stack #286 October 11, 2026 18:54
@zibi-pplx
zibi-pplx removed this pull request from stack #286 October 12, 2026 17:51
@zibi-pplx
zibi-pplx changed the base branch from pr281 to main October 12, 2026 17:52
@zibi-pplx
zibi-pplx marked this pull request as draft October 12, 2026 17:52
@zibi-pplx zibi-pplx changed the title Authorize retained artifact backups after execution retirement Authorize retired backup retries only from verified prior registrations Oct 12, 2026
@zibi-pplx
zibi-pplx changed the base branch from main to pr319 October 12, 2026 20:16
@zibi-pplx
zibi-pplx added this pull request to stack #320 October 12, 2026 20:16
@zibi-pplx zibi-pplx changed the title Authorize retired backup retries only from verified prior registrations Authorize verified backup retries and explicit retained-artifact recovery Oct 13, 2026
@zibi-pplx

Copy link
Copy Markdown
Collaborator Author

Implemented the agreed admission and recovery contract. Strict ordinary retries require prior registration for the exact artifact and verified worker incarnation; first registration after retirement stays refused. Compatibility remains the default and cannot mint trusted historical UIDs. Grant-backed attempts are excluded from ordinary retry authority in every state. Capture freshness and registration liveness are separate.

The explicit managing-admin recovery operation binds a sealed full artifact, generation, uploader incarnation, capture time, stable metadata, and logical file proofs. Grants expire, are revocable, permit one active attempt, and are consumed atomically at Ready. Begin, heartbeat, replay, and finalize revalidate authority; finalize also checks proof drift and successor state. Issuance defaults off. The shadow scanner and registration share decision code; its result remains advisory, with identity coverage, inventory completeness, and writer rollout separate gates.

Prerequisites are separate draft PRs for encrypted file admission (#344), retained/live-verified TokenReview identity (#345), schema (#318), identity writers (#319), and durable logical upload proofs (#346). The recovery lifecycle and all 250 internal API tests passed. Broad checks passed apart from a gateway TLS timeout independently reproduced on the base revision; the four initial lifecycle fixture failures now pass.

Still outside this implementation: repairing incomplete encrypted-device captures, credential-vending policy changes, and live Linux/KVM restore evidence. This remains draft and does not enable enforcement or perform production recovery.

@zibi-pplx
zibi-pplx removed this pull request from stack #320 October 13, 2026 01:20
@zibi-pplx
zibi-pplx changed the base branch from pr319 to codex/logical-backup-upload-proofs October 13, 2026 01:20
@zibi-pplx
zibi-pplx added this pull request to stack #347 October 13, 2026 01:20
@zibi-pplx
zibi-pplx removed this pull request from stack #347 October 13, 2026 06:10
@zibi-pplx
zibi-pplx added this pull request to stack #371 October 13, 2026 06:10
@zibi-pplx
zibi-pplx removed this pull request from stack #371 October 13, 2026 17:22
@zibi-pplx
zibi-pplx changed the base branch from codex/logical-backup-upload-proofs to codex/retained-backup-review-base October 13, 2026 17:22
@zibi-pplx zibi-pplx closed this Oct 15, 2026
@zibi-pplx zibi-pplx reopened this Oct 22, 2026
@zibi-pplx zibi-pplx changed the title Authorize verified backup retries and explicit retained-artifact recovery Approve bounded publication of validated retained suspends Oct 22, 2026
@zibi-pplx
zibi-pplx changed the base branch from codex/retained-backup-review-base to codex/logical-backup-upload-proofs October 22, 2026 16:19
@zibi-pplx
zibi-pplx added this pull request to stack #879 October 22, 2026 16:20
Retained full-suspend artifacts may lack ordinary historical publisher authority. Add managing-admin approvals bound to the sealed manifest, capture-time evidence, uploader incarnation, and current sandbox state. Begin permits one active attempt; Ready validates logical and object evidence and consumes the approval atomically. Expiry, revocation, supersession, or changed state refuses Ready while preserving failure reporting. Grant-backed attempts never become ordinary retry authority. Explicit approval takes precedence over an older failed registration; that registration cannot bypass the approval after consumption.

Issuance defaults off until all backup readers and workers enforce this contract. Approvals do not seal captures, enqueue uploads, clear quarantine, or wake sandboxes. Preserve original retained bytes and the audit schema; grant-aware readers are the rollback floor after issuance. Existing capture and cleanup owners remain responsible for source retention.

Validation: all 389 internal API nextest tests and all 228 admin tests pass. Real TokenReview/live-pod/RPC/PostgreSQL cases exercise approval consumption, expiry, revoke, proof mismatch, changed state, abandoned versus materialized successors, replay, and Ready/revoke concurrency. Compressed-versus-logical size regression reproduced before correction. Admin authorization and rollout gate tests and the refreshed OpenAPI snapshot pass. Full workspace all-target/all-feature Clippy passed. Fresh and upgrade PostgreSQL schemas match; Squawk found no issues in all seven migrations. Both compositions with the capture/cleanup work (#828+#829 and #837+#829) passed aarch64 Linux musl lint and all 98 selected snapshot/teardown tests each. Linux/KVM live recovery remains unvalidated. Documentation classification and six site build tests passed. Public diff review and Gitleaks scan passed.

AI assistance: Codex contributed implementation, tests, and this description.
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.

2 participants