docs(05-06): complete tenant isolation and CASL subjects gap closure plan

Tasks completed: 2/2
- Add 6 missing models to tenant scoping (28 total)
- Add Collection and Remittance CASL subjects, update 8 routes

SUMMARY: .planning/phases/05-visibility-and-client-portal/05-06-SUMMARY.md

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
kevin-asprec
2026-03-05 18:29:18 +08:00
parent f977e6a211
commit a7022c33ab
2 changed files with 118 additions and 4 deletions

View File

@@ -5,14 +5,14 @@
See: .planning/PROJECT.md (updated 2026-03-04)
**Core value:** ISP owners can see exactly where their money is — who owes what, what's been collected, what's been spent, and what the business actually looks like financially — in real time.
**Current focus:** All 5 phases complete. Gap closure plans (05-07) done. Milestone v1.0 audit-ready.
**Current focus:** All 5 phases complete. Gap closure plans (05-06, 05-07) done. Milestone v1.0 audit-ready.
## Current Position
Phase: 5 of 5 (Visibility and Client Portal)
Plan: 7 of 7 in phase 5 (30/30 total complete, including gap closure plans 05-06, 05-07)
Status: All phases complete. All plans done: 05-01 through 05-07.
Last activity: 2026-03-05 — Completed 05-07 gap closure (E2E inventory/expense/portal tests + Phase 2 VERIFICATION fix)
Last activity: 2026-03-05 — Completed 05-06 gap closure (tenant isolation for 6 models + Collection/Remittance CASL subjects)
Progress: [██████████████████████████████] 100% (30/30 plans across all phases)
@@ -62,6 +62,8 @@ Recent decisions affecting current work:
- [05-04]: Two-tenant isolation verified with real DB records — cross-tenant queries return null/empty
- [05-05]: E2E tests exercise services directly (not HTTP) — 16 tests across 3 critical workflows
- [05-05]: Trial balance verified balanced (debits === credits > 0) after each workflow
- [05-06]: 6 missing models (expense, expenseCategory, inventoryItem, stockMovement, vendor, ticketComment) added to tenant scoping — TENANT_SCOPED_MODELS now 28 entries
- [05-06]: Collection and Remittance added as dedicated CASL subjects — routes no longer borrow Subscriber subject
- [05-07]: E2E coverage extended to 21 tests across 5 workflows (added inventory/expense + portal ticket)
- [05-07]: Phase 2 VERIFICATION.md corrected from gaps_found (4/5) to passed (5/5) — billing DRAFT-to-SENT fix validated
@@ -76,6 +78,6 @@ None.
## Session Continuity
Last session: 2026-03-05T10:27:00Z
Stopped at: Completed 05-07-PLAN.md (gap closure: E2E tests + Phase 2 VERIFICATION fix)
Last session: 2026-03-05T10:29:00Z
Stopped at: Completed 05-06-PLAN.md (gap closure: tenant isolation + CASL subjects)
Resume file: None