Skip to content

docs: model freezes as owned holds - #254

Closed
0xgleb wants to merge 1 commit into
feat/scheduled-freeze-windowsfrom
docs/model-freezes-as-owned-holds
Closed

0xgleb wants to merge 1 commit into
feat/scheduled-freeze-windowsfrom
docs/model-freezes-as-owned-holds

Conversation

@0xgleb

@0xgleb 0xgleb commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Motivation

The scheduled freeze-window implementation in #239 dispatches idempotent
Freeze and Unfreeze toggles. Two overlapping or adjacent windows can
therefore release each other: an earlier window's unfreeze can enable the asset
while a later window still requires the supply gate to remain closed.

Records the architectural decision discovered while reviewing
RAI-1045.

Solution

  • Model freeze requirements as typed, independently owned holds in the
    TokenizedAsset aggregate.
  • Derive supply availability from whether any hold remains active.
  • Give scheduled windows and operator actions distinct stable hold identities.
  • Preserve historical replay by treating legacy freeze events as the operator
    hold.
  • Record why scheduler-only merging, queue inspection, and delivery ordering do
    not enforce the domain invariant.

This PR contains the proposed ADR only. The implementation is intentionally
stacked as a separate draft so both the decision and its consequences remain
independently reviewable.

Checks

By submitting this for review, I'm confirming I've done the following:

  • added comprehensive test coverage for any changes in logic (no runtime logic changes)
  • made this PR as small as possible
  • linked any relevant issues or PRs

@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@0xgleb, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 19 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: d244b83c-b729-4d75-8b70-99ff7a83f3f5

📥 Commits

Reviewing files that changed from the base of the PR and between e47e0db and fff2221.

📒 Files selected for processing (1)
  • adrs/01-model-freezes-as-owned-holds.md
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/model-freezes-as-owned-holds

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

0xgleb commented Jul 15, 2026

Copy link
Copy Markdown
Contributor Author

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more


How to use the Graphite Merge Queue

Add the label add-to-gt-merge-queue to this PR to add it to the merge queue.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has required the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@0xgleb
0xgleb marked this pull request as ready for review July 16, 2026 15:16
@0xgleb
0xgleb force-pushed the feat/scheduled-freeze-windows branch from 069765e to 5f2e206 Compare July 17, 2026 23:27
@0xgleb
0xgleb force-pushed the docs/model-freezes-as-owned-holds branch 2 times, most recently from 4ca553c to acaa6bc Compare July 18, 2026 00:05
@0xgleb
0xgleb force-pushed the feat/scheduled-freeze-windows branch 2 times, most recently from 7e5e39f to 3a3fc5a Compare July 18, 2026 01:25
@0xgleb
0xgleb force-pushed the docs/model-freezes-as-owned-holds branch 2 times, most recently from 92243c6 to 8d31e2b Compare July 18, 2026 02:11
@0xgleb
0xgleb force-pushed the feat/scheduled-freeze-windows branch from 3a3fc5a to 4007ad1 Compare July 18, 2026 02:11
@0xgleb
0xgleb changed the base branch from feat/scheduled-freeze-windows to graphite-base/254 July 18, 2026 04:54
@0xgleb
0xgleb force-pushed the graphite-base/254 branch from 4007ad1 to 22fd6ae Compare July 18, 2026 07:09
@0xgleb
0xgleb force-pushed the docs/model-freezes-as-owned-holds branch from 8d31e2b to 7088a74 Compare July 18, 2026 07:09
@0xgleb
0xgleb changed the base branch from graphite-base/254 to feat/scheduled-freeze-windows July 18, 2026 07:09
@0xgleb
0xgleb force-pushed the docs/model-freezes-as-owned-holds branch from 7088a74 to c16b3ea Compare July 21, 2026 23:02
@0xgleb
0xgleb force-pushed the feat/scheduled-freeze-windows branch from 22fd6ae to 9c10ba3 Compare July 21, 2026 23:02
@0xgleb 0xgleb self-assigned this Jul 22, 2026
@0xgleb
0xgleb requested review from JuaniRios and findolor July 22, 2026 04:11
@0xgleb
0xgleb requested a review from rouzwelt July 22, 2026 04:11
@0xgleb
0xgleb force-pushed the docs/model-freezes-as-owned-holds branch from c16b3ea to fff2221 Compare July 23, 2026 04:15
@0xgleb
0xgleb force-pushed the feat/scheduled-freeze-windows branch from 9c10ba3 to e47e0db Compare July 23, 2026 04:15
@graphite-app

graphite-app Bot commented Jul 24, 2026

Copy link
Copy Markdown

Merge activity

  • Jul 24, 1:35 AM UTC: 0xgleb added this pull request to the Graphite merge queue.
  • Jul 24, 1:36 AM UTC: CI is running for this pull request on a draft pull request (#290) due to your merge queue CI optimization settings.
  • Jul 24, 1:37 AM UTC: Merged by the Graphite merge queue via draft PR: #290.

@graphite-app graphite-app Bot closed this Jul 24, 2026
@github-actions github-actions Bot added the externally-merged Graphite MQ merged this PR; Linear should treat the close as a merge label Jul 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

externally-merged Graphite MQ merged this PR; Linear should treat the close as a merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants