2.7 KiB
2.7 KiB
Task 1 Report
Status: DONE
Files changed:
scripts/check-sgs-hall-poi-adapter.mjs.superpowers/sdd/task-1-report.md
Commands run:
node scripts/check-sgs-hall-poi-adapter.mjs
Output summary:
- Smoke script passed. Script now validates:
- Finding 1 (FIXED): Existing hall POI created from space.center is upgraded when a later entrance has BOTH position and nodeId. Main position, sourceConfidence, and sourceObjectName reflect the real entrance. Upgrade logic added to existing POI handler.
- Finding 2 (FIXED): Removed over-spec assertion requiring globally unique POI names. Now uses ID-based assertions and maps (byId) to avoid hiding duplicates by name. Assertions reference byId instead of byName for structure validation.
- Finding 3 (FIXED): Adjusted fixtures so 地球科学展厅 first has a no-coordinate entrance (place 104, fallback to space-center), then a later normalized name entrance (place 109, with nodeId and coordinates) that upgrades to entrance-backed sourceConfidence.
- 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)
- POI upgrade mechanism: entrance position, sourceConfidence, and sourceObjectName updated on second entrance if it has BOTH nodeId and coordinates
- Place 108 (自然科学展厅【主】出入口1) with coordinates but no nodeId merges without changing sourceConfidence
- Place 109 (地球 科学 展厅 (主)出入口 1) with spacing/brackets and nodeId/coordinates successfully upgrades 地球科学展厅 POI
- ID-based uniqueness validation prevents silent duplicate masking
Commits created:
test: prefer SGS hall entrance anchors
Implementation details:
- Added upgrade logic in toHallPois: when existing POI is found and later entrance has entrancePosition && place.nodeId, update positionGltf, sourceConfidence, and sourceObjectName
- sourceObjectName field added to POI object to track the entrance that provided/upgraded the position
- Replaced name-based assertions with ID-based assertions for 7 expected halls
- Fixture order: place 104 (no-coord) creates POI with space-center, then place 109 (with nodeId) upgrades it to entrance-backed
Test results:
- All 7 halls correctly identified and merged
- 地球科学展厅 correctly upgraded from space-center to backend-sgs-sdk-hall-entrance on place 109
- Both entrances (104 and 109) recorded in entrances array
- sourceConfidence and positionGltf reflect entrance 109 after upgrade
- ID uniqueness maintained across all POIs
Concerns:
- None.