Skip to content

fix: harden quota management contract - #5

Merged
dadachann merged 4 commits into
mainfrom
fix/quota-reliability-followup-20260727
Jul 27, 2026
Merged

fix: harden quota management contract#5
dadachann merged 4 commits into
mainfrom
fix/quota-reliability-followup-20260727

Conversation

@dadachann

Copy link
Copy Markdown
Contributor

Summary

  • protect quota, used quota, and request count from generic user edits
  • make quota add/subtract/override atomic and return the committed authoritative quota
  • invalidate cached user data after quota mutation

Verification

  • go test ./controller -run TestManageUser -count=1
  • focused quota/model tests
  • broader go test ./controller ./model -count=1 was attempted; controller passed, while unrelated existing model tests fail because their shared SQLite setup lacks tables such as abilities and tasks
  • git diff --check

Checklist

  • Human-reviewed implementation and tests
  • No unrelated UI changes
  • Backward-compatible API route and authorization

@dadachann

Copy link
Copy Markdown
Contributor Author

Re-triggering the opened-only PR quality workflow after the final idempotency changes.

@dadachann dadachann closed this Jul 27, 2026
@dadachann dadachann reopened this Jul 27, 2026
@dadachann

Copy link
Copy Markdown
Contributor Author

Re-triggering the opened-only PR quality workflow for the final review-gap commit.

@dadachann dadachann closed this Jul 27, 2026
@dadachann dadachann reopened this Jul 27, 2026
@dadachann

Copy link
Copy Markdown
Contributor Author

Re-triggering the opened-only workflow for the final audit-recovery commit.

@dadachann dadachann closed this Jul 27, 2026
@dadachann dadachann reopened this Jul 27, 2026
@dadachann
dadachann merged commit d446c07 into main Jul 27, 2026
1 check passed
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