shoc-backend/SeaHavenIndustries.Tests
Alexandre Brandizzi 2327097d5e fix(work-orders): symmetric NTE release, terminal guard, serialized cancel (SH-196)
Three contract gaps found reviewing the frontend consumer:

- Revoking an auto-approved uplift never restored the dispatch NTE. Create
  raises NTE for both auto-approved and approved requests, but revoke restored
  it only for Approved, so the allowance was freed while the NTE stayed raised
  and every create -> auto-approve -> revoke cycle compounded the inflation.
  Revoke now compensates for NoApprovalRequired symmetrically.
- Revoke and cancel had no work-order lifecycle check, so a direct API call
  could still mutate uplifts on a Completed or Canceled work order; the board
  dialog's read-only state is UX only. Both now reject terminal work orders in
  the service.
- WorkOrderBoardCancelService read the pending-uplift list outside any gate, so
  an in-flight create could commit after that read and leave a pending uplift on
  a Canceled work order. The cancel flow now runs inside the same per-work-order
  gate as create, so the pending read, withdrawal and status audit serialize
  against it.
2026-08-18 17:41:14 -03:00
..
Fixtures fix(work-orders): satisfy producer contract review 2026-07-27 16:33:06 -03:00
ConcurrencyExceptionFilterTests.cs feat(phase-0): finalize foundation — authorize, concurrency filter, isolated build 2026-07-02 09:19:28 -03:00
LifecycleStatusMapperTests.cs fix(work-orders): align phase 2 status/type contract to SHOC frontend 2026-07-07 13:11:22 -03:00
Phase4SearchIndexesSqlServerTests.cs fix(test): guard LocalDB migration check by platform 2026-07-24 13:10:50 -03:00
SeaHavenIndustries.Tests.csproj fix(work-orders): satisfy producer contract review 2026-07-27 16:33:06 -03:00
ShocWebhookVectorTests.cs fix(work-orders): satisfy producer contract review 2026-07-27 16:33:06 -03:00
SyncFieldMergePolicyTests.cs refactor: enforce backend boundaries and optimize dispatch (#30) 2026-07-24 17:35:34 -03:00
WorkOrderAccountScopeTests.cs fix(work-orders): scope legacy GET GetComments by account [SH-221] 2026-08-11 15:18:29 -03:00
WorkOrderAccountTestHelpers.cs fix(work-orders): apply account scope across create and reads [SH-221] 2026-08-11 10:45:37 -03:00
WorkOrderAuditServiceTests.cs refactor: enforce backend boundaries and optimize dispatch (#30) 2026-07-24 17:35:34 -03:00
WorkOrderBoardCancelServiceTests.cs fix(work-orders): symmetric NTE release, terminal guard, serialized cancel (SH-196) 2026-08-18 17:41:14 -03:00
WorkOrderBoardConcurrencyTests.cs refactor: enforce backend boundaries and optimize dispatch (#30) 2026-07-24 17:35:34 -03:00
WorkOrderBoardCreateRelationalTests.cs fix(work-orders): apply account scope across create and reads [SH-221] 2026-08-11 10:45:37 -03:00
WorkOrderBoardCreateServiceTests.cs fix(work-orders): apply account scope across create and reads [SH-221] 2026-08-11 10:45:37 -03:00
WorkOrderBoardCreateSyncLockTests.cs fix(work-orders): apply account scope across create and reads [SH-221] 2026-08-11 10:45:37 -03:00
WorkOrderBoardMutationRulesTests.cs fix(work-orders): address PR14 phase-2 review feedback 2026-07-17 14:48:48 -03:00
WorkOrderBoardSearchTests.cs fix(work-orders): apply account scope across create and reads [SH-221] 2026-08-11 10:45:37 -03:00
WorkOrderBoardServiceTests.cs feat(work-orders): WO-scoped uplift endpoints and board summary (SH-196) 2026-08-13 14:49:56 -03:00
WorkOrderBoardUpdateServiceTests.cs feat(work-orders): board completedDate + media categorize contract 2026-08-04 11:08:18 -03:00
WorkOrderDerivedFieldsTests.cs fix(work-orders): align phase 2 status/type contract to SHOC frontend 2026-07-07 13:11:22 -03:00
WorkOrderFieldLockServiceTests.cs refactor: enforce backend boundaries and optimize dispatch (#30) 2026-07-24 17:35:34 -03:00
WorkOrderMediaConcurrencyRelationalTests.cs !fix(work-orders): fail-closed media account scope with org_scope claim [SH-221] 2026-08-06 10:26:04 -03:00
WorkOrderMigrationDiscoveryTests.cs fix(work-orders): satisfy producer contract review 2026-07-27 16:33:06 -03:00
WorkOrderNumberNormalizerTests.cs test(work-orders): add Phase 0 domain unit tests 2026-07-02 09:19:28 -03:00
WorkOrderPhase6Tests.cs fix(work-orders): serialize uplift create and atomic cancel (SH-196) 2026-08-18 10:20:05 -03:00
WorkOrderPhase7CoexistenceTests.cs fix(work-orders): apply account scope across create and reads [SH-221] 2026-08-11 10:45:37 -03:00
WorkOrderReconciliationAuthTests.cs test: prove SH-133 webhook and admin boundaries 2026-07-25 15:45:52 -03:00
WorkOrderReconciliationTests.cs test(work-orders): fix sync/webhook/recon fixtures for AccountId stamp [SH-221] 2026-08-11 10:54:23 -03:00
WorkOrderTypeMapperTests.cs test(work-orders): cover FE-aligned mappers and derived field logic 2026-07-02 09:19:28 -03:00
WorkOrderUpliftServiceTests.cs fix(work-orders): symmetric NTE release, terminal guard, serialized cancel (SH-196) 2026-08-18 17:41:14 -03:00
WorkOrderWebhookTests.cs test(work-orders): fix sync/webhook/recon fixtures for AccountId stamp [SH-221] 2026-08-11 10:54:23 -03:00
WorkOrderWeekRolledTests.cs fix(work-orders): apply account scope across create and reads [SH-221] 2026-08-11 10:45:37 -03:00