@htilabs/platform-common-models 0.9.0 → 0.12.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/config/index.cjs +4 -0
- package/dist/config/index.cjs.map +1 -1
- package/dist/config/index.d.cts +16 -1
- package/dist/config/index.d.ts +16 -1
- package/dist/config/index.js +2 -0
- package/dist/config/index.js.map +1 -1
- package/dist/constants/index.cjs +473 -182
- package/dist/constants/index.cjs.map +1 -1
- package/dist/constants/index.d.cts +1 -1
- package/dist/constants/index.d.ts +1 -1
- package/dist/constants/index.js +470 -170
- package/dist/constants/index.js.map +1 -1
- package/dist/cvc-Cp4uWnAa.d.cts +298 -0
- package/dist/cvc-Cp4uWnAa.d.ts +298 -0
- package/dist/cvcs/index.cjs +21798 -811
- package/dist/cvcs/index.cjs.map +1 -1
- package/dist/cvcs/index.d.cts +25138 -2212
- package/dist/cvcs/index.d.ts +25138 -2212
- package/dist/cvcs/index.js +21736 -810
- package/dist/cvcs/index.js.map +1 -1
- package/dist/enums/index.cjs +4557 -0
- package/dist/enums/index.cjs.map +1 -0
- package/dist/enums/index.d.cts +5257 -0
- package/dist/enums/index.d.ts +5257 -0
- package/dist/enums/index.js +4354 -0
- package/dist/enums/index.js.map +1 -0
- package/dist/index.cjs +24053 -1052
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -3072
- package/dist/index.d.ts +5 -3072
- package/dist/index.js +23928 -1039
- package/dist/index.js.map +1 -1
- package/dist/mongo/index.cjs +383 -0
- package/dist/mongo/index.cjs.map +1 -0
- package/dist/mongo/index.d.cts +221 -0
- package/dist/mongo/index.d.ts +221 -0
- package/dist/mongo/index.js +351 -0
- package/dist/mongo/index.js.map +1 -0
- package/dist/{platform-auth-XVB9aHqR.d.cts → platform-auth-Dv5fu0Fh.d.cts} +22 -77
- package/dist/{platform-auth-XVB9aHqR.d.ts → platform-auth-Dv5fu0Fh.d.ts} +22 -77
- package/dist/schemas/index.cjs +30 -157
- package/dist/schemas/index.cjs.map +1 -1
- package/dist/schemas/index.js +30 -157
- package/dist/schemas/index.js.map +1 -1
- package/dist/services/index.cjs +0 -3
- package/dist/services/index.cjs.map +1 -1
- package/dist/services/index.js +0 -3
- package/dist/services/index.js.map +1 -1
- package/dist/types/index.d.cts +2 -2
- package/dist/types/index.d.ts +2 -2
- package/dist/validation/index.cjs +58 -0
- package/dist/validation/index.cjs.map +1 -1
- package/dist/validation/index.d.cts +82 -283
- package/dist/validation/index.d.ts +82 -283
- package/dist/validation/index.js +57 -0
- package/dist/validation/index.js.map +1 -1
- package/package.json +18 -1
- package/src/__sot__/README.md +91 -0
- package/src/__sot__/coreIndicatorFields.ts +331 -0
- package/src/__sot__/coreIndicators.pin.json +2149 -0
- package/src/__sot__/cvcIndex.pin.json +272 -0
- package/src/__sot__/scoringEmits.pin.json +176 -0
- package/src/__tests__/__snapshots__/cvc-sot.snap +260 -40
- package/src/__tests__/core-information-scope-invariant.test.ts +134 -0
- package/src/__tests__/cvc-136-scoring-invariant.test.ts +328 -0
- package/src/__tests__/cvc-181-182-country-parity.test.ts +163 -0
- package/src/__tests__/cvc-drift-gate.test.ts +1036 -0
- package/src/__tests__/cvc-sot-snapshot.test.ts +191 -18
- package/src/__tests__/cvc-status-parser.test.ts +150 -0
- package/src/__tests__/cvc-structural.test.ts +70 -1
- package/src/__tests__/mongo-verifier.test.ts +502 -0
- package/src/config/index.ts +8 -2
- package/src/constants/ic.ts +629 -206
- package/src/constants/service-catalog.ts +4 -2
- package/src/cvcs/activityType.v1.0.0.json +143 -0
- package/src/cvcs/adminRoles.v1.0.0.json +153 -0
- package/src/cvcs/administeringJurisdiction.v1.0.0.json +40 -40
- package/src/cvcs/ageBinReporting.v1.0.0.json +40 -40
- package/src/cvcs/assertionDomain.v1.1.0.json +647 -0
- package/src/cvcs/assertionStatus.v1.0.0.json +80 -0
- package/src/cvcs/carCorrectionReason.v1.0.0.json +89 -0
- package/src/cvcs/caseShareState.v1.0.0.json +62 -0
- package/src/cvcs/{checkInPhase.v1.0.0.json → checkInPhase.v1.1.0.json} +20 -2
- package/src/cvcs/childChangeType.v1.0.0.json +152 -0
- package/src/cvcs/citizenship.v1.0.0.json +3062 -0
- package/src/cvcs/contactInfoTypes.v1.0.0.json +40 -40
- package/src/cvcs/contactLinkType.v1.0.0.json +89 -0
- package/src/cvcs/coreDhState.v1.0.0.json +113 -0
- package/src/cvcs/coreFunctions.v1.0.0.json +746 -0
- package/src/cvcs/coreIndicators.v1.0.0.json +2918 -0
- package/src/cvcs/coreInformationScope.v1.0.0.json +1165 -0
- package/src/cvcs/coreReferralOutcome.v1.0.0.json +71 -0
- package/src/cvcs/countries.v1.0.0.json +3077 -0
- package/src/cvcs/createdBySystem.v1.0.0.json +89 -0
- package/src/cvcs/criminalOrgCategory.v1.0.0.json +116 -0
- package/src/cvcs/determinationHelperCategories.v1.0.0.json +1166 -0
- package/src/cvcs/employmentStatus.v1.0.0.json +60 -60
- package/src/cvcs/exploitationType.v1.0.0.json +106 -0
- package/src/cvcs/facilitatorEntityType.v1.0.0.json +40 -40
- package/src/cvcs/highestEducationLevelCompleted.v1.0.0.json +55 -46
- package/src/cvcs/hivStatus.v1.0.0.json +71 -0
- package/src/cvcs/hmisCurrentLivingSituation.v1.0.0.json +409 -0
- package/src/cvcs/hmisRelationshipToHoh.v1.0.0.json +104 -0
- package/src/cvcs/homelessStatus.v1.0.0.json +27 -27
- package/src/cvcs/housingSubsidyTypes.v1.0.0.json +161 -0
- package/src/cvcs/htType.v1.0.0.json +87 -0
- package/src/cvcs/identificationStatus.v1.0.0.json +18 -0
- package/src/cvcs/immigrationLegalStatusChangeType.v1.0.0.json +143 -0
- package/src/cvcs/incarcerationEpisodeType.v1.0.0.json +106 -0
- package/src/cvcs/incidentInvolvementRoles.v1.0.0.json +40 -40
- package/src/cvcs/incidentParticipationRoles.v1.0.0.json +47 -37
- package/src/cvcs/incomeBenefitsSources.v1.0.0.json +31 -2
- package/src/cvcs/index.ts +138 -1
- package/src/cvcs/juvenileJusticeEpisodeType.v1.0.0.json +28 -18
- package/src/cvcs/juvenileJusticeInvolvementStatus.v1.0.0.json +32 -32
- package/src/cvcs/livingSituation.v1.0.0.json +213 -0
- package/src/cvcs/mentalHealthStatus.v1.0.0.json +71 -0
- package/src/cvcs/militaryBranch.v1.0.0.json +20 -20
- package/src/cvcs/militaryStatus.v1.0.0.json +20 -20
- package/src/cvcs/minorAdultStatus.v1.0.0.json +80 -0
- package/src/cvcs/nameType.v1.0.0.json +40 -40
- package/src/cvcs/needsAssessmentChangeType.v1.0.0.json +134 -0
- package/src/cvcs/offenderStatus.v1.0.0.json +40 -40
- package/src/cvcs/offenderStatusFamily.v1.0.0.json +36 -36
- package/src/cvcs/personRelationships.v1.0.0.json +67 -2
- package/src/cvcs/poPetitionBasis.v1.0.0.json +96 -0
- package/src/cvcs/poStatus.v1.0.0.json +144 -0
- package/src/cvcs/poViolationStatus.v1.0.0.json +76 -0
- package/src/cvcs/programEnrollmentChangeType.v1.0.0.json +134 -0
- package/src/cvcs/provenanceSourceId.v1.0.0.json +134 -0
- package/src/cvcs/radiusBucket.v1.0.0.json +110 -0
- package/src/cvcs/recencyBand.v1.0.0.json +104 -39
- package/src/cvcs/referralEntityCategory.v1.0.0.json +40 -40
- package/src/cvcs/referralOrigin.v1.0.0.json +26 -0
- package/src/cvcs/relationshipConcern.v1.0.0.json +123 -0
- package/src/cvcs/riskCategory.v1.0.0.json +134 -0
- package/src/cvcs/riskIdentificationMilestone.v1.0.0.json +109 -0
- package/src/cvcs/riskSeverityBand.v1.0.0.json +139 -0
- package/src/cvcs/roiMethod.v1.0.0.json +107 -0
- package/src/cvcs/roiScope.v1.0.0.json +296 -0
- package/src/cvcs/roiStatus.v1.0.0.json +106 -0
- package/src/cvcs/romanticRelationshipChangeType.v1.0.0.json +162 -0
- package/src/cvcs/serviceAudience.v1.0.0.json +96 -0
- package/src/cvcs/serviceCategories.v1.0.0.json +44 -44
- package/src/cvcs/serviceDeliveryChannel.v1.0.0.json +147 -0
- package/src/cvcs/serviceMechanisms.v1.0.0.json +36 -36
- package/src/cvcs/serviceStates.v1.0.0.json +55 -33
- package/src/cvcs/sessionNoteVisibility.v1.0.0.json +80 -0
- package/src/cvcs/sessionTemplate.v1.0.0.json +283 -0
- package/src/cvcs/sexProviderSubrole.v1.0.0.json +35 -28
- package/src/cvcs/sharePurpose.v1.0.0.json +80 -12
- package/src/cvcs/smtType.v1.0.0.json +40 -40
- package/src/cvcs/sourceCategory.v1.1.0.json +8 -1
- package/src/cvcs/sourceInstrument.v1.0.0.json +458 -0
- package/src/cvcs/sourceSubtype.v1.1.0.json +36 -0
- package/src/cvcs/sourceSystem.v1.0.0.json +203 -0
- package/src/cvcs/specialNeedsDisabilities.v1.0.0.json +143 -0
- package/src/cvcs/subjectType.v1.0.0.json +80 -0
- package/src/cvcs/suggestionSource.v1.0.0.json +71 -0
- package/src/cvcs/traffickingRelevantRole.v1.0.0.json +104 -0
- package/src/cvcs/userRoles.v1.0.0.json +203 -0
- package/src/cvcs/verificationMethod.v1.0.0.json +18 -0
- package/src/cvcs/victimAbuseTypes.v1.0.0.json +276 -0
- package/src/cvcs/victimStatusFamily.v1.0.0.json +40 -40
- package/src/cvcs/whyNots.v1.0.0.json +385 -0
- package/src/generated/cvc-enums.ts +2318 -10
- package/src/mongo/catalog.ts +65 -0
- package/src/mongo/contract.ts +157 -0
- package/src/mongo/index.ts +343 -0
- package/src/mongo/similarity.ts +133 -0
- package/src/mongo/uri.ts +53 -0
- package/src/services/cvcRegistryService.ts +1 -1
- package/src/validation/cvcStatus.ts +209 -0
- package/src/validation/index.ts +1 -0
|
@@ -61,15 +61,17 @@ const SOT_SPECS: readonly SotSpec[] = [
|
|
|
61
61
|
// Spec §8.3 — "Entries: 4" + 4 missingness = 8
|
|
62
62
|
{ file: "serviceMechanisms.v1.0.0.json", domain: "service_mechanisms", expectedCount: 8 },
|
|
63
63
|
// Spec §8.2 — "Entries: 10" + 4 missingness = 14; +1 (`unable_other_reason`
|
|
64
|
-
// additive per Thread Phase-0 SOT Block D) = 15
|
|
65
|
-
|
|
64
|
+
// additive per Thread Phase-0 SOT Block D) = 15; +2 PROVISIONAL attempt-reason
|
|
65
|
+
// buckets (`unable_to_provide_service_fit`, `unable_to_provide_access_barrier`)
|
|
66
|
+
// for the Thread th-epqet.3 7-bucket lifecycle = 17.
|
|
67
|
+
{ file: "serviceStates.v1.0.0.json", domain: "service_states", expectedCount: 17 },
|
|
66
68
|
// Spec §8.1 — "Entries: 147" + 4 missingness = 151
|
|
67
69
|
{ file: "serviceCategories.v1.0.0.json", domain: "service_categories", expectedCount: 151 },
|
|
68
|
-
// CVC-69 — 4 group parents +
|
|
70
|
+
// CVC-69 — 4 group parents + 12 role leaves + 4 missingness = 20
|
|
69
71
|
{
|
|
70
72
|
file: "incidentParticipationRoles.v1.0.0.json",
|
|
71
73
|
domain: "incident_participation_roles",
|
|
72
|
-
expectedCount:
|
|
74
|
+
expectedCount: 20,
|
|
73
75
|
},
|
|
74
76
|
// CVC-130 — 6 flat role leaves + 4 missingness = 10
|
|
75
77
|
{
|
|
@@ -225,12 +227,13 @@ const SOT_SPECS: readonly SotSpec[] = [
|
|
|
225
227
|
domain: "contact_safety_status",
|
|
226
228
|
expectedCount: 6,
|
|
227
229
|
},
|
|
228
|
-
// CVC-180 — 7 flat Level-1 Census/ACS attainment entries + 1
|
|
229
|
-
//
|
|
230
|
+
// CVC-180 — 7 flat Level-1 Census/ACS attainment entries + 1 additive
|
|
231
|
+
// `trade_vocational` non-degree credential leaf (180-008) + 1 missingness
|
|
232
|
+
// root + 4 canonical missingness children (includes PNA) = 13.
|
|
230
233
|
{
|
|
231
234
|
file: "highestEducationLevelCompleted.v1.0.0.json",
|
|
232
235
|
domain: "highest_education_level_completed",
|
|
233
|
-
expectedCount:
|
|
236
|
+
expectedCount: 13,
|
|
234
237
|
},
|
|
235
238
|
// CVC-185 — 4 flat preferred-contact-method entries. No missingness entries
|
|
236
239
|
// (variant 0 per Notion: absence encodes "no preference") = 4.
|
|
@@ -239,12 +242,18 @@ const SOT_SPECS: readonly SotSpec[] = [
|
|
|
239
242
|
domain: "preferred_contact_method",
|
|
240
243
|
expectedCount: 4,
|
|
241
244
|
},
|
|
242
|
-
// CVC-84 —
|
|
243
|
-
//
|
|
245
|
+
// CVC-84 — 12 flat Level-1 intent-based share purposes: the 8 `wing: core`
|
|
246
|
+
// rows from `core_share_purpose.yaml` + the 4 `wing: leads` rows from
|
|
247
|
+
// `core_share_purpose_extensions_leads.yaml`, which canon's own
|
|
248
|
+
// `build_sharing_purpose_catalog.py` joins into one 12-row catalog. The wing
|
|
249
|
+
// rows were RATIFIED 2026-07-03 and live-synced 2026-08-19, so they are canon,
|
|
250
|
+
// not proposals. This count was 8 while only the core file had been ported.
|
|
251
|
+
// No missingness sentinels (variant 0, share_purpose is always known at
|
|
252
|
+
// sharing time) = 12.
|
|
244
253
|
{
|
|
245
254
|
file: "sharePurpose.v1.0.0.json",
|
|
246
255
|
domain: "share_purpose",
|
|
247
|
-
expectedCount:
|
|
256
|
+
expectedCount: 12,
|
|
248
257
|
},
|
|
249
258
|
// CVC-165 — 10 flat Level-1 entity/establishment types (Notion codebook DB,
|
|
250
259
|
// v1.0) + 1 missingness root + 3 canonical missingness children (no PNA;
|
|
@@ -329,11 +338,17 @@ const SOT_SPECS: readonly SotSpec[] = [
|
|
|
329
338
|
// L0 missingness (anonymous, data_not_collected; Notion codebook explicitly
|
|
330
339
|
// omits `unknown` at L0 — the L2 `relationship_unknown` code carries that
|
|
331
340
|
// semantic instead; no PNA) + 8 L1 topics + 35 L2 canonical relationship
|
|
332
|
-
// types + 40 L3 directional role labels + 3 L3 pet-branch roles = 89
|
|
341
|
+
// types + 40 L3 directional role labels + 3 L3 pet-branch roles = 89,
|
|
342
|
+
// + 3 L2 LOCAL EXTENSIONS (`parental_figure_dependent`,
|
|
343
|
+
// `intimate_romantic_partner`, `intimate_partner_prior`) + 2 L3 directional
|
|
344
|
+
// roles under `parental_figure_dependent` = 94. All 5 are flagged
|
|
345
|
+
// `localExtension: true`; the canonical picker (prototype@622410b
|
|
346
|
+
// REL_CATEGORIES) offers them and the Notion-side export does not yet carry
|
|
347
|
+
// them. See the file's `_status.localExtension`.
|
|
333
348
|
{
|
|
334
349
|
file: "personRelationships.v1.0.0.json",
|
|
335
350
|
domain: "person_relationships",
|
|
336
|
-
expectedCount:
|
|
351
|
+
expectedCount: 94,
|
|
337
352
|
},
|
|
338
353
|
// CVC-179 — employment_status: 1 missingness_root + 5 HMIS missingness
|
|
339
354
|
// (unknown, anonymous, data_not_collected, client_doesnt_know,
|
|
@@ -363,11 +378,14 @@ const SOT_SPECS: readonly SotSpec[] = [
|
|
|
363
378
|
domain: "referral_entity_category",
|
|
364
379
|
expectedCount: 43,
|
|
365
380
|
},
|
|
366
|
-
// CVC-171 — 5 L1 type groups +
|
|
381
|
+
// CVC-171 — 5 L1 type groups + 30 L2 source codes + 1 additive L1
|
|
382
|
+
// `victim_compensation` group leaf (171-006) + 5 missingness = 41.
|
|
383
|
+
// Additive orphan leaves: informal_income (171-001-002) under earned_income
|
|
384
|
+
// and family_friend_support (171-004-003) under transfer_support.
|
|
367
385
|
{
|
|
368
386
|
file: "incomeBenefitsSources.v1.0.0.json",
|
|
369
387
|
domain: "income_benefits_sources",
|
|
370
|
-
expectedCount:
|
|
388
|
+
expectedCount: 41,
|
|
371
389
|
},
|
|
372
390
|
// CVC-175 — 8 flat Level-1 enrollment lifecycle statuses + 1 missingness
|
|
373
391
|
// root + 3 canonical missingness children = 12.
|
|
@@ -410,7 +428,7 @@ const SOT_SPECS: readonly SotSpec[] = [
|
|
|
410
428
|
{
|
|
411
429
|
file: "sourceSubtype.v1.1.0.json",
|
|
412
430
|
domain: "source_subtype",
|
|
413
|
-
expectedCount:
|
|
431
|
+
expectedCount: 39,
|
|
414
432
|
},
|
|
415
433
|
// CVC-139 — support_strength (formerly evidence_tier). 7 substantive Level-1
|
|
416
434
|
// entries + 1 missingness root + 3 canonical missingness children = 11.
|
|
@@ -448,7 +466,7 @@ const SOT_SPECS: readonly SotSpec[] = [
|
|
|
448
466
|
{
|
|
449
467
|
file: "verificationMethod.v1.0.0.json",
|
|
450
468
|
domain: "verification_method",
|
|
451
|
-
expectedCount:
|
|
469
|
+
expectedCount: 11,
|
|
452
470
|
},
|
|
453
471
|
// CVC-144 — quality_flags. 5 substantive Level-1 entries
|
|
454
472
|
// (circular_model_label_risk, data_redacted, inconsistent, self_report_only,
|
|
@@ -486,7 +504,7 @@ const SOT_SPECS: readonly SotSpec[] = [
|
|
|
486
504
|
{ file: "announcementResponseType.v1.0.0.json", domain: "announcement_response_type", expectedCount: 8 },
|
|
487
505
|
{ file: "basisQuickPicks.v1.0.0.json", domain: "basis_quick_picks", expectedCount: 11 },
|
|
488
506
|
{ file: "checkInActivity.v1.0.0.json", domain: "check_in_activity", expectedCount: 24 },
|
|
489
|
-
{ file: "checkInPhase.v1.
|
|
507
|
+
{ file: "checkInPhase.v1.1.0.json", domain: "check_in_phase", expectedCount: 17 },
|
|
490
508
|
{ file: "childBehavioralConcerns.v1.0.0.json", domain: "child_behavioral_concerns", expectedCount: 16 },
|
|
491
509
|
{ file: "childCustodyArrangement.v1.0.0.json", domain: "child_custody_arrangement", expectedCount: 19 },
|
|
492
510
|
{ file: "collectionContext.v1.0.0.json", domain: "collection_context", expectedCount: 8 },
|
|
@@ -511,7 +529,7 @@ const SOT_SPECS: readonly SotSpec[] = [
|
|
|
511
529
|
{ file: "hopeScaleCaptureContext.v1.0.0.json", domain: "hope_scale_capture_context", expectedCount: 11 },
|
|
512
530
|
{ file: "hopeScaleResponseOptions.v1.0.0.json", domain: "hope_scale_response_options", expectedCount: 12 },
|
|
513
531
|
{ file: "hopeScaleTier.v1.0.0.json", domain: "hope_scale_tier", expectedCount: 8 },
|
|
514
|
-
{ file: "identificationStatus.v1.0.0.json", domain: "identification_status", expectedCount:
|
|
532
|
+
{ file: "identificationStatus.v1.0.0.json", domain: "identification_status", expectedCount: 9 },
|
|
515
533
|
{ file: "investigativeRequestType.v1.0.0.json", domain: "investigative_request_type", expectedCount: 8 },
|
|
516
534
|
{ file: "languages.v1.0.0.json", domain: "languages", expectedCount: 212 },
|
|
517
535
|
{ file: "leReportStatus.v1.0.0.json", domain: "le_report_status", expectedCount: 8 },
|
|
@@ -543,6 +561,161 @@ const SOT_SPECS: readonly SotSpec[] = [
|
|
|
543
561
|
{ file: "threadType.v1.0.0.json", domain: "thread_type", expectedCount: 9 },
|
|
544
562
|
{ file: "verificationStatus.v1.0.0.json", domain: "verification_status", expectedCount: 7 },
|
|
545
563
|
{ file: "visaType.v1.0.0.json", domain: "visa_type", expectedCount: 40 },
|
|
564
|
+
// ─── Net-new additive domains (CVC author missing-domains batch) ───
|
|
565
|
+
// CVC-192 living_situation — 18 HMIS living-situation values + 1
|
|
566
|
+
// missingness root + 3 canonical missingness children = 22.
|
|
567
|
+
{ file: "livingSituation.v1.0.0.json", domain: "living_situation", expectedCount: 22 },
|
|
568
|
+
// CVC-45 service_audience — 5 audience values (primary_victim,
|
|
569
|
+
// eligible_family_member, third_party, offender, personnel) + 1
|
|
570
|
+
// missingness root + 3 canonical missingness children = 9.
|
|
571
|
+
{ file: "serviceAudience.v1.0.0.json", domain: "service_audience", expectedCount: 9 },
|
|
572
|
+
// CVC-129 hmis_relationship_to_hoh — 5 HMIS 3.15 relationship codes + 1
|
|
573
|
+
// missingness root + 3 canonical missingness children = 9. Entries carry
|
|
574
|
+
// an `hmisCode` passthrough field (HMIS numerics 1/2/3/4/5/99).
|
|
575
|
+
{ file: "hmisRelationshipToHoh.v1.0.0.json", domain: "hmis_relationship_to_hoh", expectedCount: 9 },
|
|
576
|
+
// CVC-73 victim_abuse_types — 25 non-HT VOCA abuse types + 1 missingness
|
|
577
|
+
// root + 3 canonical missingness children = 29.
|
|
578
|
+
{ file: "victimAbuseTypes.v1.0.0.json", domain: "victim_abuse_types", expectedCount: 29 },
|
|
579
|
+
// CVC-72 ht_type — 4 substantive types (sex, labor, sex_and_labor, none;
|
|
580
|
+
// `none` = negative determination, canonical per Crysta directive 2026-05-27)
|
|
581
|
+
// + 1 missingness root + 3 canonical missingness children = 8.
|
|
582
|
+
{ file: "htType.v1.0.0.json", domain: "ht_type", expectedCount: 8 },
|
|
583
|
+
// PROVISIONAL CVC-991 relationship_concern — 7 TRA relationship-concern
|
|
584
|
+
// codes + 1 missingness root + 3 canonical missingness children = 11.
|
|
585
|
+
// CVC number is PROVISIONAL pending codebook-session ratification.
|
|
586
|
+
// RENUMBERED 231 -> 991 on 2026-08-29: CVC-231 was ratified to the
|
|
587
|
+
// Determination Helper categories (Jevon, 2026-08-28), so the provisional
|
|
588
|
+
// mint this domain held out of the canonical block vacates to the 900-block.
|
|
589
|
+
// Count is unchanged — the renumber is a pure segment-1 prefix substitution.
|
|
590
|
+
{ file: "relationshipConcern.v1.0.0.json", domain: "relationship_concern", expectedCount: 11 },
|
|
591
|
+
// CVC-137 recency_band — the CANONICAL 8-band key system adopted in 0.8.13
|
|
592
|
+
// (w3m, m3_6, m6_12, y1p, y1_3, y3_10, y10p, ylt3 — the lowercase
|
|
593
|
+
// transliterations of W3M/M3_6/M6_12/Y1P/Y1_3/Y3_10/Y10P/YLT3, carried
|
|
594
|
+
// verbatim in `canonicalCode`) + 1 missingness root + 3 canonical missingness
|
|
595
|
+
// children = 12. Replaces the 6 semantic slugs shipped before 0.8.13; all 6
|
|
596
|
+
// map 1:1 onto a canonical band, and y1_3 / ylt3 are net-new.
|
|
597
|
+
{ file: "recencyBand.v1.0.0.json", domain: "recency_band", expectedCount: 12 },
|
|
598
|
+
// PROVISIONAL CVC-233 housing_subsidy_types — 12 HMIS-aligned subsidy types
|
|
599
|
+
// (housing_choice_voucher, public_housing, project_based_rental_assistance,
|
|
600
|
+
// permanent_supportive_housing, rapid_rehousing_assistance,
|
|
601
|
+
// other_housing_subsidy, no_subsidy, plus additive va_supportive_housing,
|
|
602
|
+
// grant_per_diem_transition_in_place, housing_stability_voucher,
|
|
603
|
+
// family_unification_program, foster_youth_to_independence) + 1 missingness
|
|
604
|
+
// root + 3 canonical missingness children = 16. CVC number is PROVISIONAL
|
|
605
|
+
// pending ratification.
|
|
606
|
+
{ file: "housingSubsidyTypes.v1.0.0.json", domain: "housing_subsidy_types", expectedCount: 16 },
|
|
607
|
+
// 68 -> 75: the 2026-08-29 signal-identification ratification adds two Level-1
|
|
608
|
+
// domains (signal_identification 159-066, investigative_legal 159-067) plus the
|
|
609
|
+
// five identification-funnel rungs as their Level-2 value rows.
|
|
610
|
+
// 75 -> 70: the five identification-funnel rungs move OUT of CVC-159 into
|
|
611
|
+
// their own vocabulary (riskIdentificationMilestone, CVC-267). CVC-159 keeps
|
|
612
|
+
// the two new Level-1 DOMAINS only — AssertionDomainKeys is the set of
|
|
613
|
+
// domains, and a value folded into it makes `on_radar` demand a domain
|
|
614
|
+
// classification in every downstream totality gate.
|
|
615
|
+
{ file: "assertionDomain.v1.1.0.json", domain: "assertion_domain", expectedCount: 70 },
|
|
616
|
+
{ file: "activityType.v1.0.0.json", domain: "activity_type", expectedCount: 14 },
|
|
617
|
+
{ file: "provenanceSourceId.v1.0.0.json", domain: "provenance_source_id", expectedCount: 13 },
|
|
618
|
+
{ file: "radiusBucket.v1.0.0.json", domain: "radius_bucket", expectedCount: 9 },
|
|
619
|
+
{ file: "contactLinkType.v1.0.0.json", domain: "contact_link_type", expectedCount: 8 },
|
|
620
|
+
{ file: "suggestionSource.v1.0.0.json", domain: "suggestion_source", expectedCount: 6 },
|
|
621
|
+
{ file: "roiMethod.v1.0.0.json", domain: "roi_method", expectedCount: 10 },
|
|
622
|
+
{ file: "sessionNoteVisibility.v1.0.0.json", domain: "session_note_visibility", expectedCount: 7 },
|
|
623
|
+
// DRAFT-TEMPORARY prototype direct-imports (0.8.9; provisional 900+ ids; pending Notion ratification).
|
|
624
|
+
{ file: "specialNeedsDisabilities.v1.0.0.json", domain: "special_needs_disabilities", expectedCount: 14 },
|
|
625
|
+
{ file: "hivStatus.v1.0.0.json", domain: "hiv_status", expectedCount: 6 },
|
|
626
|
+
{ file: "mentalHealthStatus.v1.0.0.json", domain: "mental_health_status", expectedCount: 6 },
|
|
627
|
+
{ file: "childChangeType.v1.0.0.json", domain: "child_change_type", expectedCount: 15 },
|
|
628
|
+
{ file: "immigrationLegalStatusChangeType.v1.0.0.json", domain: "immigration_legal_status_change_type", expectedCount: 14 },
|
|
629
|
+
{ file: "programEnrollmentChangeType.v1.0.0.json", domain: "program_enrollment_change_type", expectedCount: 13 },
|
|
630
|
+
{ file: "romanticRelationshipChangeType.v1.0.0.json", domain: "romantic_relationship_change_type", expectedCount: 16 },
|
|
631
|
+
// ─── Risk taxonomy (names-only projection of the @hti/scoring SOT) ───
|
|
632
|
+
// 9 categories (`I`..`IX`, tree[].kind === "category") + 4 missingness = 13
|
|
633
|
+
{ file: "riskCategory.v1.0.0.json", domain: "risk_category", expectedCount: 13 },
|
|
634
|
+
// 5 bands (severe/elevated/review/watch/stable — `stable` is the cutoff-less
|
|
635
|
+
// fall-through floor, so the count is 5, NOT the 4 numeric BandCutoffs
|
|
636
|
+
// fields) + 4 missingness = 9
|
|
637
|
+
// ─── 0.8.12 vocabulary batch ───
|
|
638
|
+
// CANONICAL Notion CVC-133 `core - functions` (verified v1.0): 77 functions
|
|
639
|
+
// + 4 missingness = 81
|
|
640
|
+
{ file: "coreFunctions.v1.0.0.json", domain: "core_functions", expectedCount: 81 },
|
|
641
|
+
// 9 fine-grained Needs-Assessment CAR change types (@pave/domain
|
|
642
|
+
// NEEDS_ASSESSMENT_CHANGE_TYPES, casing normalized to lower_snake) + 4 = 13
|
|
643
|
+
{ file: "needsAssessmentChangeType.v1.0.0.json", domain: "needs_assessment_change_type", expectedCount: 13 },
|
|
644
|
+
// 15 ROI scope items (@pave/domain ROI_SCOPE_KEYS — the PAVE-seed-attested
|
|
645
|
+
// subset of the prototype's 27-item UI superset) + 4 = 19
|
|
646
|
+
{ file: "roiScope.v1.0.0.json", domain: "roi_scope", expectedCount: 31 },
|
|
647
|
+
// 5 stored-ROI lifecycle states (@pave/domain ROI_STATUSES) + 4 = 9
|
|
648
|
+
{ file: "roiStatus.v1.0.0.json", domain: "roi_status", expectedCount: 9 },
|
|
649
|
+
// 2 HMIS FY2026 "P2 Referrals Provided" outcomes (attained / not_attained)
|
|
650
|
+
// + 4 = 6. The not-attained REASON is a separate axis, not folded in here.
|
|
651
|
+
{ file: "coreReferralOutcome.v1.0.0.json", domain: "core_referral_outcome", expectedCount: 6 },
|
|
652
|
+
// ─── 0.8.13 canonical CVC batch ───
|
|
653
|
+
{ file: "coreDhState.v1.0.0.json", domain: "dh_state", expectedCount: 9 },
|
|
654
|
+
// 0.8.14: 214 -> 219 (catalog refresh a596eb9 -> 84a1b67; +5 mints, 0 withdrawn).
|
|
655
|
+
// 622410b refresh: 219 -> 220 (catalog refresh 84a1b67 -> 622410b; +1 mint, 0 withdrawn).
|
|
656
|
+
{ file: "coreIndicators.v1.0.0.json", domain: "core_indicators", expectedCount: 220 },
|
|
657
|
+
{ file: "riskSeverityBand.v1.0.0.json", domain: "risk_severity_band", expectedCount: 9 },
|
|
658
|
+
{ file: "adminRoles.v1.0.0.json", domain: "admin_roles", expectedCount: 14 },
|
|
659
|
+
{ file: "userRoles.v1.0.0.json", domain: "user_roles", expectedCount: 19 },
|
|
660
|
+
{ file: "hmisCurrentLivingSituation.v1.0.0.json", domain: "hmis_current_living_situation", expectedCount: 33 },
|
|
661
|
+
{ file: "juvenileJusticeEpisodeType.v1.0.0.json", domain: "juvenile_justice_episode_type", expectedCount: 9 },
|
|
662
|
+
{ file: "incarcerationEpisodeType.v1.0.0.json", domain: "incarceration_episode_type", expectedCount: 9 },
|
|
663
|
+
{ file: "exploitationType.v1.0.0.json", domain: "exploitation_type", expectedCount: 9 },
|
|
664
|
+
{ file: "sourceSystem.v1.0.0.json", domain: "source_system", expectedCount: 19 },
|
|
665
|
+
{ file: "sourceInstrument.v1.0.0.json", domain: "source_instrument", expectedCount: 41 },
|
|
666
|
+
{ file: "poPetitionBasis.v1.0.0.json", domain: "po_petition_basis", expectedCount: 8 },
|
|
667
|
+
{ file: "poStatus.v1.0.0.json", domain: "po_status", expectedCount: 12 },
|
|
668
|
+
{ file: "poViolationStatus.v1.0.0.json", domain: "po_violation_status", expectedCount: 6 },
|
|
669
|
+
// 0.8.23: 23 -> 25 — CVC-217 gained cst_pave_inbound_share (217-020) +
|
|
670
|
+
// cst_thread_inbound_share (217-021), the cross-app Inbound Share template pair.
|
|
671
|
+
{ file: "sessionTemplate.v1.0.0.json", domain: "session_template", expectedCount: 25 },
|
|
672
|
+
{ file: "serviceDeliveryChannel.v1.0.0.json", domain: "service_delivery_channel", expectedCount: 11 },
|
|
673
|
+
{ file: "whyNots.v1.0.0.json", domain: "why_nots", expectedCount: 32 },
|
|
674
|
+
// CVC-182 — 249 countries (codes MINTED; upstream Code column is blank) + 1
|
|
675
|
+
// missingness root + 3 canonical missingness children (Unknown / Declined to
|
|
676
|
+
// asnwer / Not collected, carried verbatim from the codebook) = 253.
|
|
677
|
+
{ file: "citizenship.v1.0.0.json", domain: "citizenship", expectedCount: 253 },
|
|
678
|
+
// CVC-181 — the SAME 249 countries (identical keys + ISO codes; asserted by
|
|
679
|
+
// cvc-181-182-country-parity.test.ts) + 1 missingness root + 3 workspace-
|
|
680
|
+
// standard missingness children (this codebook carries none of its own) + the
|
|
681
|
+
// 1 authored `non_us_unspecified` local extension = 254. The +1 over CVC-182
|
|
682
|
+
// is that local extension, and nothing else.
|
|
683
|
+
{ file: "countries.v1.0.0.json", domain: "countries", expectedCount: 254 },
|
|
684
|
+
// CVC-231 — the Determination Helper category taxonomy: 53 canonical rows
|
|
685
|
+
// across the four sections (§ I Subject and Scope 5 · § II Activity 20 ·
|
|
686
|
+
// § III Means 24 · § IV Status 4) + 1 missingness root + 3 workspace-standard
|
|
687
|
+
// missingness children (this codebook carries none of its own) = 57. ALL 53 are
|
|
688
|
+
// selectable, including the 10 non-leaf rows — the canonical
|
|
689
|
+
// feeds_dh_subdomain_crossref addresses parent rows directly, so a
|
|
690
|
+
// category/leaf split would orphan those references.
|
|
691
|
+
{
|
|
692
|
+
file: "determinationHelperCategories.v1.0.0.json",
|
|
693
|
+
domain: "determination_helper_categories",
|
|
694
|
+
expectedCount: 57,
|
|
695
|
+
},
|
|
696
|
+
// CVC-235 — 4 L1 trafficking-relevant roles + 1 missingness root + 3 canonical
|
|
697
|
+
// missingness children = 8.
|
|
698
|
+
{
|
|
699
|
+
file: "traffickingRelevantRole.v1.0.0.json",
|
|
700
|
+
domain: "trafficking_relevant_role",
|
|
701
|
+
expectedCount: 8,
|
|
702
|
+
},
|
|
703
|
+
// ─── GDR §10.1 CAR-contract vocabularies (provisional 900-block; PAVE
|
|
704
|
+
// @pave/domain verbatim; bead pv-pgdr-cvc-source-gdr-10-1-bulk-publish). ───
|
|
705
|
+
// 3 lifecycle states (@pave/domain ASSERTION_STATUSES) + 4 missingness = 7
|
|
706
|
+
{ file: "assertionStatus.v1.0.0.json", domain: "assertion_status", expectedCount: 7 },
|
|
707
|
+
// 4 correction/retraction reasons (@pave/domain CAR_CORRECTION_REASONS —
|
|
708
|
+
// entered_in_error, duplicate, superseded_externally — plus
|
|
709
|
+
// removed_by_recipient_curation for the CaseShare curation lane) + 4
|
|
710
|
+
// missingness = 8
|
|
711
|
+
{ file: "carCorrectionReason.v1.0.0.json", domain: "car_correction_reason", expectedCount: 8 },
|
|
712
|
+
// 4 actor classes (@pave/domain CREATED_BY_SYSTEMS) + 4 missingness = 8
|
|
713
|
+
{ file: "createdBySystem.v1.0.0.json", domain: "created_by_system", expectedCount: 8 },
|
|
714
|
+
// 3 entity kinds (@pave/domain SUBJECT_TYPES) + 4 missingness = 7
|
|
715
|
+
{ file: "subjectType.v1.0.0.json", domain: "subject_type", expectedCount: 7 },
|
|
716
|
+
// 3 substantive age bands (@pave/domain AGE_BANDS_AT_EVENT minus `unknown`,
|
|
717
|
+
// which maps to the missingness sentinel) + 4 missingness = 7
|
|
718
|
+
{ file: "minorAdultStatus.v1.0.0.json", domain: "minor_adult_status", expectedCount: 7 },
|
|
546
719
|
] as const;
|
|
547
720
|
|
|
548
721
|
// ─── Helpers ────────────────────────────────────────────────────────────────
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CVC `_status`/`_source` provenance parser — unit tests
|
|
3
|
+
*
|
|
4
|
+
* Every fixture string below is copied verbatim from a real, committed SOT
|
|
5
|
+
* file under `src/cvcs/` (not invented) — see the inline citation on each
|
|
6
|
+
* `it()` for the source file, so a reader can `grep` back to the original.
|
|
7
|
+
* Covers every branch `parseCvcStatus` exists to handle: the four maturity
|
|
8
|
+
* states, the structured-object `_status` shape (11 domains), the
|
|
9
|
+
* leading-token fallback (`share_purpose`'s "Synced…" — the one domain whose
|
|
10
|
+
* leading word is none of the three convention keywords), the
|
|
11
|
+
* self-contradictory `core_functions` case the parser is specifically
|
|
12
|
+
* designed to flag, and the `prototype/data/cvcs/*.yaml` source-path
|
|
13
|
+
* extraction.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
import { describe, it, expect } from "vitest";
|
|
17
|
+
|
|
18
|
+
import { parseCvcStatus } from "../validation/cvcStatus.js";
|
|
19
|
+
|
|
20
|
+
describe("parseCvcStatus", () => {
|
|
21
|
+
it("classifies a DRAFT domain (accommodation_type, src/cvcs/accommodationType.v1.0.0.json)", () => {
|
|
22
|
+
const result = parseCvcStatus({
|
|
23
|
+
_status:
|
|
24
|
+
"DRAFT — TEMPORARY: net-new value-CVC not yet in Notion; provisional 900+ numbering; " +
|
|
25
|
+
"codes from prototype/data/cvcs/core_accommodation_type.yaml; PENDING canonical Notion " +
|
|
26
|
+
"authoring (PAVE Auditability backlog).",
|
|
27
|
+
_source: "prototype/data/cvcs/core_accommodation_type.yaml",
|
|
28
|
+
});
|
|
29
|
+
expect(result.maturity).toBe("draft");
|
|
30
|
+
expect(result.ambiguous).toBe(false);
|
|
31
|
+
expect(result.sourceIsPrototype).toBe(true);
|
|
32
|
+
expect(result.sourcePath).toBe("prototype/data/cvcs/core_accommodation_type.yaml");
|
|
33
|
+
expect(result.rawStatus).toContain("DRAFT — TEMPORARY");
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
it("classifies a PROVISIONAL domain (activity_type, src/cvcs/activityType.v1.0.0.json)", () => {
|
|
37
|
+
const result = parseCvcStatus({
|
|
38
|
+
_status:
|
|
39
|
+
"PROVISIONAL — net-new value-CVC not yet in Notion; provisional 900+ numbering; " +
|
|
40
|
+
"substantive values sourced verbatim from the PAVE @pave/domain enum of the same name " +
|
|
41
|
+
"(D10 source-from-platform-common). PENDING canonical Notion authoring + steward " +
|
|
42
|
+
"ratification of titles/definitions.",
|
|
43
|
+
_source: "pave-2.0/packages/domain/src/enums.ts",
|
|
44
|
+
});
|
|
45
|
+
expect(result.maturity).toBe("provisional");
|
|
46
|
+
expect(result.ambiguous).toBe(false);
|
|
47
|
+
// Cited source is a PAVE TS enum, not a prototype YAML dump.
|
|
48
|
+
expect(result.sourceIsPrototype).toBe(false);
|
|
49
|
+
expect(result.sourcePath).toBeNull();
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
it("classifies a CANONICAL provenance-note domain as its own maturity, not 'draft'/'final' (admin_roles, src/cvcs/adminRoles.v1.0.0.json)", () => {
|
|
53
|
+
const result = parseCvcStatus({
|
|
54
|
+
_status:
|
|
55
|
+
"CANONICAL — imported 0.8.13 from the Notion Final CVC codebook (CVC-134 `core - admin " +
|
|
56
|
+
"roles`, Owner Crysta Price, Status 'Drafted - Needs Review'). Administrative role " +
|
|
57
|
+
"vocabulary for the canonical authorization model (IC-66). DISTINCT from CVC-135 " +
|
|
58
|
+
"`user_roles` (the operational/practitioner role axis) — a person may hold both.",
|
|
59
|
+
_source:
|
|
60
|
+
"htilabstech/prototype@a596eb9 Final CVCs/System Roles, Permissions, & Account " +
|
|
61
|
+
"Management (IC-66)/core - admin roles (CVC-134)",
|
|
62
|
+
});
|
|
63
|
+
// A "CANONICAL" leading marker is a provenance note on an ALREADY-ratified
|
|
64
|
+
// file — kept as its own state, distinct from "final" (the absent-field
|
|
65
|
+
// legacy case), so a caller can tell "explicitly marked ratified" apart
|
|
66
|
+
// from "predates the convention entirely".
|
|
67
|
+
expect(result.maturity).toBe("canonical");
|
|
68
|
+
expect(result.ambiguous).toBe(false);
|
|
69
|
+
expect(result.sourceIsPrototype).toBe(false);
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
it("classifies an absent `_status` as 'final' — legacy/unmarked, predates the convention (administering_jurisdiction, src/cvcs/administeringJurisdiction.v1.0.0.json)", () => {
|
|
73
|
+
const result = parseCvcStatus({});
|
|
74
|
+
expect(result.maturity).toBe("final");
|
|
75
|
+
expect(result.rawStatus).toBeNull();
|
|
76
|
+
expect(result.ambiguous).toBe(false);
|
|
77
|
+
expect(result.sourceIsPrototype).toBe(false);
|
|
78
|
+
expect(result.sourcePath).toBeNull();
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
it("flags the self-contradictory core_functions case as ambiguous, generically — not a special case for this one domain (src/cvcs/coreFunctions.v1.0.0.json)", () => {
|
|
82
|
+
const result = parseCvcStatus({
|
|
83
|
+
_status:
|
|
84
|
+
"DRAFTED — NEEDS REVIEW: canonical Notion CVC-133 (core - functions), verified v1.0, " +
|
|
85
|
+
"ported verbatim from the Notion codebook. Canonical numbering (133), NOT provisional. " +
|
|
86
|
+
"Per-entry lifecycle Status (v1 / future / not-started) is carried in each definition.",
|
|
87
|
+
_source: "Notion CVC-133 core - functions (collection://3211ef14-abcd-8024-867d-000be4b35a79)",
|
|
88
|
+
});
|
|
89
|
+
// Leading token "DRAFTED" still drives the primary classification…
|
|
90
|
+
expect(result.maturity).toBe("draft");
|
|
91
|
+
// …but the string also asserts "NOT provisional" later on, which the
|
|
92
|
+
// parser catches generically (scans the whole string for a negated
|
|
93
|
+
// maturity keyword) rather than via a domain-name special case, so any
|
|
94
|
+
// future domain authored in this same self-contradictory shape is also
|
|
95
|
+
// caught automatically.
|
|
96
|
+
expect(result.ambiguous).toBe(true);
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
it("falls back to a whole-string keyword scan when the leading token is none of the three convention words (share_purpose, src/cvcs/sharePurpose.v1.0.0.json)", () => {
|
|
100
|
+
const result = parseCvcStatus({
|
|
101
|
+
_status:
|
|
102
|
+
"Synced verbatim from canonical CVC-84 (renamed `core-sharing_purpose` 2026-08-19). " +
|
|
103
|
+
"8 core rows from `core_share_purpose.yaml` + 4 LEADS-wing rows from " +
|
|
104
|
+
"`core_share_purpose_extensions_leads.yaml`… The wing rows were RATIFIED 2026-07-03 " +
|
|
105
|
+
"and live-synced 2026-08-19 (no longer proposal-only).",
|
|
106
|
+
_source: "htilabstech/prototype data/cvcs/core_share_purpose.yaml + core_share_purpose_extensions_leads.yaml",
|
|
107
|
+
});
|
|
108
|
+
// Leading token is "Synced" — none of draft/provisional/canonical. The
|
|
109
|
+
// body contains exactly one keyword family ("canonical"), so the parser
|
|
110
|
+
// accepts it unambiguously rather than defaulting to "final" (which per
|
|
111
|
+
// the module rule is reserved for an ABSENT `_status`, not merely an
|
|
112
|
+
// unrecognized leading word on a present one).
|
|
113
|
+
expect(result.maturity).toBe("canonical");
|
|
114
|
+
expect(result.ambiguous).toBe(false);
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
it("reads the structured-object `_status` shape via its `vocabStatus` field, not the whole object (citizenship, src/cvcs/citizenship.v1.0.0.json)", () => {
|
|
118
|
+
const result = parseCvcStatus({
|
|
119
|
+
_status: {
|
|
120
|
+
vocabStatus: "provisional-pending-notion-ratification",
|
|
121
|
+
authoredBy: "platform-common 0.8.13",
|
|
122
|
+
evidence:
|
|
123
|
+
"prototype@a596eb9 'Final CVCs/Socioeconomic Demographics (IC-69)/Nationality & " +
|
|
124
|
+
"Citizenship (IC-60)/core - citizenship — codebook 2.csv' (252 rows) + " +
|
|
125
|
+
"CVC_INDEX.md:25 (core - citizenship = CVC-182, status 'Not started').",
|
|
126
|
+
},
|
|
127
|
+
});
|
|
128
|
+
expect(result.maturity).toBe("provisional");
|
|
129
|
+
expect(result.rawStatus).toBe("provisional-pending-notion-ratification");
|
|
130
|
+
expect(result.ambiguous).toBe(false);
|
|
131
|
+
});
|
|
132
|
+
|
|
133
|
+
it("reads the structured-object `_status` shape's 'canonical' vocabStatus (person_relationships, src/cvcs/personRelationships.v1.0.0.json)", () => {
|
|
134
|
+
const result = parseCvcStatus({
|
|
135
|
+
_status: { vocabStatus: "canonical", authoredBy: "platform-common 0.8.14" },
|
|
136
|
+
});
|
|
137
|
+
expect(result.maturity).toBe("canonical");
|
|
138
|
+
expect(result.rawStatus).toBe("canonical");
|
|
139
|
+
expect(result.ambiguous).toBe(false);
|
|
140
|
+
});
|
|
141
|
+
|
|
142
|
+
it("ignores a non-string `_source` and a `_source` with no prototype YAML citation", () => {
|
|
143
|
+
const noSource = parseCvcStatus({ _status: "DRAFT — x" });
|
|
144
|
+
expect(noSource.sourceIsPrototype).toBe(false);
|
|
145
|
+
expect(noSource.sourcePath).toBeNull();
|
|
146
|
+
|
|
147
|
+
const nonStringSource = parseCvcStatus({ _status: "DRAFT — x", _source: 42 });
|
|
148
|
+
expect(nonStringSource.sourceIsPrototype).toBe(false);
|
|
149
|
+
});
|
|
150
|
+
});
|
|
@@ -111,7 +111,7 @@ const SOT_FILES: readonly SotFile[] = [
|
|
|
111
111
|
{ file: "announcementResponseType.v1.0.0.json", expectedDomain: "announcement_response_type" },
|
|
112
112
|
{ file: "basisQuickPicks.v1.0.0.json", expectedDomain: "basis_quick_picks" },
|
|
113
113
|
{ file: "checkInActivity.v1.0.0.json", expectedDomain: "check_in_activity" },
|
|
114
|
-
{ file: "checkInPhase.v1.
|
|
114
|
+
{ file: "checkInPhase.v1.1.0.json", expectedDomain: "check_in_phase" },
|
|
115
115
|
{ file: "childBehavioralConcerns.v1.0.0.json", expectedDomain: "child_behavioral_concerns" },
|
|
116
116
|
{ file: "childCustodyArrangement.v1.0.0.json", expectedDomain: "child_custody_arrangement" },
|
|
117
117
|
{ file: "collectionContext.v1.0.0.json", expectedDomain: "collection_context" },
|
|
@@ -168,6 +168,75 @@ const SOT_FILES: readonly SotFile[] = [
|
|
|
168
168
|
{ file: "threadType.v1.0.0.json", expectedDomain: "thread_type" },
|
|
169
169
|
{ file: "verificationStatus.v1.0.0.json", expectedDomain: "verification_status" },
|
|
170
170
|
{ file: "visaType.v1.0.0.json", expectedDomain: "visa_type" },
|
|
171
|
+
// ─── Net-new additive domains (CVC author missing-domains batch) ───
|
|
172
|
+
{ file: "livingSituation.v1.0.0.json", expectedDomain: "living_situation" },
|
|
173
|
+
{ file: "serviceAudience.v1.0.0.json", expectedDomain: "service_audience" },
|
|
174
|
+
{ file: "hmisRelationshipToHoh.v1.0.0.json", expectedDomain: "hmis_relationship_to_hoh" },
|
|
175
|
+
{ file: "victimAbuseTypes.v1.0.0.json", expectedDomain: "victim_abuse_types" },
|
|
176
|
+
{ file: "htType.v1.0.0.json", expectedDomain: "ht_type" },
|
|
177
|
+
{ file: "relationshipConcern.v1.0.0.json", expectedDomain: "relationship_concern" },
|
|
178
|
+
{ file: "recencyBand.v1.0.0.json", expectedDomain: "recency_band" },
|
|
179
|
+
{ file: "housingSubsidyTypes.v1.0.0.json", expectedDomain: "housing_subsidy_types" },
|
|
180
|
+
// ─── Risk taxonomy (names-only projection of the @hti/scoring SOT) ───
|
|
181
|
+
{ file: "riskCategory.v1.0.0.json", expectedDomain: "risk_category" },
|
|
182
|
+
// ─── 0.8.12 vocabulary batch ───
|
|
183
|
+
{ file: "coreFunctions.v1.0.0.json", expectedDomain: "core_functions" },
|
|
184
|
+
{ file: "needsAssessmentChangeType.v1.0.0.json", expectedDomain: "needs_assessment_change_type" },
|
|
185
|
+
{ file: "roiScope.v1.0.0.json", expectedDomain: "roi_scope" },
|
|
186
|
+
{ file: "roiStatus.v1.0.0.json", expectedDomain: "roi_status" },
|
|
187
|
+
{ file: "coreReferralOutcome.v1.0.0.json", expectedDomain: "core_referral_outcome" },
|
|
188
|
+
{ file: "assertionDomain.v1.1.0.json", expectedDomain: "assertion_domain" },
|
|
189
|
+
// ─── 0.8.13 canonical CVC batch ───
|
|
190
|
+
{ file: "coreDhState.v1.0.0.json", expectedDomain: "dh_state" },
|
|
191
|
+
{ file: "coreIndicators.v1.0.0.json", expectedDomain: "core_indicators" },
|
|
192
|
+
{ file: "riskSeverityBand.v1.0.0.json", expectedDomain: "risk_severity_band" },
|
|
193
|
+
{ file: "adminRoles.v1.0.0.json", expectedDomain: "admin_roles" },
|
|
194
|
+
{ file: "userRoles.v1.0.0.json", expectedDomain: "user_roles" },
|
|
195
|
+
{ file: "hmisCurrentLivingSituation.v1.0.0.json", expectedDomain: "hmis_current_living_situation" },
|
|
196
|
+
{ file: "juvenileJusticeEpisodeType.v1.0.0.json", expectedDomain: "juvenile_justice_episode_type" },
|
|
197
|
+
{ file: "incarcerationEpisodeType.v1.0.0.json", expectedDomain: "incarceration_episode_type" },
|
|
198
|
+
{ file: "exploitationType.v1.0.0.json", expectedDomain: "exploitation_type" },
|
|
199
|
+
{ file: "sourceSystem.v1.0.0.json", expectedDomain: "source_system" },
|
|
200
|
+
{ file: "sourceInstrument.v1.0.0.json", expectedDomain: "source_instrument" },
|
|
201
|
+
{ file: "poPetitionBasis.v1.0.0.json", expectedDomain: "po_petition_basis" },
|
|
202
|
+
{ file: "poStatus.v1.0.0.json", expectedDomain: "po_status" },
|
|
203
|
+
{ file: "poViolationStatus.v1.0.0.json", expectedDomain: "po_violation_status" },
|
|
204
|
+
{ file: "sessionTemplate.v1.0.0.json", expectedDomain: "session_template" },
|
|
205
|
+
{ file: "serviceDeliveryChannel.v1.0.0.json", expectedDomain: "service_delivery_channel" },
|
|
206
|
+
{ file: "whyNots.v1.0.0.json", expectedDomain: "why_nots" },
|
|
207
|
+
// ─── 0.8.13 held-item resolutions (Job A) ───
|
|
208
|
+
{ file: "citizenship.v1.0.0.json", expectedDomain: "citizenship" },
|
|
209
|
+
// CVC-181 — the country list CVC-182 shares. Authored 2026-08-26.
|
|
210
|
+
{ file: "countries.v1.0.0.json", expectedDomain: "countries" },
|
|
211
|
+
// CVC-231 — the Determination Helper category taxonomy. Authored 2026-08-30,
|
|
212
|
+
// on the number Jevon ratified to it on 2026-08-28.
|
|
213
|
+
{
|
|
214
|
+
file: "determinationHelperCategories.v1.0.0.json",
|
|
215
|
+
expectedDomain: "determination_helper_categories",
|
|
216
|
+
},
|
|
217
|
+
{ file: "traffickingRelevantRole.v1.0.0.json", expectedDomain: "trafficking_relevant_role" },
|
|
218
|
+
// ─── Domains the hand-maintained list previously OMITTED (found by the
|
|
219
|
+
// CVC drift gate, which scans the directory instead of a list). ───
|
|
220
|
+
{ file: "activityType.v1.0.0.json", expectedDomain: "activity_type" },
|
|
221
|
+
{ file: "childChangeType.v1.0.0.json", expectedDomain: "child_change_type" },
|
|
222
|
+
{ file: "contactLinkType.v1.0.0.json", expectedDomain: "contact_link_type" },
|
|
223
|
+
{ file: "hivStatus.v1.0.0.json", expectedDomain: "hiv_status" },
|
|
224
|
+
{ file: "immigrationLegalStatusChangeType.v1.0.0.json", expectedDomain: "immigration_legal_status_change_type" },
|
|
225
|
+
{ file: "mentalHealthStatus.v1.0.0.json", expectedDomain: "mental_health_status" },
|
|
226
|
+
{ file: "programEnrollmentChangeType.v1.0.0.json", expectedDomain: "program_enrollment_change_type" },
|
|
227
|
+
{ file: "provenanceSourceId.v1.0.0.json", expectedDomain: "provenance_source_id" },
|
|
228
|
+
{ file: "radiusBucket.v1.0.0.json", expectedDomain: "radius_bucket" },
|
|
229
|
+
{ file: "roiMethod.v1.0.0.json", expectedDomain: "roi_method" },
|
|
230
|
+
{ file: "romanticRelationshipChangeType.v1.0.0.json", expectedDomain: "romantic_relationship_change_type" },
|
|
231
|
+
{ file: "sessionNoteVisibility.v1.0.0.json", expectedDomain: "session_note_visibility" },
|
|
232
|
+
{ file: "specialNeedsDisabilities.v1.0.0.json", expectedDomain: "special_needs_disabilities" },
|
|
233
|
+
{ file: "suggestionSource.v1.0.0.json", expectedDomain: "suggestion_source" },
|
|
234
|
+
// ─── GDR §10.1 CAR-contract vocabularies (provisional 900-block; PAVE
|
|
235
|
+
// @pave/domain verbatim; bead pv-pgdr-cvc-source-gdr-10-1-bulk-publish). ───
|
|
236
|
+
{ file: "assertionStatus.v1.0.0.json", expectedDomain: "assertion_status" },
|
|
237
|
+
{ file: "createdBySystem.v1.0.0.json", expectedDomain: "created_by_system" },
|
|
238
|
+
{ file: "subjectType.v1.0.0.json", expectedDomain: "subject_type" },
|
|
239
|
+
{ file: "minorAdultStatus.v1.0.0.json", expectedDomain: "minor_adult_status" },
|
|
171
240
|
] as const;
|
|
172
241
|
|
|
173
242
|
function loadSot(file: string): unknown {
|