Test Plan

Ported from the full pack. Fixtures ship in the spec pack under tests/ (scenarios, expected_relationships, expected_events, access_matrix).

DSL / YAML lint

Validate that: YAML model references exist; field references exist; enum values are valid; feature references resolve; rule layer codes resolve; event templates resolve; scenario rule references resolve.

Geometry tests

valid Point / LineString / Polygon · malformed GeoJSON rejected · geometry-type mismatch rejected · empty geometry rejected.

Spatial rule tests

intersects true/false · within true/false · contains true/false · distance below/above threshold. Deterministic expectations live in tests/expected_relationships.yaml — e.g. RP-2026-001 near PIPE-44 = 197.474 m (match), RP-2026-002 near PIPE-44 = 9676.217 m (no match).

Permission / disclosure tests

own tenant visible · foreign private tenant hidden · shared layer visible at the granted LayerShare level · disclosure never exceeds its DisclosureProfile (field allow/deny + geometry down-resolution) · export permission enforced · API/UI equivalent. Driven by tests/access_matrix.yaml.

Event tests

expected event type (tests/expected_events.yaml) · severity correct · payload schema correct · event_id unique · duplicate evaluation controlled · lifecycle cessation emits gis.spatial.relationship_ceased.

Orchestrator tests

successful POST · acknowledgement · timeout · HTTP 500 · retry (backoff) · replay · duplicate event_id handled as replay · outage and recovery.

Reconciliation / audit tests

every significant state change leaves reconstructable provenance · a ceased relationship still listed active downstream raises a STALE_RELATIONSHIP exception.

Minimum CI gate

DSL/YAML lint
+ unit tests
+ geometry tests
+ permission/disclosure tests
+ event contract tests