Merge upstream: Lambda Bazaar, traffic badges, moving customers and faster routing (3.3.0)
Some checks are pending
CI / plan (push) Waiting to run
CI / part (push) Blocked by required conditions
CI / build (push) Waiting to run
CI / translations (push) Waiting to run
CI / test (push) Blocked by required conditions
CI / timings (push) Blocked by required conditions
Container image / gate (push) Waiting to run
Container image / test (push) Blocked by required conditions
Container image / publish (push) Blocked by required conditions
Some checks are pending
CI / plan (push) Waiting to run
CI / part (push) Blocked by required conditions
CI / build (push) Waiting to run
CI / translations (push) Waiting to run
CI / test (push) Blocked by required conditions
CI / timings (push) Blocked by required conditions
Container image / gate (push) Waiting to run
Container image / test (push) Blocked by required conditions
Container image / publish (push) Blocked by required conditions
CHANGELOG.md: upstream's released sections as they are; main's 11 Unreleased bullets kept under Unreleased. scripts/lib/route-fuzz.js: upstream's skip of dashboard tabs the base lacks, plus main's trimming of args the base's buttons lack. src/game/10-catalog/40-ports.js: upstream's one-pass portsAt(); an express still takes ports per channel at its ends. src/game/10-catalog/60-reach-and-subsea.js: upstream's dfLit/dfCap0/dfOn (managed waves carved out); capOf() keeps xp and sat. src/game/60-features/80-new-game.js: upstream's vol and cm in a new game, with main's ip4, rgen, mp and saved-shape fields. src/game/60-features/95-standing-orders.js: upstream's portsAt, cachePlan and promiseCheck, inside main's build-standard routers order, optup marks, opsDarkPre and decom gone list; opsPairs still leaves satellites out. src/game/80-simulation/30-compute.js: upstream's routing core; main's satellite edges (SATN) pass into it, express risks and sat/ip4 money stay. src/game/80-simulation/29-route-core.js: main's satellite latency note moved into the core, where upstream moved the flow loop. src/game/80-simulation/40-billing.js: main's linkCut() and xp/sat in linkDown(), with upstream's dfOn(). src/game/80-simulation/50-sanitize.js: upstream's cmClean listings and cmFix/volFix; main keeps the xp/sat kinds, mpSanitize, ip4Fix and satSanitize. src/game/80-simulation/60-requirements.js: upstream's shared diversity graph; an express link carries the list of trenches it rides. src/game/91-save.js: upstream's saves in the worker, except a multiplayer session network, whose text is made on the page (mpSave) so the server gets the very save the slot holds; bootNotes() kept. src/game/91-slots.js: upstream's slot text and day, with main's mp badge on a slot. src/game/93-ui/70-link-panels.js: a fiber says both its managed waves and the expresses it carries. src/game/94-dashboard/60-dashboard.js: upstream's carried tile, main's themed demand line. src/game/95-modals/70-link-modal.js: main's Express tab, then upstream's hint for a coast no cable lands on (#321). After the merge: - Moving a circuit: a path over an express shares the trenches of the fibers it rides, so it is never called fully diverse from a path along them (test in express-fiber). - The capacity market and moving customers leave the slots expresses hold (test in express-fiber; no code change needed). - The NOC log keeps only the kinds a reload keeps: the market's info/warn news is a plain line, live as after a reload. - New acts classified for server-run play: market and path moves sent, marketOpen and pathOpen local; pathPin's path may be longer than 64 characters. - Server-play fixtures written again (new cm and vol fields); the dark-mode test reads mapStill()'s three states. - A big multiplayer network that moved on still pushes its save to the server (test in multiplayer). - The full suite ran on jsdom 31.0.0 and playwright-core 1.65.0, the versions the merged lockfile pins.
This commit is contained in:
commit
61e31c53d3
105 changed files with 3281 additions and 664 deletions
|
|
@ -254,6 +254,34 @@ test('multiplayer: saves go to the server on a new day, at most every 15 s, neve
|
|||
dom.window.close();
|
||||
});
|
||||
|
||||
// A big network that moved on is saved by the route worker in a plain build (tests/save-size.test.js). A session
|
||||
// network is not: its text is made on the page (mpSave()), so the server gets the very save the slot holds.
|
||||
test('multiplayer: a big session network that moved on saves on the page, never in the route worker, and the server gets it', async () => {
|
||||
const srv = store(), f = fake(srv.routes);
|
||||
const { dom, ev, errors } = await started({ fetch: f, load: { gzip: true } });
|
||||
dom.window.structuredClone = globalThis.structuredClone;
|
||||
// Big enough for the worker (GZ_BG), small enough to be written plain at once when forced (GZ_MIN).
|
||||
ev("for(let i=0;i<5000;i++)S.log.push({d:S.day,h:'A long line in the log to make a big save '+i,k:''});save(true)");
|
||||
const len = ev('JSON.stringify(packSave(S)).length');
|
||||
assert.ok(len >= ev('GZ_BG') && len < ev('GZ_MIN'), `between the two thresholds: ${len}`);
|
||||
assert.equal(ev('SLOT.day[UI.slot]===S.day'), true, 'the slot knows its day');
|
||||
// A route worker that compresses, and keeps whatever else it is sent.
|
||||
ev("window.__q=[];rwOn=()=>!RW.dead;rwStart=()=>RW.w||(RW.w={postMessage:m=>{if(m.gz!==undefined)gzB64(m.txt).then(data=>rwMsg({gz:m.gz,data}));else __q.push(m);},terminate(){}});");
|
||||
await until(() => ev('!MP.busy'));
|
||||
const n = f.saves().length;
|
||||
ev('S.day++;MP.last-=16000;save()');
|
||||
assert.equal(ev('__q.filter(m=>m.sv!==undefined).length'), 0, 'the whole save never went to the worker');
|
||||
assert.ok(await until(() => f.saves().length === n + 1), 'the new day went to the server');
|
||||
await until(() => ev('!MP.busy&&!UI.gzBusy'));
|
||||
ev(`window.__t=null;Promise.all([gunzip(slotRaw(UI.slot)),gunzip(${lit(srv.st.save.data)})]).then(t=>{window.__t=t;})`);
|
||||
assert.ok(await until(() => ev('!!window.__t')), 'the slot was written, both compressed');
|
||||
const here = JSON.parse(ev('__t[0]')), there = JSON.parse(ev('__t[1]'));
|
||||
assert.deepEqual([here.day, here.mp.seq], [there.day, there.mp.seq], 'the same day and number here and on the server');
|
||||
assert.equal(here.day, ev('S.day'));
|
||||
assert.deepEqual(errors, []);
|
||||
dom.window.close();
|
||||
});
|
||||
|
||||
test('multiplayer: when another device moved on, the player hears it once and chooses', async () => {
|
||||
const f = fake([okStart, okSave]);
|
||||
const { dom, ev, errors } = await started({ fetch: f });
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue