test(fulfillment): consistency + intake-completeness checker

Cross-references every DOT/state/hazmat slug across COMPLIANCE_SERVICES,
REQUIRED_FIELDS, SERVICE_META, INTAKE_MANIFEST, and SERVICE_HANDLERS, and
verifies every required field is collectible by its assigned intake steps.
Caught + fixed missing usdot-reactivation SERVICE_META entry. 24/24 pass.
This commit is contained in:
justin 2026-06-02 03:29:53 -05:00
parent 9c6b8d95e0
commit cadff79bd6
2 changed files with 202 additions and 14 deletions

View file

@ -37,6 +37,7 @@ export type IntakeStep =
| "ocn"
| "mcs150" // MCS-150 biennial update form fields (standalone)
| "dot-intake" // Unified DOT intake — shows sections based on services ordered
| "state-trucking" // State-level trucking + hazmat/emissions intake (slug-gated sections)
| "review"
| "payment";
@ -121,20 +122,24 @@ export const INTAKE_MANIFEST: Record<string, IntakeStep[]> = {
"entity-dissolution": ["dot-intake", "review"],
// ── State-Level Trucking Compliance ─────────────────────────────────
// Admin-assisted: info collected at checkout, no intake form needed.
"irp-registration": ["review"],
"ifta-application": ["review"],
"ifta-quarterly": ["review"],
"or-weight-mile-tax": ["review"],
"ny-hut-registration": ["review"],
"ky-kyu-registration": ["review"],
"nm-weight-distance": ["review"],
"ct-highway-use-fee": ["review"],
"ca-mcp-carb": ["review"],
"state-dot-registration":["review"],
"intrastate-authority": ["review"],
"osow-permit": ["review"],
"state-trucking-bundle": ["review"],
// Collected via the dedicated state-trucking intake step.
"irp-registration": ["state-trucking", "review"],
"ifta-application": ["state-trucking", "review"],
"ifta-quarterly": ["state-trucking", "review"],
"or-weight-mile-tax": ["state-trucking", "review"],
"ny-hut-registration": ["state-trucking", "review"],
"ky-kyu-registration": ["state-trucking", "review"],
"nm-weight-distance": ["state-trucking", "review"],
"ct-highway-use-fee": ["state-trucking", "review"],
"ca-mcp-carb": ["state-trucking", "review"],
"state-dot-registration":["state-trucking", "review"],
"intrastate-authority": ["state-trucking", "review"],
"osow-permit": ["state-trucking", "review"],
"state-trucking-bundle": ["state-trucking", "review"],
// ── Hazmat / Emissions ───────────────────────────────────────────────
"hazmat-phmsa": ["state-trucking", "review"],
"state-emissions": ["state-trucking", "review"],
// ── Entity / Corporate Upgrade ─────────────────────────────────────
"entity-upgrade-bundle": ["dot-intake", "review"],
@ -181,6 +186,7 @@ export const SERVICE_META: Record<string, { name: string; price_cents: number }>
"dot-drug-alcohol": { name: "DOT Drug & Alcohol Compliance Program", price_cents: 14900 },
"dot-audit-prep": { name: "New Entrant Safety Audit Preparation", price_cents: 39900 },
"dot-full-compliance": { name: "DOT Full Compliance Bundle", price_cents: 39900 },
"usdot-reactivation": { name: "USDOT Reactivation", price_cents: 14900 },
// State-level trucking
"irp-registration": { name: "IRP Registration Assistance", price_cents: 19900 },
"ifta-application": { name: "IFTA Application + Decals", price_cents: 14900 },
@ -195,6 +201,9 @@ export const SERVICE_META: Record<string, { name: string; price_cents: number }>
"intrastate-authority": { name: "Intrastate Operating Authority", price_cents: 24900 },
"osow-permit": { name: "Oversize/Overweight Permit", price_cents: 9900 },
"state-trucking-bundle": { name: "State Compliance Bundle", price_cents: 49900 },
// Hazmat / emissions
"hazmat-phmsa": { name: "PHMSA Hazmat Registration", price_cents: 14900 },
"state-emissions": { name: "State Clean-Truck / Emissions Compliance", price_cents: 19900 },
};
export function formatUSD(cents: number): string {