Commit graph

582 commits

Author SHA1 Message Date
jvanvik
41e6fd78ef Review fixes for Starblink, Island Wi-Fi and late joiners
Some checks failed
CI / plan (push) Has been cancelled
CI / build (push) Has been cancelled
CI / translations (push) Has been cancelled
Container image / gate (push) Has been cancelled
CI / part (push) Has been cancelled
CI / test (push) Has been cancelled
CI / timings (push) Has been cancelled
Container image / test (push) Has been cancelled
Container image / publish (push) Has been cancelled
- Until a zone's first circuit or spur is up, its row and panel say when the islands come online instead of homes out of 0 and a red 0% served (wisp-commissioning-homes-of-zero).
- Once your own constellation flies, a zone's Starblink row points to GEO, MEO or a spur (wisp.leo_no_rivals), never to a pie dish (zone-leo-pie-dish-advice).
- The late joiner's welcome and bank note say the match is on home broadband, not island Wi-Fi, in all six languages (late-match-island-homes).
- A gateway's section shows its city's transit ports (Transit out of the city) and warns when they fill; the fiber row only where there is fiber (leo-backhaul-transit-only).
- Spurs are subsea cable, no longer unrepeatered, in every language and the catalog comment (spur-unrepeatered-1400km).
- French calls a spur a câble de dérivation, not a câble d'antenne (fr-spur-cable-antenna).
2026-11-12 03:36:31 +01:00
jvanvik
66ac7d0af1 Island Wi-Fi, Starblink and late joiners work together
Checked after merging the three, and pinned with a test (tests/late-joiners.test.js): a late network with a Starblink
zone and a lit spur pays its islanders' income in full but has only its homes matched; investors on a revenue share
take their cut of homes, islands and an IPv4 lease, never of the match; a spur cut and a solar storm need a lit spur or
a LEO circuit, not a number of days, and come on the network's own outage schedule (S.nextFail, counted from S.day0),
so no grace needed moving; a reload keeps the game.

