t
Some checks failed
BEND FIELD CI / release (push) Has been cancelled
BEND FIELD CI / production-bridge (push) Has been cancelled

This commit is contained in:
33333-33333 2026-08-01 22:31:04 +09:00
commit 9d70afb4cc
42 changed files with 1266 additions and 630 deletions

View file

@ -37,5 +37,6 @@ const world=revision=>({revision,rowRevision:revision,boardVersions:{},changes:[
assert.equal(JSON.parse(fs.readFileSync(worldFile,'utf8')).revision,1);
assert.equal(JSON.parse(fs.readFileSync(playerFile,'utf8')).earnedScore,100);
assert.equal(fs.existsSync(commitFile),false);
const poisoned=JSON.parse(fs.readFileSync(worldFile,'utf8'));poisoned.global.worldGeneration='foreign-generation';fs.writeFileSync(worldFile,JSON.stringify(poisoned));fs.writeFileSync(path.join(boardsDir,'B9.99.json'),'{}');assert.equal(await server.collectRetiredBoardVersions(),0);assert.equal(fs.existsSync(path.join(boardsDir,'B9.99.json')),true,'Generation mismatch cleanup deleted an unreferenced shard');
console.log('Shared-world commit recovery and retired-version collection passed');
})().finally(()=>fs.rmSync(dataRoot,{recursive:true,force:true})).catch(error=>{console.error(error);process.exitCode=1});