feat(crewing): review hardening — PII mask, vetting gates, audit/atomicity, ex-hand, A3, EPFO tests #90
No reviewers
Labels
No labels
bug
claude-failed
claude-pr
claude-queue
claude-working
epic
feature
interactive
portal
triaged
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: shad0w/pelagia-portal#90
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "feat/crewing-review-hardening"
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?
Review follow-ups and hardening for the Crewing module, raised against the stack tip
feat/crewing-epfo. These resolve the substantive findings from the cross-PR review of the crewing stack (each was a tracked follow-up), with tests for every change.Commits
SeafarerDocument.numberwas sent to the client unmasked for all roles/doc types. Aadhaar/PAN now masked server-side via the existing bank/EPF gate (full only for Accounts/SuperUser).CREW_ONBOARDEDaudit metadata; contract letter written inside the transaction (atomic).SALARY_RETURNED/SELECTION_RETURNED/WAIVER_DECLINED/RECORD_DELETED(drops unusedGATE_FAILED, enum migration); deletions audited; leave-clash / sign-off backfill requisitions now created inside the approval/sign-off transaction.verify_bank_epfgate on the proxy routes (logic extracted into a dependency-free module production uses).Verification
pnpm test— 249 unit passed (13 pre-existing skips)pnpm test:integration— 242 passed (29 files)pnpm type-check— clean20260622180000_crewing_audit_action_types).🤖 Generated with Claude Code
- C5 (Epic C5 AC1): advanceStage("verify_competency") now requires ≥1 ReferenceCheck before leaving COMPETENCY_AND_REFERENCES. - C3 (Epic C3 AC1): verifyDocuments blocks advancement when a mandatory document for the seat's rank that the candidate holds is expired. Missing-document presence stays enforced post-onboarding in the verification queue (seafarer docs aren't collected pre-onboarding) — documented inline + in wiki Tech-Debt. - C4 (experience): deferred with an inline note (Requisition has no min-experience field yet — Epic A2 AC1). applications.test.ts: reference-gate block/pass and expired-required-doc block/renew-pass. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>- AC1: addCandidate recognizes a returning hand re-entered as a fresh candidate — matched to their existing EX_HAND pool record by email (preferred) or exact name — and reuses that row instead of creating a duplicate, preserving tour history/documents/bank. Audited CANDIDATE_UPDATED { exHandRecognized: true }. - AC2: the Candidates list sorts ex-hands above new candidates by default (stable, preserving createdAt order within each group). - AC3: the candidate detail "Returning crew" callout now renders the matched member's actual tour history (ExperienceRecord) and documents on file. candidates.test.ts covers email/name recognition, the no-match path, and the ex-hand-first page ordering. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>