Repository navigation
Feature/published model consumption - #1
Open
christianbeil wants to merge 14 commits into
Open
christianbeil wants to merge 14 commits into
christianbeil wants to merge 14 commits into
Conversation
The form-structure parity comparisons read hand-authored files from model/legacy. Replace them with baseline-free assertions (repeatable convictions[] fields for exg-crim-part; required-by-EA-cardinality fields for C31) and remove model/legacy/xml-mapping from the model:test script, in preparation for deleting model/legacy.
Delete the pre-compiler per-part artifacts (instance-data, form-structure, xml-mapping and their roundtrip tests). Nothing at runtime read them; they remain in git history. Update READMEs and reference docs, mark model-xml-mapping.md as historical, repoint part-I.md to model/parts, and correct the stale Part II representatives note in espd-ubl-profile.md.
roles.json keeps the implementer-neutral role facts (ids, documentType, exclusion dispositions, UBL role mapping, category map). Display text and per-role visible/editable Parts move to role-ui.json; roles.mjs joins them by role id, so the generated role lens is unchanged. Also: remove stale references to the deleted hand-authored part-IV/part-III form files from comments, add TODOs to codelist-attributes.json (duplicates the Schematron) and scheme-agency-profile.json (policy review), flag the CA/CE dispositions for review in roles.json, and document in model/README.md that the neutral model-sources are moving to espd-conceptual-model/enrichment.
The model compiler now lives in espd-tools/model-compiler and the enrichment in espd-conceptual-model/enrichment; ESPD-EDM publishes the result. This app vendors it verbatim under model/generated/ (npm run model:sync, which refuses a model that does not verify: schema, listed files, strays, structure hash) and builds only its own layers from it. Adds the sync, published-model access and a structure projection; model:compile now syncs then builds form lenses, UI bundle, validators, role lens and the coverage report. Removes the in-repo compiler modules, neutral registries, sidecars, hints and their tests. Realigns i18n keys with the current EA model (Part II/V criteria keyed by their own codes, exg-mis-misconduct, new not-registered-reasons leaf). Adds tests: roundtrip of every published example through the published mapping specs (three known limitations recorded), every i18n key resolves, vendored model consistency and form paths against the published schemas. Generator-focused probe tests were not ported (see model/README.md).
The first sync used a local stand-in whose codelists.json still said 5.0.0-alpha.2. Against ESPD-EDM's model/ the envelope reports ESPD 5.0.0 and its real source reference; every other vendored and generated file is unchanged.
docs/codelist-governance.md now only records what the app adds (useForUI and how it is used) and links to the doc next to the registry in espd-conceptual-model. The vendored model is re-synced with the published ESPD-EDM, which carries the registry status fields.
The published ESPD-EDM model now records the resolved espd-tools commit in sourceRef. No other file changed.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The compiler and the neutral model sources moved out of the demo. It now vendors the published model and builds only its own presentation layers on top.
npm run model:syncverifiesESPD-EDM/model(envelope schema, every listed file exists, nothing stray, structure hash matches) and copies it verbatim tomodel/generated/: instance-data, xml-mapping, compiled, parts, registries andcompiled-model.json. It also writes a smallstructure.jsonprojection.npm run model:compileruns the sync, then builds the demo's own layers: form-structure, UI bundle, validators, UI codelists, role lens and coverage report.model/legacy, the neutral sidecars and registries, andmodel/parts/. The six part tests moved tomodel/parts-tests/and run against the vendored copy.roles.jsonis split into the published neutral registry and the demo'srole-ui.json. Codelist governance is split into the published registry plus the demo'sui-codelists.json(useForUI), merged bygovernance.mjs.../ESPD-EDMcheckout;ESPD_EDM_ROOToverrides it.Tested
npm run model:test: 407/407.npm test: 87/87.npm run build:pagesproducespublic/model/generated/parts.Notes for review
model:synchas nothing to read.origin/main(the reorganisation steps), not only the latest.roundtrip-generated.test.mjs.