Diagnostics
What every save and push checks before it compiles, and the errors it fails with, each naming its file, its line and the fix.
Every save under npx startup-builder dev, and every push, is checked before it compiles. A failing check stops the Change, names the file and the line, and states the fix.
When each check runs
| Step | Stops on |
|---|---|
| Parse | A syntax error, a secret-shaped value, a key set twice, or a computed value in a file that takes literals only |
| Resolve | A route to code/ with no reason, or a Setting set in two files |
| Build | A Verb with two bodies, such as a Verb function and a Workflow on the same Verb |
| Check | A failing Verb test, Role test, scenario test or Evaluator on the preview |
A Change whose checks fail cannot merge. Each Builder runs its part of the compile, and one compile walks all six steps.
The errors a push fails with
Each is a standard problem document with a type URL, the file and the line.
| Error | Cause | Fix |
|---|---|---|
| Missing key | The Startup root file leaves out a key it requires, such as the Startup’s name. | Add the key named in the error to the root file, then push again. |
| Wrong type | A key in the Startup root file holds a value of another type than the key takes. | Change the value to the type the key reference lists, then push again. |
| Not literal | A key in the Startup root file is computed by a loop, a call or an expression, so it cannot be parsed. | Write the value as a literal or a Template spread; move code that has to run into code/ |
| Setting set twice | A Setting is set both in the Startup root file and in the Settings file, so its value has two homes. | Keep the Setting in one file and delete it from the other, then push again. |
Codes per convention
Each diagnostic carries a stable code and the file convention it belongs to, so an agent looks it up by code. The codes have status planned, one set per file convention.