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

@ -241,6 +241,12 @@ const API_CMD={
/* ---------- capacity broker ---------- */
listFiber:{args:[['id','entityId'],['w','integer'],['p','integer',false]],watch:['links.#id'],
doc:'List spare capacity on a dark-fiber span with a capacity broker as a standing listing: w alien waves, and p (own cables only) your spare fiber pair. The broker sells them off over time as carriers on that route want capacity; a busy route sells in days, a road to nowhere maybe once.'},
mktHold:{args:[['v','integer']],watch:['cm'],
doc:'Capacity market (Lambda Bazaar): the share of every fiber (0, 10, 25 or 50%) the broker never sells, kept for your own traffic.'},
mktCfg:{args:[['p','string'],['k','string'],['v','integer']],watch:['cm'],
doc:'Capacity market: for product p (spec = alien-wave spectrum, w100/w400 = managed 100G/400G waves carved from your lit capacity, iru = dark pairs on fiber you dug), set k: on (v 1 or 0: the broker lists it on every route by your thresholds), min (list only while the route wants at least v units; spec/w400 1,2,4,8, w100 1,4,8,16, iru 1,2) or floor (never sell below v% of list: 60, 80, 100, 120). Demand and prices move every day.'},
mktRoute:{args:[['k','string']],watch:['cm'],
doc:'Capacity market: toggle whether the broker trades on a route (k = the two city ids sorted and joined by |, e.g. ams|fra).'},
unlistFiber:{args:[['id','entityId']],watch:['links.#id'],
doc:'Take the listing down. What the broker already sold stays sold.'},
setChCount:{args:[['id','entityId'],['o','opticId'],['n','integer']],watch:['links.#id'],
@ -279,7 +285,13 @@ const API_CMD={
dropBiz:{args:[['id','entityId']],confirm:'double',
doc:'Terminate a signed customer. Rejected once an event contract\'s event has started.'},
setRoute:{args:[['id','entityId'],['m','routeMode']],watch:['biz.#id'],
doc:'How a customer\'s traffic is routed: normal follows metrics, fast takes the lowest latency, scenic the quietest links.'},
doc:'How a customer\'s traffic is routed: normal follows metrics, fast takes the lowest latency, scenic the quietest links. Clears a pinned path.'},
pathMove:{args:[['id','entityId'],['link','entityId']],watch:['biz.#id'],
doc:'Move a fiber customer (alien wave, dark fiber pair, fiber pairs) to another working fiber between the same two cities. Free. Rejected if that fiber has no room for it.'},
pathPin:{args:[['id','entityId'],['via','string']],watch:['biz.#id'],
doc:'Pin a circuit to a path: via is its city ids in order, comma-separated, from the customer\'s city to its city2, every hop a working link. Free. While a link on it is down the circuit follows routing.'},
pathAuto:{args:[['id','entityId']],watch:['biz.#id'],
doc:'Unpin a circuit, so routing chooses its path again.'},
/* ---------- traffic engineering ---------- */
buyTE:{args:[],quote:a=>({setup:TE_COST,monthly:TE_MO,blocked:coreTE()||(S&&S.te)?[]:[tr('core.auto_te_needs_an_rsvp_te_or')]}),
doc:'Buy the Auto-TE controller, which spills overflow onto alternate paths. Level 3+, and it needs an RSVP-TE-or-higher backbone.'},
@ -522,6 +534,7 @@ const API_VIEW={
dashClose:{args:[],doc:'Close the NOC dashboard.'},
nocWindow:{args:[],doc:'Open the NOC dashboard in a window of its own, for a second display.'},
dashTab:{args:[['k','dashTab']],doc:'Switch the NOC dashboard tab.'},
marketOpen:{args:[],doc:'Open the NOC dashboard at the capacity market (Lambda Bazaar).'},
dashSort:{args:[['k','dashSortKey']],doc:'Flip a dashboard column\'s sort.'},
dashLink:{args:[['id','entityId']],doc:'Jump from the dashboard to a link\'s panel.'},
bank:{args:[],doc:'Open the bank.'},
@ -541,6 +554,7 @@ const API_VIEW={
focusCity:{args:[['city','cityId']],doc:'Select and centre a city.'},
selLink:{args:[['id','entityId']],doc:'Select a link.'},
custGo:{args:[['id','entityId']],doc:'Jump from the dashboard to a customer.'},
pathOpen:{args:[['id','entityId']],doc:'Open the window listing the other paths a customer can move to: fibers for a fiber customer, routes for a circuit. pathMove and pathPin make the move.'},
listMore:{args:[['k','listPage']],doc:'Show another page of the dashboard list.'},
custF:{args:[['v','string']],doc:'Filter the customers list.'},
custCity:{args:[['v','string']],doc:'Filter the customers list by city.'},

View file

@ -78,6 +78,7 @@ const API_STATE_DOC={
confReg:{type:'map',doc:'Conferences registered for, by key; "sp" when sponsoring.'},
hw:{type:'map',doc:'Hardware market: price shocks and any price lock.'},
capDeal:{type:'map',doc:'The pending capacity deal from a capacity conference.'},
cm:{type:'map',doc:'The capacity market (Lambda Bazaar): hold (% of every fiber never sold, kept for your own traffic), p (per product spec/w100/w400/w800/w1600/iru: on, min demand, floor % of list), off (routes the broker leaves alone, by "a|b"), sh (market shocks: why, from, until, m multiplier, on a route k, a city c or every subsea route), news (the latest market news), seen (incident ids already turned into news).'},
cam:{type:'map',doc:'Map camera position. View state that save() happens to store inside S.'},
uiSpeed:{type:'number',doc:'The speed you left the game at. View state that save() stores inside S.'},
won:{type:'boolean',doc:'You reached Tier 1.'},
@ -85,6 +86,7 @@ const API_STATE_DOC={
lost:{type:'boolean',doc:'The bank repossessed the routers.'},
neg:{type:'integer',doc:'Days in the red in a row.'},
hist:{type:'array',doc:'Daily history for the graphs: demand, served, exit split, revenue, cost, cash.'},
vol:{type:'number',doc:'Traffic carried in this game, in petabytes (each day adds a day of what was served); badges at 1 PB, 100 PB, 1 EB and 1 ZB.'},
scn:{type:'map',doc:'The running scenario: id, rules, day limit, done/failed, and the day of the next scripted attack (nextDdos).'},
dk:{type:'map',doc:'De-Kicks state: per-exchange multipliers, add-ons, retention, the live quote (q) and the remembered one (lastQ).'},
grace:{type:'map',doc:'Courtesy transit after a merger wave, until a day.'},