Commit graph

946 commits

Author SHA1 Message Date
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
dcdb501f16 Late joiners: a network that joins a server session late starts on its date, with a head start
One calendar for a server session (the user's answer to Q1): a network that joins begins on the session's date, and
one that joins after day 180, when the shared market starts to move, gets a head start (answered 2026-11-11).
Dormant until the host (T3) passes a start day: in the plain build and in single-device play S.day0 is 0 and the
game is as before.

- S.day0, the calendar day a network began: 0 in newGame(), repaired in sanitize() (at most S.day), so old saves load.
  netAge() is the network's age; the first-days rules count it: the charter window (and specSanitize), the tutorial's
  five days, the DDoS grace and early size cap, route leaks, RPKI, the world's bad news, shortages and control-plane
  events, sold-out routes, the scrubbing customers, loan offers, the broker's first calls, the Speedrun and Blitz
  badges and the day counts in the win, lose and Glass Baron windows. The market, the calendar and world events stay
  on the session's date.
- beginState() takes o.day for a session network in Normal mode (lateStart()): the day, the first outage and event,
  the home POP and the first IPv4 block are stamped with it, so the block cannot be sold on day one at the session's
  price.
- The head start (60-features/81-late-joiners.js): starting cash topped up by the rise in hardware prices (START_CASH
  x (hwTrend - 1), to $1,000, at most $60k, with the market rule only) and the first 365 days of home broadband
  matched (R.rev.late: what homes pay after the Australian wholesale cut or levy; outside investors' share, inside
  revMo). A second welcome with a button to the bank, a Goals card, a bank section, a line in a city's broadband pitch
  and a toast when the year is over; every label in all six dictionaries.
- The "since you started" lines (supply chain, bandwidth market, wave prices) measure from the network's own start.
- Server-run engine: srvBegin takes begin.day (an integer from 0, else the begin fails), the fake engine begins there
  and keeps day0 in its saves, CLOCK.off leaves the shape checker and the contract test, and the fixtures' network
  begins on day 473 (written again with tests/lib/mp-sim-fixtures.js; a second run changes nothing).
- Gameplay rule F11, the agent's day0 doc and status age, ARCHITECTURE and the plans (Q1's game side built, open
  question 1 answered).
- tests/late-joiners.test.js; F11 in tests/gameplay-rules.test.js; a late begin in tests/mp-sim-engine.test.js; one
  calendar in tests/mp-sim-contract.test.js.

