Skip to content

audit-mixin-rollout-tier4: ai/budget/users created_by/updated_by - #311

Merged
arutsh merged 1 commit into
mainfrom
Shared/feat/Issue-307/audit-mixin-rollout-tier4
Sep 22, 2026
Merged

arutsh merged 1 commit into
mainfrom
Shared/feat/Issue-307/audit-mixin-rollout-tier4

Conversation

@arutsh

@arutsh arutsh commented Sep 22, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Adds created_at/updated_at/created_by/updated_by to AIProvider, AIProviderModel, DonorTemplateModel, CustomerModel, and UserModel (closes groups 1–3 of audit-mixin-rollout-tier4, Issues audit-mixin-rollout-tier4: ai service catalog models (group 1) #308/audit-mixin-rollout-tier4: budget service DonorTemplateModel (group 2) #309/audit-mixin-rollout-tier4: users service CustomerModel and UserModel (group 3) #310).
  • CustomerModel/UserModel FK created_by/updated_by to users.id via a new AuditMixin.__audit_actor_table__ option (built with declared_attr), replacing hand-copied FK column overrides duplicated across both models.
  • migration_helpers.drop_audit_columns now discovers its FK constraints via inspection instead of taking a duplicated actor_table kwarg, so upgrade()/downgrade() can't drift out of sync.
  • Code-review cleanup: fixed two tier4 tests that asserted against actor UUIDs never persisted to the DB (so the FK constraint was never actually exercised), deduped budget's JWT-builder test helper into conftest.py, and removed a redundant id override on the ai_provider models.
  • Also includes proposal docs for three follow-on changes surfaced along the way: budget-fix-money-integrity, shared-feat-138-status-history, users-fix-auth-claims-hardening (no code changes, planning only).

Test plan

  • services/ai test suite: 136 passed
  • services/budget test suite: 374 passed
  • services/users test suite: 202 passed
  • services/chat test suite: 98 passed (unaffected, sanity check on shared AuditMixin change)
  • Manually verified locally: login, self-registration, and customer creation
  • Staging verification of login/self-registration/admin-management flows (tasks.md 3.5, still pending)

🤖 Generated with Claude Code
closes: #308 , #309 , #310

…pdated_by

Adds created_at/updated_at/created_by/updated_by to AIProvider,
AIProviderModel, DonorTemplateModel, CustomerModel, and UserModel.
CustomerModel/UserModel FK created_by/updated_by to users.id via a new
AuditMixin.__audit_actor_table__ option (declared_attr-based), replacing
hand-copied FK column overrides. migration_helpers.drop_audit_columns now
discovers its FK constraints by inspection instead of a duplicated
actor_table kwarg, so upgrade/downgrade can't drift out of sync. Also
dedupes the budget tests' JWT-builder helper into conftest.py, removes a
redundant `id` override on the ai_provider models, and fixes two tier4
tests that asserted against actor UUIDs never persisted to the DB.

Also adds proposal docs for three follow-on changes surfaced along the
way: budget-fix-money-integrity, shared-feat-138-status-history, and
users-fix-auth-claims-hardening.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Sep 22, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
grant-flow Ready Ready Preview Sep 22, 2026 11:04am UTC

@arutsh
arutsh merged commit 2c0e2ef into main Sep 22, 2026
23 of 25 checks passed
@arutsh
arutsh deleted the Shared/feat/Issue-307/audit-mixin-rollout-tier4 branch September 25, 2026 09:30

This branch was successfully deployed

1 active deployment
Preview — dc8e3deb Deployed Sep 22, 2026 by vercel[bot]
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.

audit-mixin-rollout-tier4: ai service catalog models (group 1)

1 participant