This commit is contained in:
33333-33333 2026-07-31 12:54:46 +09:00
commit c3a6f5ff37
80 changed files with 2512 additions and 1625 deletions

View file

@ -101,6 +101,7 @@ function persistenceContext({localMeta=null,localState=null,existingMeta=null,ex
fieldBoundsFromMetas:()=>({minX:0,minY:0,maxX:1,maxY:1}),SAVE_SCHEMA:31,WORLD_GENERATION:'current-only-test',
clearRecoveryJournalIfCovered:()=>{},broadcastWorldSignal:()=>{},scheduleCloudPush:()=>{},
refreshWorldView:()=>{context.refreshes++},refreshes:0,
interactionActive:()=>false,waitForInteractionSettle:async()=>{},
perfStart:()=>0,perfEnd:()=>{},perfGauge:()=>{}
};
vm.createContext(context);
@ -153,8 +154,10 @@ async function verifyPersistenceConflicts(){
}
function verifyGlobalMerge(){
const {normalizeSpecialMechanics}=require('../shared-contracts');
const context={
deepClone:value=>structuredClone(value),structuredClone,
normalizeSpecialMechanics,
validWorldEpoch:value=>typeof value==='string'&&value.startsWith('world:'),
compareRevisionVersions:(a,b)=>(a?.rev||0)-(b?.rev||0)||String(a?.revAuthor||'').localeCompare(String(b?.revAuthor||'')),
bonusEventTotal:events=>Object.values(events||{}).reduce((sum,value)=>sum+(value||0),0)