test: assert SGS hall POI route semantics
This commit is contained in:
@@ -7,15 +7,27 @@ Files changed:
|
||||
|
||||
Commands run:
|
||||
- `node scripts/check-sgs-hall-poi-adapter.mjs`
|
||||
- Output summary: smoke script passed. Current script validates whitelist enforcement, fallback POI emission for unmatched public exhibition spaces, entrance coordinate preference, space-center fallback when entrance coordinates are missing, and sourceConfidence semantics.
|
||||
|
||||
Output summary:
|
||||
- Smoke script passed. Script now validates:
|
||||
1. Finding 1: entrance-derived sourceConfidence branch — entrance-backed halls with nodeId must be `backend-sgs-sdk-hall-entrance`
|
||||
2. Finding 2: enforce entrance/reachable-node semantics — entrances without nodeId that match spaces use space-center sourceConfidence, not hall-entrance
|
||||
3. Finding 3: avoid hiding duplicate names via Map-by-name only — added assertion that result names are unique, indexed by both name and id for duplicate detection
|
||||
4. Whitelist enforcement prevents unrelated types
|
||||
5. Unmatched exhibition space with center emits fallback POI
|
||||
6. Entrance with missing coordinates falls back to matched space.center
|
||||
7. Entrance still recorded even with undefined positionGltf (no coordinates)
|
||||
|
||||
Commits created:
|
||||
- `3f049f2` test: cover SGS hall POI display rules
|
||||
- `5478986` test: strengthen SGS hall POI smoke coverage
|
||||
- `test: assert SGS hall POI route semantics`
|
||||
|
||||
Self-review notes:
|
||||
- The script is standalone Node coverage for the intended adapter rules because this repository has no configured test runner.
|
||||
- The production adapter implementation is covered by Task 2 in the plan.
|
||||
- Fixtures now include:
|
||||
- Space 8 (古生物展厅) with entrance 105 that has nodeId n105 for backend-sgs-sdk-hall-entrance assertion
|
||||
- Place 107 (自然科学展厅 出入口) without nodeId to assert space-center semantics when entrance lacks routing identity
|
||||
- Name uniqueness validation prevents silent duplicate masking
|
||||
|
||||
Concerns:
|
||||
- None.
|
||||
|
||||
Reference in New Issue
Block a user