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

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:
jvanvik 2026-11-09 18:32:15 +01:00
commit 61e31c53d3
105 changed files with 3281 additions and 664 deletions

View file

@ -1274,7 +1274,10 @@ test('#51 a dark fiber shows what is rented out, and spare capacity can be liste
ev("for(let i=0;i<120&&!S.biz.some(b=>b.link==='df1');i++)brTick();renderPanel()");
const b = JSON.parse(ev("JSON.stringify(S.biz.find(x=>x.link==='df1'))"));
assert.equal(b.type, 'wwave');
assert.equal(b.rate, ev(`(()=>{const F=dfLeaseMo(450)+ampCount(450)*AMP_MO,M=brMarket('fra','ams');let r=0;for(let i=0;i<${b.slots};i++)r+=F*WW_SHARE*(1-WW_FALL*Math.min(1,i/M));return Math.round(r*0.9)})()`), 'the alien-wave price, priced against the fiber, minus the broker');
// The capacity market prices it (37-fiber-market.js): 30% of the fiber's cost a month, moved by how hot the route is
// and how full, minus the broker.
assert.equal(b.rate, ev(`(()=>{const r=cmRoutes().get('ams|fra');let x=0;for(let i=0;i<${b.slots};i++)x+=cmList(r,'spec')*cmIdx(r,'spec',0,i,S.day);return Math.round(x*0.9*mkt())})()`), 'the alien-wave price, priced against the fiber, minus the broker');
assert.ok(Math.abs(ev("cmList(cmRoutes().get('ams|fra'),'spec')/(dfLeaseMo(450)+ampCount(450)*AMP_MO)") - 0.3) < 1e-9);
assert.ok(txt().includes(b.name), 'the customer is listed on the fiber');
assert.match(txt(), new RegExp(`Free channels\\s*${62 - b.slots} / 64`));
assert.equal(ev("S.links[0].list?S.links[0].list.w:0"), 4 - b.slots, 'the listing shrinks by what sold');