Merged onto Starblink and Island Wi-Fi: revMo counts both the islands (V.wisp) and the match (V.late), the revenue
share base keeps V.wisp and leaves V.late out; F11 sits before F12 in the gameplay rules and their test; the mp-sim
fixtures were written again with tests/lib/mp-sim-fixtures.js (a second run changes nothing).
2026-11-12 02:16:44 +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
b892dcd923
Merge pull request #335 from fjaeckel/claude/endgame-scale
Late game grows sideways: eyeball traffic where the eyeballs are, AI campuses in 34 metros, PNIs by router, spill tiers
2026-11-10 11:09:32 +01:00
Frederic Jung
dc696c72f2
Merge remote-tracking branch 'origin/main' into claude/endgame-scale 2026-11-10 09:40:05 +00:00
Frederic Jung
102298a9ed
Merge pull request #334 from fjaeckel/claude/latency-contracts
Strict latency contracts: big late-game customers who pay for a latency SLA
2026-11-10 10:39:52 +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
d42fc5b68e
Merge pull request #333 from fjaeckel/claude/bulk-actions
Fewer clicks in the late game: POP standards, kit everywhere, buy on signing, network search
2026-11-10 10:33:33 +01:00
Frederic Jung
d2e642adb9
Merge remote-tracking branch 'origin/main' into claude/bulk-actions 2026-11-10 09:23:29 +00:00
Frederic Jung
1cf8d547bf
Merge pull request #332 from fjaeckel/claude/visibility
Show what is at stake in a renewal, and open a link's cities from its panel
2026-11-10 10:23:21 +01:00
Frederic Jung
a98e34711b
Keep puzzles and scenarios on plain shares; per-city share sums; tests follow the new traffic split
Puzzles, Architect runs and scenarios keep the table's split (their references and
pars were made with it). Week 2026-W44's reference now wins on day 185 (offers draw
from the wider campus list). The cache planner sums each city's own split.
2026-11-10 08:37:31 +00:00
Frederic Jung
870227100d
Route fuzz: leave the link panel's header city links out of the buttons both pages offer
They only change the view, and main's page has plain text there, so offering them would
make the two pages diverge on a screen that routes the same.
2026-11-10 07:56:26 +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
d8223bad04
Tests: route fuzz compares the customer catalog, day steps waits longer for its trial
A new customer type changes which offers a seeded late-game draws, so the
fuzz games cannot play move for move like main (as with a world change), and
the sales-trial race in day-steps comes on day 46 instead of before day 20.
2026-11-10 07:14:36 +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
80baa970e7
Merge pull request #331 from fjaeckel/claude/fix-329
Say why a link is down when a closed border took it (#329)
2026-11-10 07:40:27 +01: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
9496c26a25 Plans: what the batch of 2026-11-09 built, and what it decided not to
next-session.md listed the batch as in progress. It now lists the nine
commits with what each built and what its builder left out on purpose,
folds in the IPv6-only row's notes (item 4 is built; the NAT64 ratio is
not in the standard; a swap starts only with all of it to spare) and the
wave rule (dfWaveCust()), and keeps one small follow-up: two standing-order
descriptions still say no customer may ride a swapped fiber. ARCHITECTURE's
IPv6-only row names the build standard's v6 row.
2026-11-09 23:08:08 +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
02b6c24d7b Intern: write the shift log as a reload keeps it, and drop opsTidy()
The day's log named every order that ran out of budget, and the week's tally
got an empty list for a job with no place (a rushed repair, a route server);
a reload keeps three places a kind and no empty lists, so opsTidy() trimmed
live state after every shift. The shift now writes it that way itself: the
broken orders are cut to three ([...X.broke].slice(0,3)), and W.wh[k] is made
only for a job that names a place. tests/canonical-state.test.js passes
without opsTidy() (a year of the big network with everything on, checked
every day), so it is gone.
2026-11-09 23:02:05 +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
8068a45abd Plans: the server-run design in the repo, what is left now, and the fork's files
- docs/plans/server-run.md: the server-run design, which lived only outside
  the repo, with a status at the top (T1 and T2 merged, T3, T4 and the
  integration waiting for the go; the four answers; the questions still
  open) and a section on what building T2 changed: a checkpoint needs more
  than route memory (rt carries pt, sl, ord and rk), who a worker exit
  counts against, the budgets now over, the contract additions, the open
  path-window question and what the shared calendar changes. The answers
  are marked where sections 0, 1 and 14 ask; probes are named, not pathed.
- docs/plans/next-session.md: rewritten to match main at 3e30621: what is
  built, the answers, the holds, the nine open questions, what is in
  progress and next, and only the limitations that still hold.
- docs/ARCHITECTURE.md: a table of the fork's own files (build standard,
  dark mode, IPv4, IPv6-only, express fiber, satellites, multiplayer,
  server-run play, the session server and the engine), kept apart from
  upstream's tables so merges stay clean.
- docs/MULTIPLAYER.md: server-run play is being built and not switched on.
2026-11-09 23:01:43 +01:00
jvanvik
3e30621684 Test timings of the server-run engine's tests and the built-ins test
Some checks failed
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) Has been cancelled
Container image / test (push) Has been cancelled
Container image / publish (push) Has been cancelled
Seconds per file from a full npm test --timings run on this machine
(every file at once), for the shard split.
2026-11-09 22:22:40 +01:00
jvanvik
77f4035853 Six actions look up their city among the network's own POPs only
launchBB, addSite, addRouter, upRouter, addGen and myIxUp read S.pops[city]
(S.myIx[city]) without checking the key, so a city named '__proto__' found
Object.prototype and wrote to it (launchBB left Object.prototype.bb behind,
and every for…in after it saw that), and 'constructor' spent cash on
statics of Object. Only an MCP agent or a request to a server-run network
can send such a city; the page's own buttons never do. Each now takes the
POP only when it is an own key (own(), as sanitize() does).

tests/act-args-builtins.test.js sends every action an agent may send with
'__proto__', 'constructor' and 'prototype' in each usual arg and checks
that the page's built-ins stay as they were; without this change it finds
exactly these six. No state, strings or saves change.

Performance on the big network against 61e31c5 (npm run perf, headless,
median of 15 runs, ms):

