Found while modeling a real domain in ESDM and browsing it with the visualizer.
readYamlFile() in src/lib/server/esdm-loader.ts wraps yaml.loadAll() in a try whose catch returns []. A file that fails to parse therefore contributes nothing to the model, and nothing anywhere says so.
Because a single file may hold many manifests, one typo now costs the whole file rather than a single document.
Reproducing it
- Take
examples/shop and move the nine ordering documents into one commands.esdm.yaml, separated by ---.
- Break the indentation of one of them, for example by adding a stray key under
name:.
- Reload the board.
All nine commands disappear. The actors, events, read models and queries stay, so the board still looks like a plausible model, just one in which nothing can happen.
Measured on a model of 30 manifests across 8 files: breaking a single manifest inside a 9-manifest file took the board from 27 nodes to 18, with no message in the UI and nothing on the console.
Suggestion
Keep the per-file failure instead of discarding it, and surface it somewhere in the UI, for instance a banner naming the files that could not be read. Silently rendering an incomplete model is the one outcome that cannot be noticed.
Found while modeling a real domain in ESDM and browsing it with the visualizer.
readYamlFile()insrc/lib/server/esdm-loader.tswrapsyaml.loadAll()in atrywhosecatchreturns[]. A file that fails to parse therefore contributes nothing to the model, and nothing anywhere says so.Because a single file may hold many manifests, one typo now costs the whole file rather than a single document.
Reproducing it
examples/shopand move the nineorderingdocuments into onecommands.esdm.yaml, separated by---.name:.All nine commands disappear. The actors, events, read models and queries stay, so the board still looks like a plausible model, just one in which nothing can happen.
Measured on a model of 30 manifests across 8 files: breaking a single manifest inside a 9-manifest file took the board from 27 nodes to 18, with no message in the UI and nothing on the console.
Suggestion
Keep the per-file failure instead of discarding it, and surface it somewhere in the UI, for instance a banner naming the files that could not be read. Silently rendering an incomplete model is the one outcome that cannot be noticed.