# L-013-020 Adjacent Enum Drift โ€” agent #14 (re-dispatch slice 3) **Headline:** Single medium finding (tenure type enum diverges between berths and reservations); all other enums consistent. **Counts:** 0 critical ยท 0 high ยท 1 medium --- ## ๐ŸŸก MEDIUM L-018: Tenure type enum diverges between berths and reservations - **Files:** `src/lib/db/schema/berths.ts:65` vs `src/lib/db/schema/reservations.ts:32` - **What:** `berths.tenureType` documents `'permanent' | 'fixed_term' | 'fee_simple' | 'strata_lot'` (4 values). `reservations.tenureType` documents `'permanent' | 'fixed_term' | 'seasonal'` (3 values). Same column name, divergent allowed values. - **Why it matters:** No writes indicate actual cross-table conflict yet, but the schema-comment mismatch is a trap โ€” a future feature copying tenure between the two tables would silently accept invalid values for the receiving side. - **Suggested fix:** Pick a single canonical enum (likely `'permanent' | 'fixed_term' | 'fee_simple' | 'strata_lot' | 'seasonal'` as the union) and update both schemas + comments. Or rename one column to disambiguate intent. --- ## โœ… Passing checks - L-013 berth status `available/under_offer/sold` โ€” only writes are in `berth-rules-engine.ts` respecting the 3-value set - L-014 statusOverrideMode โ€” `manual/automated/null`; migration 0066 normalizes legacy `'auto'` โ†’ NULL; only writers in rules-engine + reconcile-queue both respect three-state - L-015 outcome โ€” `won/lost_other_marina/lost_unqualified/lost_no_response/cancelled`; only writes in `interest-outcome.service.ts`; no legacy `'completed'` outcome anywhere - L-016 lead category โ€” `general_interest/specific_qualified/hot_lead`; no out-of-set writes - L-017 lead source โ€” `website/manual/referral/broker`; no out-of-set writes - L-019 doc status (`eoiDocStatus`, `reservationDocStatus`, `contractDocStatus`) โ€” `pending/sent/signed/declined/voided`; mark-externally-signed only writes `'signed'`; Documenso webhook routes all status updates through services consistent with the set - L-020 reservation/contract status โ€” `pending/active/ended/cancelled`; only writes in `reservation-state-machine.ts`