Skip to content

feat(storage-lifecycle): transition Coldline batch stock to Archive - #24280

Merged
Git-on-my-level merged 3 commits into
mainfrom
lane/margincarry-archive
Nov 2, 2026
Merged

Git-on-my-level merged 3 commits into
mainfrom
lane/margincarry-archive

Conversation

@Git-on-my-level

@Git-on-my-level Git-on-my-level commented Nov 1, 2026 •

Copy link
Copy Markdown
Member

What

prod storage lifecycle gains a second SetStorageClass rule: the already-Coldline chunks/ batch artifacts (.batch.enc/.batch.bin — the same p76a scope as the Coldline rule) move to ARCHIVE at age: 90. The validator accepts the new rule shape (ARCHIVE from COLDLINE only, prod bucket only, at most one rule per target class, same chunks/-only prefix scoping and age >= 30 floor), 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

  • Same prefix/suffix scope as the Coldline rule — small .opus.enc chunks stay Standard, merged/, playback/ and noncurrent rules untouched.
  • matchesStorageClass: ["COLDLINE"] — only objects already in Coldline move; no Standard object can skip to Archive.
  • Dispatch gate: do not dispatch prod apply carrying 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.
  • Rollback is unchanged: lifecycle_variant=rollback drops this rule with the Coldline one (objects already moved stay Archive; reverting class needs a rewrite job).
  • No .github/ changes: the rule rides the existing apply/rollback variants.

Tests

backend/test.sh with BACKEND_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

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.
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-11-01T18:33:12.570231Z
We couldn’t complete this review. Comment @codex review to try again.
78abee9 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

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.
@github-actions

github-actions Bot commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

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:

  • Project standards — Ensuring consistency across the codebase
  • User needs — Making sure changes align with what our users need
  • Code best practices — Maintaining code quality and maintainability
  • Project direction — Keeping aligned with our product principles and locked invariants

Before your next PR, please skim:

  • PRODUCT.md — product north star
  • Product invariants — locked rules (shared chat, memory tiers, agent control plane, integrations, brand)

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!

@github-actions

github-actions Bot commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

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:

  • Project standards — Ensuring consistency across the codebase
  • User needs — Making sure changes align with what our users need
  • Code best practices — Maintaining code quality and maintainability
  • Project direction — Keeping aligned with our product principles and locked invariants

Before your next PR, please skim:

  • PRODUCT.md — product north star
  • Product invariants — locked rules (shared chat, memory tiers, agent control plane, integrations, brand)

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!

@Git-on-my-level
Git-on-my-level merged commit cb06f92 into main Nov 2, 2026
60 checks passed
@Git-on-my-level
Git-on-my-level deleted the lane/margincarry-archive branch November 2, 2026 00:08
Git-on-my-level added a commit that referenced this pull request Nov 2, 2026
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
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.

1 participant