docs(tech-debt): TD-4 crewing vetting gates partial enforcement

shad0w 2026-06-22 23:40:08 +05:30
parent cf55c02265
commit 106148f13f

@ -10,6 +10,27 @@ goal is visibility: each item records **what**, **why it matters**, and a
## Open
### TD-4 · Crewing recruitment vetting gates only partially enforced
**What.** The 7-stage pipeline ([Implementation Spec §5.1](Crewing-Implementation-Spec))
now enforces **C5** (≥1 reference before leaving COMPETENCY_AND_REFERENCES) and a
**partial C3** (an *expired* mandatory document for the seat's rank blocks
`verifyDocuments`). Two gaps remain:
- **C3 "missing required document"** is not hard-enforced in the pipeline. Seafarer
documents are collected on the crew profile **after** onboarding (Phase 4a), so a
candidate usually has none on file mid-pipeline; a presence check would stall the
funnel. Presence is enforced post-onboarding in the verification queue (§8.11).
Once careers intake (**A2**) uploads documents pre-onboarding, tighten
`verifyDocuments` to require every mandatory `docType` to be present.
- **C4 experience check** is deferred: `Requisition` has no min-experience criteria
field (see **A2 AC1**). When it lands, compare the candidate's `ExperienceRecord`
total against it in `verifyDocuments` and flag a shortfall.
**Touch points.** `App/app/(portal)/crewing/applications/actions.ts`
(`advanceStage`, `verifyDocuments`); `App/prisma/schema.prisma` (`Requisition`
min-experience, future).
### TD-3 · Inventory increments are not reversed when a PO is cancelled
**What.** Approving a PO with a `siteId` increments `ItemInventory`