Repository navigation
feat(entitlements): make UserMeter service authority #1148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
64 commits
Select commit
Hold shift + click to select a range
3c21148
perf(entitlements): cache enforcement plan lookups
cursoragent 7d5d777
style(docs): format entitlement cache notes
cursoragent 0cd468d
Merge remote-tracking branch 'origin/main' into cursor/meter-do-38c8
cursoragent 59a8238
feat(entitlements): add per-user quota meter
cursoragent 8ebf663
feat(account): inventory UserMeter lifecycle
cursoragent 4a60dd9
test(entitlements): provide UserMeter fixtures
cursoragent 73a8e37
test(entitlements): clean meter test imports
cursoragent 8b001bf
style(mcp): format meter gateway tests
cursoragent df32168
fix(email): read daily usage from UserMeter
cursoragent ae07b85
Merge remote-tracking branch 'origin/main' into cursor/meter-do-38c8
cursoragent e6622a4
docs(entitlements): clarify meter cutover semantics
cursoragent 7628aaf
fix(entitlements): address UserMeter review feedback
cursoragent 468ee51
Merge remote-tracking branch 'origin/main' into cursor/meter-do-38c8
cursoragent a8cba2b
test(entitlements): add RunLog admin fixture
cursoragent edfd973
test(run-log): isolate usage counts per user
cursoragent 2307d37
Merge remote-tracking branch 'origin/main' into cursor/meter-do-38c8
cursoragent b18246f
feat(entitlements): shadow storage bytes in UserMeter
cursoragent eaaa509
docs(entitlements): inventory storage shadow
cursoragent 3c13b53
fix(entitlements): make storage reserves fail closed
cursoragent 68256ea
Merge remote-tracking branch 'origin/main' into cursor/meter-do-38c8
cursoragent e454e76
feat(services): shadow liveness in UserMeter
cursoragent 9f7be03
docs(services): inventory liveness shadow
cursoragent 581b896
perf(services): defer liveness shadow writes
cursoragent 393b2a4
Merge remote-tracking branch 'origin/main' into cursor/meter-do-38c8
cursoragent 12e7c02
fix(services): serialize liveness shadows
cursoragent 3a0d41d
Merge remote-tracking branch 'origin/main' into cursor/meter-do-38c8
cursoragent 194d5b5
Merge remote-tracking branch 'origin/main' into cursor/meter-do-38c8
cursoragent 5e8d1b9
feat(account): shadow deletion leases in UserMeter
cursoragent 2e92f03
docs(account): inventory deletion shadow
cursoragent c566c54
Merge remote-tracking branch 'origin/main' into cursor/meter-do-38c8
cursoragent 62f6078
fix(account): reconcile and sanitize deletion shadows
cursoragent 1116e07
Merge remote-tracking branch 'origin/main' into cursor/meter-do-38c8
cursoragent d20696d
feat(account): move write leases into UserMeter
cursoragent 6c2effd
docs(account): describe UserMeter lease authority
cursoragent afe0bb2
test(account): provide authoritative meter fixtures
cursoragent 29dc257
test(account): wire meter into workers fixtures
cursoragent 11814af
fix(account): clean partial lease mirrors
cursoragent 7e88800
Merge remote-tracking branch 'origin/main' into cursor/meter-do-38c8
cursoragent 8d368eb
Merge remote-tracking branch 'origin/main' into cursor/meter-do-38c8
cursoragent 4c0aa23
feat(admin): add UserMeter parity report
cursoragent c44a518
docs(entitlements): define production parity gates
cursoragent a6180fc
fix(admin): bound parity page walks
cursoragent 5af8263
Merge remote-tracking branch 'origin/main' into cursor/meter-do-38c8
cursoragent 177a471
refactor(entitlements): stop D1 daily counter mirror
cursoragent b955401
docs(entitlements): stage daily mirror retirement
cursoragent 164b275
fix(entitlements): preserve pre-drop schema guards
cursoragent 275d23b
fix(entitlements): clarify mirror-stop fallbacks
cursoragent 436c272
docs(entitlements): clarify pre-drop inventory reads
cursoragent a279b9e
Merge remote-tracking branch 'origin/main' into cursor/meter-do-38c8
cursoragent fc3bf7a
refactor(account): detach pending daily counter table
cursoragent fe1766b
docs(storage): point pending-drop guardrail correctly
cursoragent 05bc952
Merge remote-tracking branch 'origin/main' into cursor/meter-do-38c8
cursoragent 659033c
refactor(entitlements): drop retired daily counter table
cursoragent 65b2828
docs(entitlements): format retirement references
cursoragent 3f1f3da
Merge remote-tracking branch 'origin/main' into cursor/meter-do-38c8
cursoragent 698258e
feat(admin): add storage reconciliation maintenance
cursoragent 55b61bb
test(admin): expose reconciliation batch constant
cursoragent 1218bfb
Merge remote-tracking branch 'origin/main' into cursor/meter-do-38c8
cursoragent 3419840
feat(entitlements): make UserMeter storage authority
cursoragent b1a62a2
fix(entitlements): preserve missing-user storage semantics
cursoragent 70a4b07
style(entitlements): format missing-user test
cursoragent 69dc243
Merge remote-tracking branch 'origin/main' into cursor/meter-do-38c8
cursoragent 1909a01
feat(entitlements): make UserMeter service authority
cursoragent 9dff125
style(entitlements): format service authority tests
cursoragent File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift
Make running-state projection required before a service becomes runnable.
countRunningPackageServicesreads UserMeter only. IfupsertPackageServiceStatefails, D1 can contain a fresh running row while UserMeter remains missing or stale. The nextservice_startcan undercount usage and admit a service beyond the entitlement limit.Parity detection and later rollback do not protect the failed enforcement decision. Retry the running-state projection synchronously and fail the start if it cannot succeed. Keep best-effort projection only for transitions that cannot increase usage.
Also applies to: 325-328
🤖 Prompt for AI Agents