Repository navigation
feat(storage-lifecycle): transition Coldline batch stock to Archive - #24280
Conversation
Adds a second SetStorageClass rule to prod.json moving the already-Coldline chunks/ batch artifacts (.batch.enc/.bin, the same p76a scope) to ARCHIVE at age 60 — at least 30 days after the Coldline transition, so the p76 cadence is unchanged and the existing ~160 TB stock qualifies on first evaluation. David approved the move 11-01 (lead ruling ac0c9b), gated on playback-on-demand (#24215) being live before the prod apply dispatch: Archive retrieval bills $0.05/GB vs Coldline $0.02/GB and on-demand playback is the reader that would pay it. Value: ~$34/day Coldline at-rest falls to ~$11/day (-$22/day steady). Validator: SetStorageClass rules now target COLDLINE (from STANDARD/MULTI_REGIONAL) or ARCHIVE (from COLDLINE only), at most one of each; everything else (chunks/ prefix scoping, age >= 30, no Delete reaching chunks/) unchanged. Contract tests pin the new rule shape and the rollback delta. No workflow changes: the rule rides the existing apply/rollback variants.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Review round 1 (Luna): lifecycle age is creation-based and transitions are asynchronous, so age 60 cannot guarantee the documented 30-day Coldline interval — raise to 90 (3x the transition age) so lagged transitions still keep a real Coldline residency; the pre-existing stock still qualifies on first evaluation. And the validator now rejects ARCHIVE rules on any bucket other than omi-private-cloud-sync, so the dev lifecycle cannot pick up the prod-approved move.
|
Hey @Git-on-my-level 👋 Thank you so much for taking the time to contribute to Omi! We truly appreciate you putting in the effort to submit this pull request. After careful review, we've decided not to merge this particular PR. Please don't take this personally — we genuinely try to merge as many contributions as possible, but sometimes we have to make tough calls based on:
Before your next PR, please skim:
If this was declined for direction or taste, maintainers should cite an invariant ID or open a proposed one — ask if that citation is missing. Your contribution is still valuable to us, and we'd love to see you contribute again in the future! If you'd like feedback on how to improve this PR or want to discuss alternative approaches, please don't hesitate to reach out. Thank you for being part of the Omi community! |
|
Hey @Git-on-my-level 👋 Thank you so much for taking the time to contribute to Omi! We truly appreciate you putting in the effort to submit this pull request. After careful review, we've decided not to merge this particular PR. Please don't take this personally — we genuinely try to merge as many contributions as possible, but sometimes we have to make tough calls based on:
Before your next PR, please skim:
If this was declined for direction or taste, maintainers should cite an invariant ID or open a proposed one — ask if that citation is missing. Your contribution is still valuable to us, and we'd love to see you contribute again in the future! If you'd like feedback on how to improve this PR or want to discuss alternative approaches, please don't hesitate to reach out. Thank you for being part of the Omi community! |
David dropped the existing-stock Coldline-to-Archive proposal on 2026-11-02 because of its large one-time operation cost (about $38k for the 381.6M-object stock in the rollout carry report). Remove that rule from `prod.json` and the Archive acceptance added by #24280. Update the lifecycle docs and #24349's retention contract bookkeeping, and make the forward source gate also validate the existing prod contract. The separate release-scoped forward Archive proposal still requires a new empty regional bucket. The 3-day `merged/` Delete and noncurrent `.opus.enc` Delete remain unchanged. The rollout handoff reports only the playback 30-day Delete and batch Coldline rule live, so **any prod lifecycle apply would still install both additional delete rules**. David has not ruled on `merged/`; prod apply remains blocked pending explicit clearance. This PR does not apply lifecycle policy, dispatch workflows, or deploy anything. Validation: **425 passed** across the targeted lifecycle, forward, retention-contract, staging-guard and storefront files through `backend/test.sh` (`BACKEND_UNIT_TEST_FILE_LIST`, one worker), under `omi-heavy run -- nice -n 19`. All four private-cloud source variants and the forward/prod source validator passed. Restoring the old Archive rule in a temporary mutation made `test_prod_has_no_archive_rule` fail as intended; the original config was restored byte-for-byte. Injected Archive rules are rejected in every private-cloud variant. `make preflight` passed under the same heavy-slot/nice wrapper with this PR body. Failure-Class: none UI-Evidence: none -- config, offline validators, docs and tests only
What
prod storage lifecycle gains a second
SetStorageClassrule: the already-Coldlinechunks/batch artifacts (.batch.enc/.batch.bin— the same p76a scope as the Coldline rule) move to ARCHIVE atage: 90. The validator accepts the new rule shape (ARCHIVE from COLDLINE only, prod bucket only, at most one rule per target class, samechunks/-only prefix scoping andage >= 30floor), and the contract tests pin it.Why (cost)
~160 TB sits in Multi-Region Coldline at ~$34/day and grows +$0.12/day (billing export 10-01..11-01,
omi-private-cloud-sync). Archive is $0.0022/GB-mo vs Coldline $0.007 → the stock falls to ~$11/day, −$22/day steady (ramping). Lifecycle age is creation-based and transitions are asynchronous, so no age strictly guarantees a Coldline interval;age: 90= 3× the Coldline transition age keeps a real Coldline residency even for lagged transitions, the pre-existing stock (created ≥90d ago) moves on first evaluation, and the 30–90-day Coldline tail ramps in over ~60 days.David approved this move on 2026-11-01 (lead ruling ac0c9b: "Coldline to Archive after playback live").
Safety
.opus.encchunks stay Standard,merged/,playback/and noncurrent rules untouched.matchesStorageClass: ["COLDLINE"]— only objects already in Coldline move; no Standard object can skip to Archive.applycarrying this rule until playback-on-demand (feat(playback): turn on-demand playback on in prod #24215) is live — Archive retrieval is $0.05/GB vs Coldline $0.02/GB, and on-demand playback is the reader that would pay it. Noted in the README next to the existing freeze gate.lifecycle_variant=rollbackdrops this rule with the Coldline one (objects already moved stay Archive; reverting class needs a rewrite job)..github/changes: the rule rides the existing apply/rollback variants.Tests
backend/test.shwithBACKEND_UNIT_TEST_FILE_LIST=tests/unit/test_storage_lifecycle_contract.py: 19 passed locally (1.05s).Failure-Class: none
UI-Evidence: none -- backend config/validator/tests only, no web/admin/app edits