Plan: SHINES Mandated-Reporter Portal Parity for the Standalone Intake Form
Archive record
Merge requests: Aravinth Manivannan’s !1748 (plan), !1757 (U1), !1813 (U2), !1884 (U3), !1885 (U4), !1886 (U5), !1887 (U6), !1888 (U7), !1889 (U8) and !1891 (U9), approved as-is on 2026-10-21 and re-landed with integration fixes: !1971 (slice 1: the plan and U1–U4, Closes #2097–#2100); the close-out !1972 (slice 2: U5–U9, Closes #2101–#2105)
2026-10-22 — after a contextless round 1 (no-ship, folded 2026-09-29). What landed:
the DFCS pick-list CSV as typed ShinesCodeTable tables in craig-reference (U1);
the reporter’s Reporter Type (mandated only), Gender, State and County pick-lists (U2);
the reporter’s household flag, the Principal / Collateral switch and reporter_rel_to_victim (U3);
the intake date-time, alternate contact and first-hand contact on Step 1 (U4);
per-person shines_* demographics, single-select race, the retired crosswalks (U5);
per-person household membership and relationship, is_other_member removed (U6);
a non-household child’s required address, a 422 required-field-missing (U7);
foster care as one Yes / No on the Children step, foster_care_address removed (U8);
PDF / image-only signed attachments checked by magic signature, a 400 attachment-content-unaccepted (U9).
Every SHINES pick-list value, top-level and per-person, is matched as sent (#2545).
Follow-ups stay open: #691, #692, #1714.
Status
Done (2026-10-22) — !1972
Erratum (2026-09-29): U1 ships gender_to_shines_code(value: &str) → Option<&'static str> (looks the value up
in the Gender table; None outside it) instead of D1’s (&CodeEntry) → &'static str — total over its input
without a panic path.
Erratum (2026-10-05): U2 creates entry_rules.rs with validate_shines_extra only; validate_shines_adult /
validate_shines_child and the BackendProfile threading into the array validators land with the first of U5 / U6
(an empty per-entry validator would be a no-op stub). D2’s options render as {% for %} loops over a typed
ShinesPickLists in ui.rs, not an Askama macro file (no template in the repo uses macros); the SHINES state select is
#shines_reporter_state (the default-profile block’s #reporter_state input stays in the DOM).
Erratum (2026-10-12): U5 removes fidelity.rs’s `LossyMapping / LOSSY_MAPPINGS and its boot check outright rather
than leaving an empty table — race was its only entry, and nothing is lossy once race is single-select. U5 refuses
the CRAIG-typed keys per entry where a shines_* replacement exists: all five on an adult, sex and race on a child
(a child’s ethnicity / language have no SHINES field and stay capture-only, as before).
- Anchors
-
Epic &100; issues #2097–#2105 (one per unit below); ADR-042 (amended by U1); #692 (authoritative SHINES RefVals — numeric ids stay placeholders); #691 (proposed SHINES wire keys — go-live dependency); #1714 (Principal/Collateral value lists — U1 supplies them for this form).
Context
DFCS compared the GA DHS portal’s "CPS - Mandated Reporter Form" with CRAIG’s mandated form — craig-intake /report
under the standalone-SHINES backend profile (boot_standalone_shines, services/craig-intake/src/main.rs) — and listed
27 gaps (source: Craig_CPS_Form_Diff.pdf, received 2026-09-28; its 27 items are transcribed on epic &100 — the item numbers below
are its numbering), with the portal’s pick-lists as a CSV (Craig_Field_Dropdowns(Sheet1).csv, 11 columns),
committed verbatim with this plan at crates/craig-reference/data/shines/field-dropdowns.csv.
Standalone SHINES is phase 1 of a phased rollout in which CRAIG ultimately replaces SHINES, so the SHINES variant is
SHINES-compliant: the portal’s value sets, single-select race, gender with Unknown. The default (cases) profile keeps
its AFCARS-bound CRAIG enums (Sex, RaceResponses, Language, MaritalStatus) and its form stays unchanged.
What exists on main today (verified 2026-09-29):
-
The SHINES blocks of
services/craig-intake/templates/report.htmlrender most SHINES fields as free text (reporter_relation,reporter_county, adultstate/rel_to_primary_caretaker), race as a multi-select checkbox group folded lossily to oneraceId, and marital status / language over the CRAIG enums. -
The reporter address, household-member checkbox and relationship dropdowns are default-profile only (
report.htmlStep 1,x-show="… !== 'shines'"); adult sex and ethnicity have no SHINES field. -
Adult and child SSN inputs exist (items 20 / 24 are labelling and input-hint gaps); foster care exists as a Step-5 checkbox with name + address (items 19 / 26 are placement); signed attachments exist for SHINES + mandated (item 27 lacks an
acceptfilter, a per-file list with remove, the warning copy and a server MIME check). -
SHINES intakeDate/dateReportedare both the submit time (mapper.rsbuild_incident);mandated_reporter_categoryis validated, then dropped on the SHINES path.
CSV facts the design rests on: list sizes 110 / 99 / 75 / 99 / 3 / 55 / 161 / 5 / 34 / 8 / 5 (column order as in the
header); the three relationship lists carry a 2-letter code prefix (PK Primary Caretaker), the rest are label-only;
codes are unique within a list but six (DC, FM, GS, N2, PB, RN) carry different labels in different lists;
the 99 Reporter Type labels equal the 99 Collateral labels one-to-one.
Scope
In scope: the 27 items, mapped to units below; the SHINES code tables; the wire, SDK, mapper and validation changes they need; the ADR-042 amendment; the proposed-SHINES-API rows for every new wire key.
Out of scope: the default-profile form; the craig-web staff report-entry form; the P28 call-taker form (epic &89,
unmerged feature/p28-partner-intake — it rebases onto this work); the authoritative numeric RefVals (#692); the
portal’s "Incident Date Time" and submit-once notice (not among the 27; R8).
Design
D1 — SHINES code tables (craig-reference::shines_codes)
New module crates/craig-reference/src/shines_codes.rs, beside shines.rs. Not craig-state-ga: that crate is an
optional craig-intake feature (state-ga), while the SHINES backend compiles in every build, and the Rust SDK depends
on craig-reference only. SHINES code tables are a system’s reference data, not Georgia policy vocabulary.
-
The CSV is already committed (with this plan) at
crates/craig-reference/data/shines/field-dropdowns.csv; U1 adds provenance (DFCS, received 2026-09-28) to the module doc. -
pub struct CodeEntry { pub code: &'static str, pub label: &'static str, pub display: &'static str }—displayis the verbatim CSV cell; for label-only listscode == label == display. -
pub enum ShinesCodeTable { AllegedMaltreatorRelationship, RelationshipPrincipal, RelationshipCollateral, ReporterType, Gender, State, County, MaritalStatus, Language, Race, Ethnicity }(strum::EnumIter) withentries(self) → &'static [CodeEntry],get(self, value: &str) → Option<&'static CodeEntry>,csv_header(self) → &'static str. -
Tables are hand-authored
constslices (thecounties.rsmodel): nobuild.rs, no runtime parse, panic-free. -
Wire value: coded lists send the 2-letter
code; label-only lists send the exact CSV label — on CRAIG’s ingress wire. The SHINES outbound form is the mapper’s job: Gender mapsFemale/Male/Unknown→F/M/Uviagender_to_shines_code(&CodeEntry) → &'static strinshines.rs(replacingsex_to_shines_code). -
shines.rsgainscode_table_placeholder_id(table, value) → Option<u16>(1-based table position), markedPLACEHOLDER REFVAL (#692), pinned like the other placeholders and kept out ofsdks/test-vectors/refval.json. When #692 delivers ids, only this function changes. -
Tests: per-table order + content parity against its CSV column (the CSV read via
include_str!under#[cfg(test)],csvas a dev-dependency; the verbatim file keeps DFCS’s UTF-8 BOM, which the test strips); codes match^[A-Z0-9]{2}$and are unique per table;Countyminus {Out of State, SVU} equals theGEORGIA_COUNTIESnames;Stateminus {Out of State} is a subset offips::Statefull names; proptest — the test’s code/label splitter round-trips any[A-Z0-9]{2} <label>and never panics.
D2 — rendering
ReportTemplate (services/craig-intake/src/ui.rs) gains shines_codes: bool, true only under the Shines profile. A
new Askama macro file templates/shines_options.html ({% macro options(table) %}) renders
<option value="{{ e.code }}">{{ e.display }}</option> from entries() (auto-escaped). No hand-copied option lists.
Code-table labels are SHINES reference text, untranslated in en and es, on <select lang="en">; field labels and help
text are Fluent keys in crates/craig-i18n/catalog/{en,es}/public.ftl (gated by tests/i18n_coverage.rs).
D3 — wire rule
-
Reuse a key that is an untyped free string or bool with no CRAIG vocabulary, adding Shines-profile table validation: top-level
reporter_state,reporter_county,reporter_is_household_member;AdultEntrystate,county,rel_to_primary_caretaker,street/city/zip,ssn;ChildEntryssn. -
New
ChildEntryfields (services/craig-intake/src/api/validation.rs, plus the Rust SDKChilddto):rel_to_primary_caretaker,street,city,state,zip,county— optional strings, garde-capped like theirAdultEntrytwins, table-validated under Shines only; tolerated and unmapped under the default profile (asssnis today). -
Add a flat
shines_-prefixed key where the core key is CRAIG/AFCARS-typed (theshines_household_roleconvention):shines_gender,shines_race(single value),shines_ethnicity,shines_marital_status,shines_language,shines_household_member: bool. No nested per-person object; no per-profile parse of one key. -
New top-level
ExtraFieldskeys (backend/shines/extra.rs,SHINES_EXTRA_KEYS16 → 22):intake_datetime,reporter_alt_contact_info,rep_type,reporter_gender,reporter_rel_to_primary_caretaker,reporter_rel_to_victim.rep_typeis new becausemandated_reporter_categoryisENUM_STRING_MAX(32)-capped over a CRAIG allowlist and Reporter Type labels run to 39 characters. -
Caps count characters, not bytes, and match the HTML
maxlength:reporter_alt_contact_info100,first_hand_info50,foster_care_name50. -
Per-profile validation lives in a new strippable module
backend/shines/entry_rules.rs:validate_shines_adult(&AdultEntry, usize),validate_shines_child(&ChildEntry, usize),validate_shines_extra(&SubmitReportRequest, &ExtraFields).validate_adults_array/validate_children_arraytake theBackendProfileand call them only under Shines. Under Shines the CRAIG-typed per-entry keys (sex,race,ethnicity,language,marital_status) are a 400 naming theshines_*replacement — never silently dropped. The same 400 applies to top-levelreporter_relation(replaced byreporter_rel_to_victim) andmandated_reporter_category(replaced byrep_type; its select is hidden under Shines). Under the default profile nothing changes. -
require_mandated_categorykeeps its signature; its call inbackend/shines/signed_submit.rsis deleted (that handler runs only under Shines), thepublic.rscall stays. -
Pre-1.0, no scaffolding:
is_other_memberandfoster_care_address(+fosterCareAddress, per R5’s default) are removed (the mapper derivesisOtherMemberfromshines_household_member);race_to_shines_id,RACE_ID_OTHER_OR_UNKNOWN,marital_status_to_shines_id,language_to_shines_id,sex_to_shines_codeand theraceentry offidelity.rsLOSSY_MAPPINGSretire. -
Every wire change updates the Rust SDK (
crates/craig-intake-sdk/src/types/—reporter_relation, todayOption<RelationshipToChild>indto.rs, is removed from the Shines builder path), the TSSHINES_EXTRA_KEYSand Python_SHINES_EXTRA_KEYS(thesdks/python/tests/test_extra_fields.pylength pin 16 → 22),sdks/test-vectors/extra-fields.json, the SDK changelogs andCHANGELOG.adoc== Unreleased(Changed/Removed).
D4 — SHINES CpsRequest mapping
| # | Source | SHINES wire (mapper.rs) |
Key |
|---|---|---|---|
1 |
|
|
format change |
2 |
|
|
new |
3 |
|
|
existing |
4 |
|
|
existing |
5 |
|
|
new |
6 |
|
|
new |
7 |
|
|
existing |
8 |
|
|
new ×2 |
9 |
|
|
existing |
10, 21 |
|
|
new on parents / children |
11, 22 |
|
|
new on parents / children |
12, 13 |
|
|
new |
14, 25 |
|
parents / others |
mixed |
15–17 |
|
|
existing |
18 |
|
|
new |
20, 24 |
|
|
existing |
23 |
child |
|
new |
19, 26 |
|
|
existing |
27 |
|
|
existing |
Every new key — and the intakeDate date → date-time format change — is added to a "Portal-parity extensions"
table in
the proposed SHINES API as a go-live dependency (#691); the new
placeholder ids (ethnicityId, sex U) join #692. Each unit updates mapper::TOP_LEVEL_KEYS where needed, the
mapped_request_hash pin, the full_body() / full_extra() fixtures, and adds a wire-key lock test.
D5 — conditional logic
-
Household member → relationship list. Client: two
<template x-if>blocks (Principal / Collateral) bound to onex-model; toggling the checkbox clears the value (codes overlap across lists, e.g.AF;PK/SC/SLare Principal-only). Server (entry_rules.rs): the value must be in Principal when the household flag is true, in Collateral otherwise — else 400INVALID_ENUM_VALUEnaming the table. This is a value-set constraint, not a relevance rule: relevance governs presence, validation governs the value set (recorded in the ADR amendment). -
Child address. When
shines_household_memberis false,street,city,state,zip,countyare required: 422REQUIRED_FIELD_MISSINGatchildren[i].<field>. Client:x-show+:required+ a Step-4 check inreport-form.jsvalidateStep(stepErrorField = 'child_address'). Per-entry rules live inentry_rules.rsbecause the relevance grammar (FieldId) is top-level only. -
Reporter type. New relevance row (Shines profile):
FieldId::RepTyperelevant whenreporter_type = mandated,required_when_relevant: true;require_mandated_categorybecomes a no-op under Shines. -
Intake date-time.
intake_datetimeis optional (absent →submitted_at); a value later than server now
INTAKE_DATETIME_MAX_SKEW(a new 5-minute const inentry_rules.rs, absorbing reporter clock drift) is a 422; backdating is allowed (R2). -
Foster care. Keep the
FosterCareNamerule; remove theFosterCareAddressrule,FieldId::FosterCareAddressand the key (the portal has no address field; R5). The checkbox becomes a Yes / No radio (SHINES_TRIGGER_BOOLS→SHINES_TRISTATE_BOOLS).
D6 — foster care placement (items 19, 26)
The wire has one report-level isInfosterCare / fosterCareName, so the question renders once, on Step 4
(Children): "Children are in Foster Care — Yes / No; If Yes: Foster Parent / Placing Agency Name" (max 50), removed
from Step 5. A per-adult copy (item 19 read literally) would produce conflicting answers — R5.
D7 — upload parity (item 27)
Scope stays SHINES + mandated (the files are covered by the report’s JWS).
-
Client (
report-form.js): AlpinesignAttachments: File[]; the input’s@changeappends and clears; per-file Delete; View viaURL.createObjectURL(revoked on remove / reset);MAX_ATTACHMENTSenforced, de-duplicated;accept=".pdf,.jpg,.jpeg,.png,.gif,.tif,.tiff,.webp". -
Server (
backend/shines/attachments.rs, afterverify_manifest):craig_store::validate_uploadover a newSHINES_ATTACHMENT_MIME_TYPESsubset (pdf, jpeg, png, gif, tiff, webp), magic-byte sniff included; a failure is a generic 400 naming no file (the existing no-oracle discipline). -
Warning copy: a neutral product-default key
intake-attach-prohibited-content-warning(en / es); the GA overlaycrates/craig-state-ga/terminology/{en,es}/overrides it with the portal text: "Please refrain from attaching and sending sexually explicit, nude or obscene photographs of a child; lewd exhibition of the genitals or pubic area of any person; of which the image focuses solely or principally on a child’s genitals or anal region, or portrays any grossly offensive acts. If you have such photos, please provide the photos/videos to Law Enforcement, Medical Personnel or any professional authorized to manage such pictures or videos. CICC cannot accept such documents but will verbally obtain full details for our CPS report. Please keep copies of the pictures or video. The assigned CPS Case Manager will request to view the documents as part of the CPS assessment process." (es: a translation reviewed in the MR). Styled from theme tokens (the CSS test forbids raw hex).
Units
One issue per unit under the epic; each lands on its own feat/… branch and MR. Weights are implementation
complexity.
| Unit | Deliverable | Items | Weight | After |
|---|---|---|---|---|
U1 (#2097) |
D1 code tables + CSV parity tests; |
— |
3 |
— |
U2 (#2098) |
|
4–7 |
5 |
U1 |
U3 (#2099) |
Reporter household member + Principal / Collateral switch; |
8, 9 |
3 |
U2 |
U4 (#2100) |
Intake date-time (defaults to now), alt contact (100), first-hand contact (50), both moved to Step 1 |
1–3 |
3 |
U2 |
U5 (#2101) |
Per-person |
12–18, 20, 24, 25 |
8 |
U2 |
U6 (#2102) |
Adult / child household member + relationship; |
10, 11, 21, 22 |
5 |
U2 |
U7 (#2103) |
Child address required iff not a household member |
23 |
3 |
U5, U6 |
U8 (#2104) |
Foster care relocated to Step 4, Yes / No, name cap 50, address rule dropped |
19, 26 |
2 |
U2 |
U9 (#2105) |
Upload parity (D7) |
27 |
3 |
U2 |
Tests per unit (each issue lists its own):
-
U1 — the D1 parity, invariant and proptest suite.
-
U2–U9 — unit tests in
api/validation.rs,entry_rules.rs,mapper.rs(hash pin + wire-key lock),relevance; aui.rsrender test that the code-table options appear only under Shines; API tests inservices/craig-intake/tests/api/(signed_submit.rs,intake_schema.rs) covering accept + reject per profile;tests/e2e/specs/intake-embedded-ui-shines.spec.tsfor every new widget and conditional. The default-profile specs (intake-embedded-ui.spec.ts) pass unchanged — that is the "default form unchanged" proof. -
U3 / U6 — both branches of the Principal / Collateral switch, and the toggle clearing the value.
-
U4 — multibyte character-count caps; an intake date-time in the future (beyond 5 min skew) is a 422; the mapper’s
intakeDateformat. -
U7 — a 422 per missing address part; household member → no address required.
-
U8 — "Yes" without a name is a 422; "Yes" with a name and no address is accepted.
-
U9 — a PE header declared as
application/pdfis rejected; hash-mismatch behaviour unchanged; e2e add two files, remove one, submit — the manifest carries one entry; the warning is visible.
Every unit: en / es catalog keys, proposed-API rows for its new keys, SDK + vector updates, CHANGELOG.adoc.
Verification
-
cargo nextest run -p craig-reference -p craig-intake -p craig-intake-sdk— unit + API tests. -
cargo xtask dev reload, then the SHINES devstack form atcraig-intake-standalone-shines(host port 8011): walk a mandated report through every item; the forwardedCpsRequestat the mock SHINES carries the D4 keys. -
cargo xtask e2e— the SHINES and default-profile intake specs green. -
The TS / Python SDK suites against the updated
extra-fields.jsonvector. -
cargo xtask check-docs,cargo xtask plan-lint.
DFCS rulings needed
Open questions, recorded on the epic; the design takes the stated default until ruled.
-
R1 — Is
repTypethe Collateral 2-letter code (the labels match one-to-one) or the label? Default: the label. Does the Reporter Type list apply to non-mandated SHINES reporters? Default: no. -
R2 — Intake date: editable / backdatable by the reporter? Date or date-time, which time zone? Default: editable, not in the future, date-time in UTC on the wire.
-
R3 — Is SHINES
isOtherMemberthe portal’s "Household Member"? Default: yes. -
R4 — Child address: all five parts required? What is county "SVU", and should reporters see it? Should a non-Georgia state force county "Out of State"? Default: all five required; SVU shown; no forcing.
-
R5 — Foster care per report or per adult / child? Is
fosterCareAddressstill wanted? Default: per report; no. -
R6 — "Your Relationship to Victim Child" uses the Alleged Maltreator list (it includes
AN/SM/UK). Default: as the diff states. -
R7 — Canonical labels for the six codes that differ between lists; is the 34-language list final; are American Samoa and the Northern Mariana Islands intentionally absent? Default: per-list labels verbatim.
-
R8 — Is the portal’s submit-once /
cpsintake@dhs.ga.govnotice wanted? Default: out of scope.
The numeric ids for race, marital status, language, ethnicity and sex U remain #692.
Review log
| Round | Vendor | Resolved model | Verdict |
|---|---|---|---|
1 |
Anthropic |
claude-opus-5-5 |
no-ship — Q2: source files unreachable; child keys mislabelled as reuses; plus
|