Health and validation
modelARch uses validation at several boundaries. “Valid” is not one boolean: a model can be structurally coherent but incomplete as a product, and a generated artifact can compile while its runtime dependency is unavailable.
Validation layers
Section titled “Validation layers”| Layer | Question |
|---|---|
| Structural model validation | Do references, shapes, catalogs, and identities cohere? |
| Discovery readiness | Are mandatory product decisions explicit? |
| Target preflight | Can the selected generator target represent this model? |
| Build and tests | Do emitted artifacts compile and satisfy generated contracts? |
| Runtime health | Is the process alive? |
| Runtime readiness | Can it safely receive traffic now? |
| Smoke verification | Do central journeys work in the candidate environment? |
Structural invariants
Section titled “Structural invariants”Structural checks cover areas such as:
- unique identities and code-safe names;
- valid field and aggregate references;
- command mutations targeting real fields;
- event, reaction, timer, and process bindings;
- actor, permission, and scope references;
- query fields, filters, sorts, and computations;
- view, transition, and surface identifiers;
- dense ordering where order is semantically significant;
- closed catalogs such as transport or view-pattern values.
These checks should produce stable identifiers and actionable messages.
Readiness gaps
Section titled “Readiness gaps”Readiness asks whether the model leaves a decision the generator cannot safely make. A user may resolve a gap by adding structure or recording an explicit “none/accepted” decision when absence is intentional.
The gate must not infer readiness from message count, AI confidence, or visual completeness.
Warnings and errors
Section titled “Warnings and errors”- Error: output would be invalid, unsafe, or semantically undefined. Block generation.
- Warning: output is possible but the model may be incomplete or lower quality. Preserve in evidence.
- Information: explain a derived choice or recommendation.
Do not downgrade an error merely to make the pipeline green. Fix the model, the validator, or the unsupported capability classification.
Health versus readiness
Section titled “Health versus readiness”A process can be healthy but not ready. Health reports that it is running; readiness verifies dependencies such as database connectivity and migration completion.
During blue-green delivery, traffic switches only after the candidate is ready and smoke checks pass. A failing candidate must not affect the active release.
Validation feedback loop
Section titled “Validation feedback loop”When a generated-app defect exposes an invariant that every valid model should satisfy, add it to the shared validation semantics. When the model is valid and only an emitter is wrong, fix the generator and add a conformance test. This distinction prevents validators from accumulating target-specific template accidents.
Continue with Generate or Troubleshooting.