| What | Base | This | Change | p |
|---|--:|--:|--:|--:|
| Routing: compute() | 25.4 | 28.1 | +11% | 0.90 |
| One game day: dayTick() | 27.8 | 28.7 | +3% | 0.77 |
| An action: after() | 1.82 | 1.77 | -3% | 0.77 |
| Side panel and left list | 58.8 | 57.1 | -3% | 0.013 |
| NOC dashboard tabs | 95.9 | 95.9 | +0% | 1.00 |
| Map at three zoom levels | 3.49 | 3.30 | -6% | 0.53 |
| The NOC intern's shift: opsDay() | 3.45 | 3.52 | +2% | 0.80 |

Routing results are identical to the base; no slowdowns beyond noise.
2026-11-09 22:18:56 +01:00
jvanvik
9597d89079 Server-run engine: review fixes
The review of track T2 found these; each has a test in tests/mp-sim-*.

- Built-ins: an arg, array entry or draft that is '__proto__', 'constructor'
  or 'prototype' is refused by the envelope check and again by the realm
  (free text may still say them). After every realm call the trampoline
  checks the realm's built-ins against what they were at load; a realm
  whose built-ins changed answers {srvErr, polluted} and is replaced from
  the worker's mark like one that timed out. S as one JSON per key is a
  null-prototype object, so the epilogue's for…in never reads a prototype.
- A realm that cannot be built again is never used again: rebuild() tries
  once more without the packed R, and when that fails too the network is
  dropped (NO_REALM), and the engine tells the host (opts.onLost).
- A mark that fails or runs out of time changes nothing: it clears the old
  mark first, the realm is built again from its own save, never from an
  older mark, and the reply names the mark. A day rebuilds only from its
  own attempt's mark.
- A day whose alone or nets is not a list is refused whole (ERR); a throw
  in a load or day step answers that call, never ends the worker.
- An exit counts against the session the worker was running (the worker
  says so before each job and step), else as before. Workers of their own
  are capped (opts.maxOwn, 4): past that a session is given up.
- A worker that exits before it is ready is started again after a pause
  that doubles; after 5 in a row every call answers SIM_DOWN.
- The game text is read and compiled once, in createEngine: a src/ that
  does not compile throws there, and every worker, also one started after
  an exit, runs the game engine.simId names.
- A damaged route memory never breaks a save that loads (routed from
  nothing, logged), and only a server network loads (S.mp.sim, Normal).
- Routing memory (UI.rk, UI.rkR) is kept by the in-place restore and
  carried in rt (rk), so a reloaded or rolled-back network skips the same
  routings as the one that kept going.
- A fresh realm takes over the fx of the one it replaces (the mark's after
  a failed call, all of them after a read): badges, windows and toasts
  waiting for a page are not lost to a timeout.
- Windows: the stand-in elements answer querySelector from what was
  written (a [data-x] marker) and have a working classList, never the
  inert proxy that said every window is open. A request's ctx may name the
  open window, ctx.win = {k, ui} (mp-sim-acts.js WINDOWS: bstd, routing,
  charter, ops, pie), with the view state only the page holds (the
  intern's POP, the pie window's tab and POP), checked in the realm. This
  is an addition to the contract of design 5.8 that the page (T4) sends.
  The stand-in is hidden again after an act.
- xpBuild's via is a TEXT arg (256): a six-span express fits.
- actDone, askDone and pulled carry ms, the worker time of the call;
  engine.mem() and engine.has(code, nid) are public; prefs() passes a
  realm's err through; after close() every call rejects CLOSED.
- The fake engine fails as the engine does (NO_REALM, ERR, a load without
  a save, a day of an unknown session or naming an unloaded network,
  GAVE_UP, SIM_DOWN, CLOSED, onLost), its greet says its one-shots once and
  never 'told'; a test runs the same edge calls on both.
- SIM_DRAFT is built from DRAFT_TYPES.
2026-11-09 22:16:52 +01:00
jvanvik
3b8c331556 Auto-TE and the chaos monkey's leaving are written as a reload makes them
Two places left a key in a shape that sanitize() repairs on the next load, so
the live game was not its own save (the server-run engine refuses such an
action at its gate, and its strict day check would refuse such a day):

- buyTE wrote S.te as {on, day}; a reload adds script:''. It now writes the
  script slot itself (src/game/90-actions/30-route-script-and-tools.js).
- mkLeave turned the monkey off but kept start, until, snip, n, hurt and c;
  sanitize() keeps only next and on for a monkey that is away. It now leaves
  S.monkey as {next, on:0}, after the toasts that still read the visit's count
  (src/game/85-incidents/40-chaos-monkey.js). This covers the visit running
  out, the banana and the rules sending it home.

