Fix semantic gaps in smoke script: 1. backend-sgs-sdk-hall-entrance now requires BOTH entrance position AND nodeId 2. Added fixture: place with coordinates but no nodeId matches space center 3. Added fixture: normalized names (spacing/brackets) match spaces correctly 4. Maintained unmatched exhibition space fallback coverage All new fixtures consolidate into existing POIs, keeping 7 unique halls. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
3.0 KiB
3.0 KiB
Task 1 Report
Status: DONE
Files changed:
scripts/check-sgs-hall-poi-adapter.mjs
Commands run:
node scripts/check-sgs-hall-poi-adapter.mjs
Output summary:
- Smoke script passed. Script now validates:
- Finding 1: entrance-derived sourceConfidence branch — entrance-backed halls with nodeId must be
backend-sgs-sdk-hall-entrance - Finding 2: enforce entrance/reachable-node semantics — entrances without nodeId that match spaces use space-center sourceConfidence, not hall-entrance
- 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
- Whitelist enforcement prevents unrelated types
- Unmatched exhibition space with center emits fallback POI
- Entrance with missing coordinates falls back to matched space.center
- Entrance still recorded even with undefined positionGltf (no coordinates)
- Issue 1 fix:
backend-sgs-sdk-hall-entrancesourceConfidence now requires BOTH valid entrance position AND nodeId. Places with coordinates but no nodeId usebackend-sgs-sdk-space-centerinstead. - Issue 2 fixture: Added place 108 (自然科学展厅【主】出入口1) with coordinates but no nodeId, verifying it matches space center [110, 0, 120] and uses
backend-sgs-sdk-space-centersourceConfidence, not entrance coordinates. - Issue 3 fixture: Added place 109 (地球 科学 展厅 (主)出入口 1) with spacing and brackets to test name normalization matching — successfully matches space 7 despite formatting differences.
- Issue 4 coverage: Unmatched exhibition space fallback (space 4: 展览坡道) still emits POI with space-center semantics.
- Finding 1: entrance-derived sourceConfidence branch — entrance-backed halls with nodeId must be
Commits created:
test: refine SGS hall POI source semantics
Self-review notes:
- The semantic gap fix ensures sourceConfidence correctly requires BOTH position and nodeId for hall-entrance classification
- Fixture 108 validates the space-center fallback for entries with coordinates but no routing identity
- Fixture 109 demonstrates that name normalization handles real-world formatting variations (spacing, brackets, punctuation)
- All fixtures consolidate into existing POIs, maintaining clean POI count (7) while improving semantic coverage
- 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
- Place 108 (自然科学展厅【主】出入口1) with coordinates but no nodeId verifying space.center position precedence
- Place 109 (地球 科学 展厅 (主)出入口 1) with spacing/brackets demonstrating name matching robustness
- Name uniqueness validation prevents silent duplicate masking
Concerns:
- None.