Context
Trial cancellation hard-deletes the appointment (tx.appointment.delete, app/api/trials/[trialId]/route.ts:504-517, 710-727), violating the soft-cancel doctrine every other type follows. Because Payment.appointment is onDelete: Cascade, this becomes a money-destroying delete the moment paid trials ship (#969 adds trial payment columns). There is also no refund path for a paid trial cancellation (route.ts:217-224).
Proposed approach
Convert trial cancellation to the standard soft-cancel (status transition plus slot completion-status update, appointment preserved), and add the paid-trial refund path on top of the refund-gateway wiring. This must land before #969 merges.
Audit ids C5/M7; found alongside #998. Blocks #969.
Context
Trial cancellation hard-deletes the appointment (
tx.appointment.delete,app/api/trials/[trialId]/route.ts:504-517, 710-727), violating the soft-cancel doctrine every other type follows. BecausePayment.appointmentisonDelete: Cascade, this becomes a money-destroying delete the moment paid trials ship (#969 adds trial payment columns). There is also no refund path for a paid trial cancellation (route.ts:217-224).Proposed approach
Convert trial cancellation to the standard soft-cancel (status transition plus slot completion-status update, appointment preserved), and add the paid-trial refund path on top of the refund-gateway wiring. This must land before #969 merges.
Audit ids C5/M7; found alongside #998. Blocks #969.