Repository navigation
Add backup/restore consistency module with ingestion watermark and DR drill test - #403
Merged
christabel888 merged 3 commits intoOct 9, 2026
Merged
Conversation
…oss the datastore a Closes Stellar-Analysis#333
…ent IP behind a rev Closes Stellar-Analysis#334
Contributor
|
@daniel6yi8-gif is attempting to deploy a commit to the christabel888's projects Team on Vercel. A member of the Team first needs to authorize it. |
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 backup/restore consistency module with ingestion watermark and DR drill test
What was solved
#333 — Point-in-time consistent backup/restore across the datastore and cache
Create a new backend/backup/ module that coordinates point-in-time consistent backup/restore across the primary datastore and cache layer. The module will classify cache-held state as derivable vs. needs-real-backup, tag backups with an ingestion watermark at snapshot time, refuse service startup when watermarks disagree beyond a documented tolerance, treat derivable cache state as cold/empty on restore, and include a DR drill test that backs up, mutates both stores, restores, and asserts internal consistency.
Addressed:
#334 — IP allowlisting that correctly resolves client IP behind a reverse proxy
Implement a new
backend/ip_allowlist/module that restricts admin/metrics routes to allowlisted source IPs, with correct trusted-proxy-hop handling. The client IP is derived by walking theX-Forwarded-Forchain from the trusted end using an explicitly configured trusted-hop count (intrusted_hops.rs), so a forged header from an untrusted peer cannot spoof an allowlisted IP. Includesresolve.rsfor chain-walking resolution,mod.rsfor the middleware wiring, and two integration tests (spoofed_header_test.rs,legitimate_path_test.rs) plus documentation of the proxy topology assumptions.Addressed:
backend/ip_allowlist/withmod.rs,trusted_hops.rs, andresolve.rsas suggested.trusted_hops.rs(no implicit/unbounded trust).resolve.rsby walking theX-Forwarded-Forchain from the trusted end — not naive first/last element.#335 — Idempotent, dead-letter-aware background job runner
Implement a new Rust background job subsystem under backend/jobs/ with an explicit retryable-vs-terminal error taxonomy, a scheduler that retries retryable errors with backoff and immediately quarantines terminal errors, a dead-letter/quarantine module capturing full failure history plus alerting, and an upsert-based example backfill job. Add two integration tests: one proving a partially-completed job can be re-run without duplication, and one proving malformed/poison input is quarantined within the retry ceiling.
Addressed:
Changes
backend/backup/mod.rs(create)backend/backup/watermark.rs(create)backend/ip_allowlist/resolve.rs(create)backend/backup/classify.rs(create)backend/jobs/error.rs(create)backend/tests/dr_drill_test.rs(create)backend/jobs/dead_letter.rs(create)backend/ip_allowlist/mod.rs(create)backend/jobs/scheduler.rs(create)backend/ip_allowlist/trusted_hops.rs(create)backend/jobs/mod.rs(create)Approach
Issues
Closes #333
Closes #334
Closes #335