build-model-integration-decision-package.mjs 4.0 KB

1234567
  1. import {readFileSync,writeFileSync} from 'node:fs'
  2. import {createHash} from 'node:crypto'
  3. const root='tools/city-massing/city/cad-bim',base='.scratch/cockpit-shell-panel-layout/verify/artifacts/t35',pilotDir=base+'/negative-estate-pilot',candidateDir=root+'/city-regions-roof-pilot-v1'
  4. const hash=p=>createHash('sha256').update(readFileSync(p)).digest('hex'),verification=JSON.parse(readFileSync(pilotDir+'/export-v3-verification.json')),roof=JSON.parse(readFileSync(base+'/roof-quality-region-candidate-v3.json')),candidate=JSON.parse(readFileSync(candidateDir+'/manifest.json'))
  5. const exportRoot=pilotDir+'/export-v3',regions=[0,25].map(id=>{const r=candidate.regions.find(x=>x.id===id);return{id,url:r.url,contents:r.contentCount,previews:r.previewCount,decodedGeometryBytes:r.decodedGeometryBytes}})
  6. const packageData={version:1,createdAt:'2026-10-15',decisionState:'offline-candidates-ready-not-integrated',activeRuntime:{manifest:'/gis/cad-bim/city-regions-v7/manifest.json',configPath:'public/cockpit/config.json',configSha256:hash('public/cockpit/config.json')},buildingPilot:{candidatePath:exportRoot,verificationPath:pilotDir+'/export-v3-verification.json',verificationSha256:hash(pilotDir+'/export-v3-verification.json'),ids:verification.rows.filter(x=>x.level==='lod0').map(x=>x.id).sort(),cells:verification.cells,files:verification.files,lod0:{triangles:7746,bytes:161580},lod1:{triangles:800,bytes:24332},decodedResourcesEstimate:verification.decodedResourcesEstimate,footprintsPreserved:verification.footprintsPreserved,seatingPreserved:verification.seatingPreserved,roofImagesHashMatch:verification.roofImagesHashMatch,runtimeValidated:false},roofPilot:{candidatePath:candidateDir,verificationPath:base+'/roof-quality-region-candidate-v3.json',verificationSha256:hash(base+'/roof-quality-region-candidate-v3.json'),regions:roof.regions,previews:roof.previewFiles,fineContents:roof.fineFiles,changedTiles:roof.changedFineContents,decodedRasterDelta:roof.actualDecodedRasterDelta,region25DecodedEstimate:roof.region25Estimate,sourceHashesMatch:roof.sourceHashesMatch,geometryAndUvPreserved:roof.geometryAndUvPreserved,budgetCombinationChecks:roof.allPairsBudgetChecks,pipelineRegions:roof.pipelineRegions,renderingValidated:false,regionsSample:regions},gates:{mustKeepRuntimeV7UntilExplicitAcceptance:true,mustKeepProgressiveRefinement:true,mustKeepRegionCaps:{regions:2,contents:180,decodedBytes:100663296},mustKeepRuralWhitelistOnly:true,requireBrowserVisualAcceptanceBeforeIntegration:true,requireCacheMovementPerformanceCheckBeforeIntegration:true,userAcceptedProgressiveLoadingAndLowStutter:true},manualAcceptanceChecklist:[{id:'estate-shape',question:'反面坐标小区规则楼栋的排布、间距、高度关系和楼间道路是否达到预期?',requiredBeforeRuntimeIntegration:true},{id:'roof-color',question:'z19卫星屋顶纹理的色块/阴影/拼接在驾驶舱中是否可接受?',requiredBeforeRuntimeIntegration:true},{id:'positive-baseline',question:'正面坐标精模窗、层线、屋面细节是否维持已认可质量?',requiredBeforeRuntimeIntegration:true},{id:'loading',question:'增加屋顶纹理后连续拉近/跨区/管道切换仍保持已接受的渐进加载和不卡顿体验?',requiredBeforeRuntimeIntegration:true}],rollback:{roofCandidate:'keep v7 URL; discard candidate overlay only',buildingPilot:'do not add candidate manifest to public config',noSourceAssetDeleted:true},caveats:['All floors/heights remain area-based estimates, not surveyed measurements.','Satellite roof orthophoto date/licensing unknown; shadows/color seams may be baked into imagery.','Offline Blender render is not Cesium/cockpit render.','No Web build, server, browser, FPS/GPU validation was performed.']}
  7. writeFileSync(base+'/integration-decision-package.json',JSON.stringify(packageData,null,2));console.log(JSON.stringify({passed:true,runtime:packageData.activeRuntime.manifest,buildingIds:packageData.buildingPilot.ids,roofRegions:roof.regions,roofOverrides:roof.changedFineContents,checklist:packageData.manualAcceptanceChecklist.length,configChanged:false}))