Files
magnus919_agent-skills/semantic-spacetime/tests/fixtures/invalid-model.yaml
Magnus Hedemarkandfactory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com> 3fc2f87011 fix(semantic-spacetime): enforce strict sst-model-v1 schema in model lint
model lint now rejects anything outside the sst-model-v1 schema with exit 1
and a named violation: unknown top-level sections (e.g. 'regions:') and
unknown fields inside agents/promises/nodes/edges/acceptances/trajectories/
observations (e.g. 'bogus-field: 42' in a node). Violations name the unknown
key and its location, flow through the --json errors list, and never produce
a traceback. The template's RULES block documents the strictness, the
restricted-YAML subset boundary (anchors/aliases, block scalars, and
multi-document streams rejected exit 1; JSON accepted as an equivalent
representation), and the trajectory node-id reference rule (no edge-
connectivity check in v1). Adds a git-tracked malformed fixture
(tests/fixtures/invalid-model.yaml) and unit tests pinning both rejection
directions, plus unknown-field coverage in agent and edge entries.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
2026-08-13 00:20:07 -04:00

25 lines
746 B
YAML

# Deliberately invalid sst-model-v1 model (fixture for the strict-schema lint
# tests). Every field satisfies the normal rules EXCEPT the two strict-schema
# violations below, so lint reports exactly these named violations:
# * 'bogus-field' is an unknown field inside node 'report-event'
# * 'regions' is an unknown top-level section
# Expect 'model lint' to exit 1 and name both the key and its location.
schema_version: 1
agents:
- id: operator
role: workflow operator
promises:
- id: deliver-report
body: Deliver the weekly status report by Friday.
nodes:
- id: report-event
type: event
bogus-field: 42
edges:
- from: report-event
to: report-event
link: 1
regions:
- id: r1
kind: concept