You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
LIF ingests field names from external standards and source systems (CEDS, IMS, …) into the MDR, and those names don't always satisfy LIF's naming convention or the constraints of the technologies that consume the model. The iSO639-2LangCode incident (#1011) is a concrete failure: a hyphenated, non-camelCase CEDS attribute reached the MDR and crashed GraphQL schema generation in dev and demo.
Three pressures conflict, and there's no recorded decision reconciling them:
Source standards deliver names like iSO639-2LangCode (hyphens, irregular caps).
Technology constraints: GraphQL names must match /[_A-Za-z][_0-9A-Za-z]*/ (no hyphen, no leading digit); Python attrs are snake_cased; JSON/Mongo store verbatim; the translator relies on case-insensitive lookups.
data-model-rules.md documents the rule but not the conflict or a decision, and explicitly notes the convention is "enforced by readers, not tooling" — which is how the bad names slipped in. (Analogous to the classic Clojure kebab-case vs JSON/DynamoDB tension.)
Deliverables
ADR (docs/design/adr/data_model/0001-…) capturing the conflict, options, and a ratified decision (e.g. normalize-on-ingest + preserve source name as metadata, and/or reject-illegal-at-MDR-write-time). Draft PR incoming (status: Proposed) for the team to react to.
Non-technical naming guide for schema designers / CEDS contributors — plain-language "name fields like this, not that, and why."
Describe the issue
LIF ingests field names from external standards and source systems (CEDS, IMS, …) into the MDR, and those names don't always satisfy LIF's naming convention or the constraints of the technologies that consume the model. The
iSO639-2LangCodeincident (#1011) is a concrete failure: a hyphenated, non-camelCase CEDS attribute reached the MDR and crashed GraphQL schema generation in dev and demo.Three pressures conflict, and there's no recorded decision reconciling them:
iSO639-2LangCode(hyphens, irregular caps).docs/specs/data-model-rules.md→ Naming Styles): PascalCase entities, camelCase scalar leaves, PascalCase enums./[_A-Za-z][_0-9A-Za-z]*/(no hyphen, no leading digit); Python attrs are snake_cased; JSON/Mongo store verbatim; the translator relies on case-insensitive lookups.data-model-rules.mddocuments the rule but not the conflict or a decision, and explicitly notes the convention is "enforced by readers, not tooling" — which is how the bad names slipped in. (Analogous to the classic Clojure kebab-case vs JSON/DynamoDB tension.)Deliverables
docs/design/adr/data_model/0001-…) capturing the conflict, options, and a ratified decision (e.g. normalize-on-ingest + preserve source name as metadata, and/or reject-illegal-at-MDR-write-time). Draft PR incoming (status: Proposed) for the team to react to.Related: #1011 / #1012 (crash + codegen hardening — defense-in-depth, not a substitute for a naming policy), #1013 (rename the three
iSO639-*fields).