- CHANGELOG: Island Wi-Fi names zones as the game does (Abaco and Eleuthera) and says a spur has upkeep but no rent.
- Agent: a stray "., " in the pops doc where the Starblink and Island Wi-Fi lines met.
- Plans: open question 6 (WISP zones and a rented LEO tier) marked answered and built.
2026-11-12 02:25:24 +01:00
jvanvik
9067bae1ce CHANGELOG: shorter first sentences for the Unreleased bullets 2026-11-12 02:15:22 +01:00
jvanvik
efe4405ea4 Investors on a revenue share take their cut of IPv4 lease income (#150)
Merged onto Island Wi-Fi: the revenue share base keeps the islands (V.wisp) and adds IPv4 leases (V.ip4); the CHANGELOG bullet goes above the Island Wi-Fi and Starblink ones.
2026-11-12 02:15:22 +01:00
jvanvik
6f0c080875 Island Wi-Fi for 18 groups of outer islands, by satellite and spur cable (#83)
Each zone (Vanua Levu & Taveuni off Suva, the Out Islands off Nassau, and
16 more) is a pool of island homes at your POP in its city: no node and no
link on the map, its Gbps join the city's demand. Rent backhaul at the
city's teleport (about 35% sign up over GEO, 75% over MEO, 90% over
Starblink from a gateway there) or, from level 3, lay a spur cable and
everyone may sign up. The first order brings the island kit. Islanders pay
island prices, their homes are IPv6-only in the NAT64 pool, and investors
on a revenue share take their cut. A spur can be cut for weeks (failure
'wspur', chaos only): a satellite kept beside it carries the islands. Zones
are off in puzzles, the Architect, scenarios and below level 2.

The satellite geometry works on points now (satSeesAt, satPairAt, satKmAt;
the city functions wrap them, with the same answers). Starblink serves a
zone only from a gateway in its own city (16 of 18; a gateway anywhere in
reach would serve the same 16), with its storm and rival rule; Nunavut and
Southeast Alaska stay on GEO. Rules W6 and F12.
2026-11-12 02:12:21 +01:00
jvanvik
7967a29083 Rent low-orbit satellite capacity from Starblink (#83)
A Starblink gateway on a teleport at a POP on your fiber (level 5, within
56 degrees of the equator) rents LEO circuits of 5 to 50 Gbps to small
islands and remote towns within 1,200 km: a bent pipe 550 km up, about
30 ms round trip, 3% of the service counted as bad, and no selective
network refuses it. LEO puts GEO and MEO circuits on the same pair on
standby and waits beside a cable. The gateway's Infra section shows its
POP's forwarding load and the fiber out of the city, the islands'
bottleneck. A rare solar storm (and Pie's own) puts LEO in safe mode for
a day or two. Once your own crust carries traffic Starblink sells nothing
new. Rule O8. Hooks for island Wi-Fi: leoReachLL, leoKmLL, leoMsLL.
2026-11-12 01:34:46 +01:00
jvanvik
08eb349d87 Merge upstream: POP standards, latency contracts, device transfer, typed links and NOC downgrades (3.4.0, 3.5.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
Conflicts, file by file:
- CHANGELOG.md: the fork's Unreleased bullets on top; 3.5.0 and 3.4.0 exactly as upstream has them.
- src/i18n/en.js, site/i18n/{de,es,fr,it,pt}.js: merged label by label, sorted; the labels each side dropped stay dropped.
- src/agent/10-domains.js, 30-docs.js, 40-read.js: both sides' enums, state docs and tables (popStd as the build standard, popTiers, ip4, mp).
- src/agent/20-commands.js: the fork's wording on accept and upRouter, upstream's acceptFix, utilityKitAll/New and pt*; theme, session and transfer acts in the local table.
- src/game/60-features/80-new-game.js: ip4, rgen and mp next to popTiers.
- src/game/80-simulation/29-route-core.js, 30-compute.js: the route core takes both SATN and the spill tiers (TT).
- src/game/80-simulation/40-billing.js: upstream's gulfPair and borderShut; linkCut() is built on borderShut, linkDown() keeps express and satellite.
- src/game/80-simulation/50-sanitize.js: PNI bundles up to PNI_LAG_MAX next to the fork's link kinds; popStdSanitize then ptSanitize; mpSanitize then lcSanitize.
- src/game/80-simulation/75-customer-lifecycle.js: clGrow() stops at a type's most (#137) and at an IPv4 block that is not free (#150).
- src/game/90-actions/60-links.js: rmLink keeps the express guard and moves on to the next parallel link (#119).
- src/game/90-actions/85-routing-and-routers.js: rmRouter checks the PNIs on its routers (#323), upRouter keeps own().
- src/game/90-actions/89-game-and-settings.js: the menu keeps the build standard and session tiles and gains Send to another device.
- src/game/93-ui/40-hud-and-panels.js, 70-link-panels.js: offers show both the IPv4 note and Buy and sign; link headers name their cities, the closed-border section reads in dark mode; the express count stays.
- src/game/93-ui/50-city-panel.js: the teleport section and Link to a city.
- src/game/94-dashboard/40-connections.js: upstream's per-table next port size replaces the fork's own 400G guard.
- src/game/94-dashboard/90-noc-window.js, 96-map/95-clicks.js, 99-loop.js: both sides' acts and boot steps.
- src/styles/40-modal.css: the dark-mode tag tokens and the transfer textarea.
- tests/mcp-commands.test.js: both sides' sample args.

Interaction fixes:
- POP standards and the build standard: a POP marked as a kind keeps its kind's routers (ptKind). The build
  standard's router jobs and the intern's model swaps leave it alone; every other target still applies. Both sheets say so.
- Spill tiers: pathMs() fills a path's ground latency and satellite edges too, so a tier's detour costs users its
  latency (it went uncharged before).
- Send to another device: a session network goes by the session's own #mp= link; its save file is called a copy.
- Buy and sign (#241) does not buy for an offer whose IPv4 block does not fit.
- Dark mode: the closed-border title and the renewal ticks use the dark-aware red (upstream's #292 test follows).
- Server-run tables: the new acts classified (pt*, acceptFix and utilityKitAll quote their cost); mp-sim fixtures
  written again with tests/lib/mp-sim-fixtures.js.

Review fixes:
- POP standards: ptSave, ptApply, ptPlan, ptAll and popStdSet find a POP with own(), so 'toString' is no POP (also
  decomToggle, decomGo, dkStay).
- Server-run envelope: an arg value that names anything on Object.prototype is refused, in args, drafts and
  ctx.win.ui.
- Decommissioning a POP drops its POP-standard mark, so live state stays what a reload makes of it (the T2 gate
  refused later pt* acts).
- acceptFix, ptApply, ptAll and utilityKitAll take a quote within 1% (quoteNear), like utilityKit and bstdApply:
  router prices drift daily.
- The transfer paste box reads in dark mode (--text, as input.t).
- A session's #mp= link pasted under From another device opens it (saved, then loaded again with it), in MP builds.
- The express and satellite circuit panels name their cities as links (#196); a circuit shows the closed-border
  section (#329).
- CHANGELOG: the fork's 400G connections bullet goes (3.5.0 ships it); bullets for POP kinds, the session link and Buy
  and sign's IPv4 check.
2026-11-12 00:52:42 +01:00
Frederic Jung
9c26d03952
Conferences stop notifying once you are Tier 1 (#101)
After the Tier 1 goal, the 30-day reminders, the report (and its coin sound)
on the day and the sales engineer's booking notes are no longer shown or
logged. Registering, sponsoring, the glow, raffles and capacity deals work as
before, and the Deals tab still lists conferences.

Fixes #101
2026-11-11 18:37:18 +01:00
Frederic Jung
99b16f6184
Type a city to start a link, downgrade from the NOC dashboard, and fixes (3.5.0) 2026-11-11 15:59:04 +01:00
Frederic Jung
727c8f8500
Connections list: look up the next port size in each port's own table
nx() now takes the size table it should look in, so fabric ports ask NNI
(up to 400G) instead of special-casing the 400G port. Adds the PR number
to the #342 CHANGELOG bullet.
2026-11-11 15:54:37 +01:00
Frederic Jung
2b8bd1c402
Start a link by typing the city it goes to (#343)
A POP's Infra tab gets Link to a city: it opens the city finder in link
mode, which offers only cities a link from there could end in, and picking
one (or Enter) opens the same link window as dragging between the two on the
map. Much easier than finding a far-away city on a crowded phone screen.

Fixes #343
2026-11-11 15:44:38 +01:00
Frederic Jung
c52e7c7747
Downgrade and chase connections from the NOC dashboard (#336)
The Connections tab now has the POP panel's shrink buttons next to the
upgrades: a downgrade to the next smaller port for transit, PNIs and IX
ports, one LAG member less (also for NNIs), and Chase it for a PNI that is on
order or waiting for a bigger port. Same actions and conditions as the panel;
the NOC pop-out window runs them in the game.

Fixes #336
2026-11-11 15:44:28 +01:00
Germain Carré
e2b3615a19
Keep the Connections list working with 400G fabric ports (#342) 2026-11-11 15:35:50 +01:00
Frederic Jung
e27e9e3066
Keep hand-listed alien waves on the market (#340)
With the capacity market selling alien waves (or pairs), its daily pass set
every fiber's listing to what the thresholds allowed: 128 waves listed by hand
came back as 96 (after the 25% kept back), or were taken off entirely when
the route's demand was below the minimum or the price below the floor.

A listing now remembers how much was listed by hand (l.list.hw / hp). The
broker lists its own share on top, capped at what the fiber has free; sales
use up the broker's share first; switching a product or route off keeps the
hand-listed part. cmClean() checks the new fields, so old saves load as before.

Fixes #340
2026-11-11 12:06:23 +01:00
Frederic Jung
c137d3552d
Send networks to another device, latency routes, POP standards and more (3.4.0) 2026-11-10 14:50:26 +01:00
Frederic Jung
1ccdda171b
Send a network to another device through the share sheet instead of QR codes (#263)
QR codes do not scale: a played network takes several, a big one dozens. The
save file now goes through the device's own share sheet (AirDrop, Quick Share,
a chat with yourself, email), whatever its size, and opens on the other device
with Import a save. Chromium refuses to share .json files, so there the same
file goes as .txt, which Import a save now takes too. The whole-network link
stays for copy and paste. The file is prepared before the tap, because a share
sheet only opens straight from a user's gesture.
2026-11-10 13:19:00 +01:00
Frederic Jung
79426f7a00
Move a network to another device with QR codes or a link (#263)
No server and no account: the network travels gzipped in the fragment of a
link, which browsers never send anywhere. One link carries all of it, to copy
or share; QR codes carry it in parts that a phone's own camera app opens one
after another, and the receiving page collects them in any order, then imports
the network like a save file. To keep the codes few they leave out the charts'
history and the news log (a year-old network: 4 codes instead of 10); the link
carries everything. The QR encoder is a small built-in one, checked against the
reference implementation for every mask.
2026-11-10 12:31:40 +01:00
Frederic Jung
e8cbb9b440
Merge branch 'claude/latency-contracts' into trial
# Conflicts:
#	.claude/skills/gameplay-rules/SKILL.md
#	CHANGELOG.md
#	tests/day-steps.test.js
#	tests/route-fuzz.test.js
2026-11-10 09:36:11 +00:00
Frederic Jung
12ce66b33a
Merge remote-tracking branch 'origin/main' into claude/latency-contracts
# Conflicts:
#	CHANGELOG.md
2026-11-10 09:33:49 +00:00
Frederic Jung
d2e642adb9
Merge remote-tracking branch 'origin/main' into claude/bulk-actions 2026-11-10 09:23:29 +00:00
Frederic Jung
69cdb3e372
Grow sideways in the late game: localised eyeball traffic, spread AI campuses, PNIs by router, spill tiers
Traffic to networks that sell to homes now starts where their users live (#48),
giant AI circuits come from campuses in 34 metros and less often from crowded
ones (#61), a PNI bundles eight members per router up to 32 (#323), and
RouteScript spill tiers move overflow onto detours within a latency budget (#136).
2026-11-10 07:25:21 +00:00
Frederic Jung
32b0b282f8
Bulk actions for the late game: POP standards, kit everywhere, buy on signing, network search
- POP standards by kind (micro, medium, regional hub), one button per POP and one per kind in Utilities (#315)
- Redundancy kit at every POP from Utilities, and in the intern's template (#317)
- Offers that need a generator, second router or second site can buy it and sign (#241)
- The intern's Light more fiber order can leave new fiber dark (#316)
- Search and connected-only filter for a POP's transit, exchange, PNI and cache lists (#199)
- The link panel moves on to the next parallel link after a decommission (#119)
2026-11-10 07:03:57 +00:00
Frederic Jung
e51510a115
Strict latency contracts: big late-game customers who pay for a latency SLA (#137)
From customer level 7, low-latency wholesale routes ask for 1.6 or 3.2 Tbps
between two cities with the latency limit trading links already have
(REQS.lat on the circuit latency compute() measures). They pay about three
times a hyperscaler DCI per Gbps on the same route, never grow past 3.2 Tbps,
and every day over the limit after the provisioning grace credits a day's fee
and costs extra patience. New rule F9 in gameplay-rules.
2026-11-10 06:56:02 +00:00
Frederic Jung
d086fcbd92
Show traffic, price per Gbps and path terms on renewal haggles; link panel city names open the city
Renewal haggles in Deals now show booked and served Gbps (sites for SD-WAN), the
price per Gbps now and asked, and the latency limit and path terms the customer
signed for, each ticked as the network stands today (#292).

The two city names in the header of wave, dark fiber and virtual circuit panels
are buttons that open that city (#196).
2026-11-10 06:51:34 +00:00
Frederic Jung
36629195cc
Say why a link is down when a closed border took it (#329)
The Gulf spat and Russia's sovereign internet drill take links down in
linkDown(), and the map draws them broken, but the link panels only
explained cuts and incidents, so a Doha–Abu Dhabi wave looked healthy
in its panel with no way to fix it. The panels now show a 'Border
closed' section with the days left, and the wave and dark fiber modals
warn before leasing across the closed Qatar border.
2026-11-10 02:02:10 +00:00
jvanvik
9601345201 Review fixes for the small-fix batch
Some checks failed
CI / plan (push) Has been cancelled
CI / build (push) Has been cancelled
CI / translations (push) Has been cancelled
CI / part (push) Has been cancelled
CI / test (push) Has been cancelled
CI / timings (push) Has been cancelled
What an IPv6-only swap still owes is set aside for every job after it,
not only for the next swap. The intern's shift reads it once (X.ow in
opsShift(), refreshed when the build standard order starts a swap) and
every standing order's can() keeps it above the cash floor, whoever
started the swap; the sheet's button checks it for every job of the
click. Before, the same click or the next shift could spend it (a
generator, a line system swap), and the swap then paid its routers
under the floor or waited for weeks. ip6Owed() is 0 while IPv4 is
plentiful, when the swaps wait anyway.

satOnly() counts a fiber or cable to the island only once it has optics
of its own: dark glass carries none of the island's traffic, so the
selective peers keep refusing and an exchange session there stays
paused. ixSessions() looks up the city's satellite circuit once per
exchange instead of once per member.

The standing-order descriptions of the build standard and the optical
upgrade say a customer's wave holds a fiber, not any customer (new
labels, every language). The batch's CHANGELOG bullets get first
sentences that fit the in-app notes; the satellite bullet says PNIs and
your own exchange keep peering, the hint bullet that it shows up to
four teleports. German and Italian express.dim use the dictionaries'
own words, and the German and Spanish IPv6-only note reads naturally.
2026-11-09 23:43:53 +01:00
jvanvik
417160f383 Build standard: a Broadband: IPv6-only row, rolled out by the button and the intern (#150)
The owed follow-up to IPv6-only broadband (next-session item 4). A new POP
target, v6, shown and planned only while IPv4 is scarce (rule ip4): bstdPlan()
makes a job per broadband city still on dual stack (ip6Todo()), the most
dual-stack homes first (the most behind CGNAT, the most addresses freed), each
calling ACT.ip6Go(). Its price is the whole swap (ip6Cost(), the city panel's
own figure); its mo is the IPv4 bill's change, counted one city after another
on a copy so the sum is all of them done.

ip6Go() pays nothing at the start (the routers are paid day by day), so these
jobs are marked later: the button and the std order start one only with the
whole swap in hand on top of what the swaps under way still owe (ip6Owed(),
X.can's new owed argument for the floor), and the order counts the whole swap
against its month's budget (not in what the shift paid up front). The button's
toast counts started swaps whole, as the quote did.

The sheet shows the row and a note only while ip4On(); bstdLine() counts it;
the MCP docs (bstdSet, bstdApply, popStd) name it. Strings in all six
dictionaries. Tests: tests/bstd-ipv6-only.test.js (order and price, the
button, budget and floor, rule off, saves, the sheet at 360 px portrait and
landscape in every language).
2026-11-09 23:02:19 +01:00
jvanvik
286ae48207 Build standard: never take a fiber dark under a customer's wave; the intern no longer skips leased pairs and IRUs
The build standard's Apply could swap the line system on a fiber that carries a
sold alien wave or a Lambda Bazaar managed wave, taking those customers dark for
a day with no warning. The intern refused any fiber with any customer on it,
leased pairs and IRUs included, though a line-system swap cannot touch them.

One helper next to fiberOk(), dfWaveCust(), says whether a customer rides the
fiber's line system (every fiber type but glass: dfpair, pairs, capfib), and both
bstdDarkOk() and opsDarkPre() use it. bstdPlan() holds such a fiber (J.held) and
lists it in J.wv; the sheet and the MCP quote give that reason. The link
panel's own upgrade button (ACT.upSys) still swaps with a warning toast.
2026-11-09 23:02:02 +01:00
jvanvik
1f76639b8f Selective peers will not meet you where a satellite is your only way out (#83)
An island or remote town that only satellite circuits join to the rest of
your network (satOnly: no built wave, fiber, cable or pie dish there, its
fastest circuit otherwise) is a place many selective networks will not
peer: they would hand you traffic for your whole network to haul through
orbit. Like remote peering, the verdict is stable per network (a hash):
60 in 100 selective networks refuse a GEO hop, 15 in 100 a MEO one, and
every network that minds MEO minds GEO too. It is judged on what is built,
never on today's cuts, so the single-spur trap does not also pause your
peering mid-outage.

peerOk refuses new IX sessions and PNIs there with one line naming the
orbit and the circuit's round trip; ixSessions leaves an existing session
out while the island is satellite-only, without deleting it from S.peers,
so it carries again once a wave or cable is lit. Existing PNIs stay. No new
state, nothing for saves.
2026-11-09 23:01:51 +01:00
jvanvik
ae78e82ddb Express lightpaths: regen cards for their channels, and dirty connectors dim them (#58)
A regen site added to a fiber that already carries expresses now charges a
regen card for every express channel in that glass, as it does for the
fiber's own channels. One helper, regenAddCost(), prices it for the action,
the fiber panel's button and the MCP dry-run quote, so the three agree.
Lighting an express over existing regen sites already paid its cards
(xpCost); only adding a site later was free for them.

A dirty connector on a fiber is in the glass, so it now dims the expresses
riding that fiber by the same factor (capOf multiplies xpG by xpGlassF over
the express's fibers), and the express's panel names the fiber. The other
link-degrading incidents (MTU mismatch, microbursts, a marginal optic's CRC
errors) belong to the fiber's own routers and optics, which an express
bypasses, as the optic-failure incident already treats them, so they leave
expresses alone. The incident marks the connector with loss.glass=true;
sanitize keeps the flag only when it is true, so an old save's loss loads
as router-side, as it behaved before. A fiber that only carries expresses
can now get the dirty connector too (never the router-side variants), like
the backhoe and amp-hut incidents already find it.
2026-11-09 23:01:46 +01:00
jvanvik
2dc8274f34 The no-cable hint in the link window names the satellite (#83)
Upstream 3.3's hint for a coast where no subsea cable lands (#321) said only a
cable of your own could get to Iqaluit or Adamstown, and left satellites out at
Pevek, though a teleport reaches all three. Once teleports are on sale (level
2) and a bird you may rent from sees the city, the 'own' case says a satellite
circuit or a cable of your own can get there (a new string), and every case
adds the satellite line: the city panel's 'Your teleports can reach' with a
button per teleport to its order sheet (satOpen), or where to build one. Not
in puzzles, and not before level 2, like the rest of the satellites.
2026-11-09 23:01:43 +01:00
jvanvik
7930d332f1 IPv4 notices in the notifications open the address space (#150)
The IPv4 toasts (CGNAT, out of IPv4, a renewal that could not grow, an
IPv6-only city done) carry an Address space button, but openOf() did not know
ip4Open, so their line in the NOC's notifications had no Open. It now maps to
a log target of its own, 'ip4', like 'ops' for opsOpen: Open runs ip4Open, the
bank scrolled to its Address space (just the bank if IPv4 is off since).
sanitize() keeps the new target. ip4Open is also on the NOC window's list of
actions it may run in the game, should a dashboard tab ever draw it.
2026-11-09 23:01:43 +01:00
jvanvik
27ffa33d7c Dark mode: red text and the market's heat tags read on the dark panels (#80)
Red warning text used var(--bad), 3.8 to 4.8:1 on the dark cards and tints.
Every text use now takes var(--tx-red,var(--bad)): light mode keeps --bad,
dark gets #FF8E9B (5.65:1 or better on paper, soft and every tint). --bad
stays the fill under white letters (buttons, counters, bars).

Lambda Bazaar's Hot and Cool tags kept their light pastel chips at night.
They now use the dark tints (--tint-o, --tint-b) with --tx-amber and a new
--tx-blue, keeping the same colours by day.

The dark-mode test checks the tags, the text tokens on every dark card, that
no tag keeps a bare pastel fill, and that no red text in --bad is left in the
styles or the game's markup.
2026-11-09 23:01:43 +01:00
jvanvik
61e31c53d3 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.
2026-11-09 19:04:21 +01:00
Frederic Jung
e0671c02be
Move customers between paths, and big networks route in half the time (3.3.0) 2026-11-09 13:37:12 +00:00
Frederic Jung
1579f3743b
Merge pull request #311 from thesysadmindev/move-customer-path 2026-11-09 13:15:55 +00:00
Frederic Jung
249ad4d478
Merge pull request #320 from antt0n/perf/routing-core 2026-11-09 10:21:20 +00:00
Christopher Hawker
3554e9f700 Moving waves checks the room the broker would sell: bandwidth for managed waves, and what is kept back
Managed waves need a channel as big as the wave and their bandwidth spare after your own traffic and
the share kept back, on leased fiber too. A move bumps CM_V so their capacity follows them, merging
needs the same size, and alien waves leave the kept-back channels alone. Pinned customers' badges
share one path graph per routing result.
2026-11-09 16:45:08 +11:00
Christopher Hawker
93d7c87dc7 Move a customer to another path between the same two POPs
Alien waves and leased fiber pairs sit on one fiber (b.link), so they move to
another working fiber between the same cities, under the rules for selling
capacity on it. Circuits have no link of their own, so moving one pins it to a
list of cities (b.pin), which routing follows while every link on it is up. When
one is down the circuit follows routing, and it comes back by itself.

The window lists the most diverse options first, compared by trench. Moves are
free and instant, and contracts keep their price.
2026-11-09 16:23:59 +11:00
Frederic Jung
1e15c61e3d
Merge remote-tracking branch 'origin/main' into claude/fix-321
# Conflicts:
#	CHANGELOG.md
2026-11-08 18:20:34 +00:00
Frederic Jung
71e7dcec59
Say how to reach a coast where no subsea cable lands yet (#321)
Iqaluit, Adamstown, Murmansk and the Russian Arctic towns have a beach but
no cable, so the link modal listed nobody to hop through ("Cables from
Iqaluit reach . Hop through one of those."), and from the other side it
suggested hops that could never get there. Now it says to go overland when
a road leads in, or that only your own cable reaches it, with the own-cable
button (or its level hint) underneath.
2026-11-08 17:57:32 +00:00
Frederic Jung
d971ded259
Hold the lay ship through a construction delay instead of restarting the lay (#322)
A delay that hit your own subsea cable while it was being laid moved the
whole laying stretch later: the ship vanished, the laid km went back to
zero and the survey and factory could be hurried and paid for again. The
delay now holds the ship where it is (l.lay: start, share laid, resume
day), so laying picks up after the delay. Old saves without the field lay
as before; sanitize() repairs or drops it.
2026-11-08 17:57:27 +00:00
Frederic Jung
4292cd4c74
Merge pull request #319 from antt0n/perf/intern-and-promises 2026-11-08 11:00:54 +00:00
Antoine
44116103be
The intern and customers' promises counted once per network: ports, caches and PNIs in one pass, shared searches
The game plays exactly as before.

* The NOC intern plans every POP in one pass: portsAt() counts router ports for all cities at once (routers, ports
  and cache orders; the ports job keeps ports in use and reserved by city between two jobs), cachePlan() sorts the
  boxes by POP once and cityShSum() sums a city's shares once per table, pniFlows() reads every POP's flows from
  routing's columns (R.flc) in one pass and pniWant() gives the weekly PNI round its sort key from typed columns.
  pniBatchRun() lets a frame through every few networks; pniQuote() looks existing PNIs and ports up from the batch.
* A dark fiber's capacity asks optG() once per run of identical optics (dfLit()); linkDown() and ownGlass() ask
  dfOn(), whether it carries anything for you, without the sum unless an optic is out or managed waves are sold on
  it. terrIslands() tests !l.sub first.
* Latency: latGraph() lists each city's links once in S.links order (typed arrays), latRun() is the same search with
  the same sums, latPairs() searches once per city for a boutique's finance routes and the latency offers.
* Diverse paths: divGraph()/divOn() number the cities and risks once; promiseCheck() shares a diversity graph, the
  land islands and one latency search per origin across every customer when the intern weighs taking a fiber out,
  and spots0() shares the graph for sovereign offers.

Tests: day-steps (cache planner, ports at every POP and flows from columns equal the old ways; the PNI round through
pniBatchRun), fiber-lit-and-latency (with failed optics and managed waves), shared-promise-checks, intern-personas.
2026-11-07 23:55:37 +01:00
Antoine
1edf0abb54
Routing core made once, list orders kept, and Auto-TE's detour searches cut: same routing, much less work
The game plays exactly as before.

* The core of compute() (rankPass, directPass, sendGroup, send, push, carry, altPath) is ROUTE in 29-route-core.js,
  built once by routeCore(): made inside compute() they were new functions every call and V8 threw away their code.
  Exits are read by number from typed columns (USED, CAPX, CIX, HPX, VISX), each list is an object of one shape.
* The route cache keeps, for each list and source city, the order routing tries it (xOrder()); a list whose exits,
  cities and preferences are unchanged on the same graph keeps its orders when other exits change (rcExitKeep()).
* Auto-TE: pairs with no detour are marked (TEF), exits that cannot help are skipped (dud()), one failed search
  answers the next ones, dijkstraTo() searches in arrays kept between calls, teSearch() runs on the graph as flat
  arrays and picks up where the last search from the same POP stopped.
* The PNI/IX tie-break (#298) reaches the core.

Tests: route-cache, routing-reference, speed (the fast core against the plain path, Auto-TE on crowded meshes with
POPs outside the core, picked-up searches counted).
2026-11-07 23:51:35 +01:00
Antoine
b9d6319302
The page stays free while big networks play: ambient map at 30 fps, saves in the worker, less to carry back
The game plays exactly as before; only what holds the page changes.

* mapStill() tells three cases apart: still (drawn once a second), ambient (only the animation clock moved: drawn at
  most every 29 ms, so 30 fps on 60 and 120 Hz screens) and moving (camera, pointer, selection, network: every frame).
  The animations follow the clock, so they keep their speed.
* save() skips the storage write when the text is the one the slot already holds (SLOT.txt) and no write is on its
  way; leaving the page still writes. A big autosave that moved on is packed, turned into text, stamped and
  compressed in the route worker (rwSave(), rwGzip()); the page only writes what comes back. A lost worker hands its
  pending saves back to the page (rwSaveBack(), rwGzBack()).
* Less crosses back from the worker: R.efg stays there while R is its own last answer (RW.wR, efg 0), R.egDesc comes
  as 0 or as the entries that changed (rwDescOut()/rwDescIn()), what crossed each link travels as typed arrays decoded
  on demand (rwLOut()/rwLIn()), and the full ports (hotMap) come along with R. Every message is read in order
  (rwMsg()), so both sides always hold the same last answer.
* Idle frames build the diverse-paths map and the latency floors a millisecond at a time (diversityWarm(),
  latWarm()), before the first offer asks.
* Diagnostic info shows how fast days really come: speed asked, speed held, how long a day takes (15-day-pace.js).
* perf-bench: "The NOC intern's shift: opsDay()" and, in Chromium, "One game day in play: page time only", a day
  played with the real route worker counting only the time it holds the page.

Tests: frame-pacing, day-pace, save-size, persist, route-worker (efg as typed arrays, hotMap from the worker),
day-steps (a second page plays the worker: answers without R.egDesc, with only its changes, posts without R.efg,
renewal haggles answered through the worker), intern-dark-fiber-worker, webgl-zoom-sprites, speed.
2026-11-07 22:22:51 +01:00
Frederic Jung
91b2afe706
Lambda Bazaar capacity market and traffic badges (3.2.0) 2026-11-07 14:11:01 +01:00
Frederic Jung
2f738dceda
Lambda Bazaar: a capacity market for your dark fiber
A new NOC tab sells spectrum, managed 100G, 400G, 800G and 1.6T waves, and dark pair IRUs on every route you hold
fiber on. Demand per route moves every day (its own cycle, noise, and news: fiber cuts, hyperscalers, AI clusters,
rivals lighting glass, mergers) and grows about 15% a year, with buyers moving to bigger waves over the years and
carriers on your glass asking to move up a size. You choose what to keep back for your own traffic, from what demand
the broker lists, and the price it never sells below. Managed waves come out of capacity you lit; prices follow the
fiber's cost, how hot and how full the route is, and its latency (400G at 2.7x 100G on land, 3.8x subsea). A Cable
broker pays 3% instead of 10% and sees each route's forecast and routes worth building.

Rule F5 now bounds sales by the moving market; new rule F8 covers managed waves. The route fuzz skips dashboard tabs
main does not have yet.
2026-11-07 13:34:41 +01:00
Frederic Jung
e6b5464352
Traffic badges: legendary only at the top of each ladder
1 Tbps is common, 10 Tbps rare, 100 Tbps epic (was legendary) and 1 Pbps
stays legendary, the same steps as the petabyte-to-zettabyte ladder.
2026-11-07 13:12:01 +01:00
Frederic Jung
fcb7264570
Traffic badges: a Tbps ladder and an odometer up to a zettabyte
Serving 1 Tbps (rare) and 10 Tbps (epic) now earn badges below the old
100 Tbps and 1 Pbps ones. S.vol counts the petabytes a game has carried
(a day of 1 Gbps is 10.8 TB), with badges at 1 PB, 100 PB, 1 EB and
1 ZB, and a Carried tile on the dashboard. Old saves start the count
from the 180 days of history they keep. The route fuzz takes badges
only this checkout has off its page, since an unlock's log line shifts
every id after it.
2026-11-07 13:08:11 +01:00