Walkthrough: verify a GLB and inspect a refusal
This walkthrough uses only Glina's local GLB parser. It does not load config secrets, start Weles, or contact the live Blender bridge. The exact script is examples/verify-asset.sh; it was executed against this checkout with Node v22 on macOS.
1. Run with no stated thresholds
The script writes {} as the config. Glina carries no triangle budget of its own, so verify checks the container, meshes, materials and animation presence only:
$ node pipeline/cli.js verify assets/models/smok.glb --config build/verify-walkthrough/plain.json
{
"ok": true,
"errors": [],
"stats": {
"meshes": 38,
"primitives": 38,
"triangles": 748,
"materials": 5,
"animations": 2,
"animationNames": ["flap", "idle"],
"textures": 0,
"nodes": 48,
"animationChannels": 54,
"movingAnimationChannels": 8,
"staticAnimationChannels": 46
},
"thresholds": {
"requireMaterials": true,
"requireAnimations": false
},
"path": "assets/models/smok.glb"
}
The captured process exited 0. The important animation distinction is visible: 54 channels exist, but only 8 change. If animation were required and all 54 were static, the gate would refuse the model.
2. Deliberately tighten the contract
The script writes:
{
"verify": {
"triTarget": 300,
"triTolerancePct": 50,
"requireAnimations": true,
"minAnimationClips": 3
}
}
That allows at most 450 triangles and requires three clips. The same asset produced:
{
"ok": false,
"errors": [
"over triangle budget: 748 > 450 (target 300)",
"too few animation clips: 2 < 3 [flap, idle]"
],
"stats": {
"meshes": 38,
"triangles": 748,
"materials": 5,
"animations": 2,
"animationNames": ["flap", "idle"],
"animationChannels": 54,
"movingAnimationChannels": 8,
"staticAnimationChannels": 46
},
"thresholds": {
"requireMaterials": true,
"requireAnimations": true,
"triTarget": 300,
"triTolerancePct": 50,
"minAnimationClips": 3
},
"path": "assets/models/smok.glb"
}
strict gate refused as expected
The inner glina verify exited 1. The example catches that expected status so the walkthrough script itself completes successfully.
A triTarget without its triTolerancePct is refused before any check runs:
$ node pipeline/cli.js verify assets/models/smok.glb --config target-only.json
error: verify.triTolerancePct is not set in the pipeline config: a stated triTarget needs the tolerance the gate allows over it
3. Use the verdict correctly
- Treat
ok, not the presence of a JSON report, as acceptance. - Display every
errorsentry; failures are cumulative. - Preserve the threshold block with evidence so a later reader knows which contract ran.
- In a generation job, Glina sets
throwOnFail:true, turning the same reasons intoasset failed verification: …and failing the whole job.