No new state field, nothing for old saves: both keys load as before. Nothing a
player sees changes, so no CHANGELOG bullet.

Tests: tests/backbone-core.test.js (S.te after buyTE equals what a reload makes
of it) and tests/chaos-monkey.test.js (S.monkey after each way home: outlasted,
hurt, sent home by calmer rules, bribed). Both fail without this change. The
server-run tests take their workarounds out: buyTE and the banana pass the gate
and leave the network the page leaves (tests/mp-sim-acts.test.js, the former
todo), the 60-day realm-vs-page plan clicks buyTE on day 21 instead of setting
S.te, and the gate audit no longer excuses either act.

The Pie in the Sky line the review also named (60-pie.js:66, S.monkey.n++ on a
monkey that is away) is not reachable: its only caller fires a laser incident
behind mkOn(), so it is left as it is.

Performance (npm run perf -- --base-ref 61e31c5, headless, big network, median
of 15 runs, ms):

| What | Base | This | Change | p |
|---|--:|--:|--:|--:|
| Routing: compute() | 27.3 | 26.1 | -4% | 0.51 |
| One game day: dayTick() | 29.7 | 30.1 | +1% | 0.71 |
| An action: after() | 1.96 | 1.86 | -5% | 0.48 |
| Side panel and left list | 62.0 | 59.2 | -5% | 0.023 |
| NOC dashboard tabs | 110 | 110 | +0% | 0.93 |
| Map at three zoom levels | 3.69 | 3.90 | +6% | 0.43 |
| The NOC intern's shift: opsDay() | 4.06 | 3.95 | -3% | 0.11 |

Routing results identical to the base; no change beyond noise.
2026-11-09 20:47:42 +01:00
jvanvik
72f31e809b Server-run engine: every call answers, and a crashing load gets its own worker
A load whose networks did not all check out could hang its session for good, a
worker could spin on a job it could never run, a session whose load crashed its
worker never got a worker of its own, and an unload followed at once by a load
(a language change) lost the session's place or never answered. Fixed:

- Worker: a load call is checked whole before it touches anything. One that
  names no network, or one twice, is refused (ERR) and every realm stays as it
  was. A network without a save now answers err (broken) like one whose save
  does not load, and the others load. A network marked loading with no load
  under way answers NO_REALM instead of waiting for ever.
- Worker: it goes on only while something ran. If a job were ever still
  waiting when nothing could run, it is answered (ERR, logged) rather than left
  pending, and the worker no longer busy-loops on it.
- Engine: a session is on its worker from the moment its load is sent. A worker
  exit counts against the sessions whose load was under way (else against every
  session it held), so a save that crashes its worker gets a worker of its own
  after two exits and is given up (GAVE_UP) after a third, while the sessions
  that only shared the worker lose their realms but not their place in the pool.
  Loads under way count for placement.
- Engine: an unload no longer drops the placement of a session whose next load
  is under way, so an unload and a load sent back to back stay on one worker; a
  worker of its own is retired only when no call is pending on it (a pending
  call there used to never settle).
- Engine: a message that cannot be sent rejects (ERR) and leaves nothing pending.
- Realm: a what-if puts UI.hotMap back too (teSlop's trial left its own).
- Realm: a network in a language this server has no dictionary for plays in
  English, as the page does, instead of loading broken.

Tests (tests/mp-sim-engine.test.js): a malformed load changes nothing and every
call of the session answers within 3 s, with the workers idle after; an unload
and a load back to back keep the session on its worker; a session whose load
takes its worker down twice gets a worker of its own, then GAVE_UP, while the
bystander is never blamed; an ask leaves UI.hotMap as it was; a network in an
unknown language loads in English. Each fails on the engine before this change
(the worker's alone: the hang; the engine's alone: the placement and the exits;
the realm's alone: teSlop's hotMap and the language).

The two drafts no test played are played now (tests/mp-sim-acts.test.js): a
premium border crossing into Hong Kong (buildLink with cnPrem) and the AI's own
script deployed as it wrote it while it drops most of the traffic (teDeploy with
slop, on a small network with one capped transit port), each compared byte for
byte with the page's clicks, and both read in the DRAFTS check (nothing is left
unplayed).

Runs, each file alone under an 8G cap: mp-sim-engine 16/16 (11.6 s),
mp-sim-contract 8/8, mp-sim-acts 5 + 1 todo (10.9 s), mp-sim-determinism 6/6
(53.4 s).
2026-11-09 20:47:31 +01:00