Repository navigation
Conversation
Add an in-memory fake Kubernetes apiserver (Sandboxes, Pods, Events, merge patches with resourceVersion and UID preconditions, Date header) and reconcile scenario tests over it: tombstoning with verified, missing, and inherited checkpoints, the 24-hour hold, lost-Pod grace, CAS conflicts, expired tombstone deletion, foreign owners, and dry run. A property test checks that no pass resurrects or discards a live session; its proptest regression seeds are checked in. Signed-off-by: Tee8z <tee8z@protonmail.com>
tee8z
force-pushed
the
dev-2884-reaper-reconcile-tests
branch
from
October 19, 2026 23:28
46bd90a to
5f1c312
Compare
|
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: true
Comment |
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.
Layer 3 adds
Reconciler::passwithout scenario tests. This PR adds them.src/fake_apiserver.rsis an in-memory apiserver for one namespace behind the realkube::Clientrequest path. It serves theDateheader, applies JSON merge patches, and returns409 Conflicton a staleresourceVersionor failed delete precondition. It records every request so tests can assert what the reaper wrote.a_completed_session_with_a_verified_receipt_is_tombstoned_oncea_completed_session_without_a_checkpoint_is_held_for_24_hoursCheckpointMissingEvent; tombstonemissingafter 24 ha_failed_recovery_carries_its_restore_checkpoint_forwarda_stopped_session_records_the_receipt_its_deleted_pod_left_behinda_receipt_s3_does_not_confirm_is_recorded_as_missingmissingan_s3_outage_defers_the_tombstonea_replaced_session_is_tombstoned_with_the_old_pods_receiptreplaced, old Pod's keya_lost_pod_is_tombstoned_only_after_the_gracelostat 60 sabandoned_bindings_are_tombstoned_without_probing_s3bind-abandonedandbinding-failed; no S3 probesessions_without_checkpointing_are_tombstoned_as_unconfiguredunconfigureda_cas_conflict_re_reads_and_re_classifiesexpired_tombstones_are_deleted_with_uid_and_version_preconditionsforeign_owners_are_left_alone_and_reported_onceSandboxIgnoredEvent over two passes; unlabeled Sandboxes not listedwithout_an_apiserver_date_the_pass_writes_nothingdry_run_decides_but_writes_nothingreceipt_memory_is_bounded_and_pruned_to_bound_podsMAX_RECEIPTS; oversized and blank messages ignoredno_pass_resurrects_or_discards_a_live_session(property)endedtombstonesproptest-regressions/reconcile_tests.txtkeeps two shrunk failure seeds for the property test.Stack
Position 17 of 20 in the DEV-2884 Buzz stack. Base: #20. Next: #4.
Validation
Run in a worktree at this commit (
CARGO_TARGET_DIRshared,CARGO_BUILD_JOBS=4):cargo fmt --check: pass.cargo clippy -p buzz-sandbox-reaper --all-targets --locked -- -D warnings: pass.cargo test -p buzz-sandbox-reaper --locked: 31 passed, 0 failed (17 newreconciletests).Limits
src/reconcile.rs.src/main.rsis still the placeholder (#![allow(dead_code)], emptyfn main() {}). Layer 5 replaces it.