feat(auth): migrate calendar + sla + contracts to TenantId (PMS-139 sweep batch 3) #161
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/pms-139-sweep-calendar-sla-contracts"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Batch 3 of the PMS-139 typed-tenant sweep: migrate
calendar,sla, andcontractsfrom bareUuidtenant ids to theTenantIdnewtype.How
u.tenant()(theTenantScopedtrait, now imported in eachroutes.rs); every public service method and module-local helper takestenant_id: TenantId.Uuid, so.bind(tenant_id)binds and%tenant_idtracing render unchanged - no.get()needed at the SQL layer.audit_writecall sites in contracts, which usetenant_id.get()transitionally until the audit hub is swept last.ReminderCandidate/ReminderRow/sweep rows) asUuidand dispatch through the notifications/audit hubs, never calling a migrated method.tests/contracts.rs,tests/sla.rs) wrap literal tenant ids withTenantId::from_trusted(...), matching the batch-1tests/rmmprecedent.Verification
cargo check --all-targets,cargo clippy --all-targets: clean.cargo test --test contracts --test sla --test calendar_reminders --test sla_notify: 6 + 1 + 2 + 1 pass.cargo test --doc: thecompile_failnewtype guard still holds (2 pass / 3 ignored).Progress: 8 of ~17 modules migrated (reports, rmm, time_tracking, assets, projects, calendar, sla, contracts). ~9 remain; the
audit_write/notifications::dispatch/TicketServicehubs are swept last.🤖 Generated with Claude Code