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.
176 lines
15 KiB
Markdown
176 lines
15 KiB
Markdown
# What is left (as of 2026-11-09)
|
||
|
||
Work in this fork, pushed to the `vanvik` Forgejo remote (never to `origin`). Written on top of 3e30621, with the
|
||
batch of fixes below ("Built in the batch of 2026-11-09"). Nothing below is switched on or built unless it says so.
|
||
|
||
## Built so far
|
||
|
||
On top of upstream, merged up to 3.3.0 (61e31c5 "Merge upstream: Lambda Bazaar, traffic badges, moving customers and
|
||
faster routing (3.3.0)"; earlier merges 032470f and 4b922ab):
|
||
- **Build standard**: 2b48a6a "A build standard for the whole network, kept by the intern", and fbae6fc "The build
|
||
standard owns the router model and the line system; one owner per fiber" (the router model and line system are
|
||
picked in the sheet only; the `routers` and `optup` orders read them from there).
|
||
- **Multiplayer phase 1** for self-hosted copies: 95aa9b6 "Multiplayer for self-hosted copies: sessions, server-side
|
||
saves, a leaderboard" (`docs/MULTIPLAYER.md`).
|
||
- **Dark mode (#80)**: 2cd6b71 "Dark mode: Light, Dark or Auto under Settings › Theme".
|
||
- **IPv4 address space (#150)**: eac0604 "IPv4 address space: scarce, bought, leased, leased out; IPv6 is free", and
|
||
69328ce "IPv6-only broadband: 464XLAT city by city, a NAT64 pool next to CGNAT".
|
||
- **Express fiber (#58)**: 8e1f2d6 "Express fiber: light a wave through a city without its router".
|
||
- **Satellite teleports (#83)**: e1ae8e0 "Satellite teleports: GEO and MEO circuits for islands and remote towns".
|
||
- A fix after the 3.1.0 merge: e8808f6 "The connections list no longer breaks on a 400G fabric port".
|
||
- **Server-run play, parts 1 and 2** (merged, not switched on): T1 is d1e127d "Server-run play, part 1: game
|
||
prerequisites and shared contracts". T2 is 065c922 "Server-run play, part 2: the engine" with its fixes c5c7ea9,
|
||
72f31e8, 3b8c331, 9597d89, 77f4035 and 3e30621. The design, its status and what building T2 changed in it are in
|
||
`docs/plans/server-run.md`.
|
||
|
||
### Built in the batch of 2026-11-09
|
||
|
||
Nine commits after 3e30621, the one that wrote this list and "Review fixes for the small-fix batch" (folded into
|
||
the entries below); every code change comes with its test:
|
||
- 8068a45 "Plans: the server-run design in the repo, what is left now, and the fork's files" (this file,
|
||
`server-run.md`, the fork's files in `ARCHITECTURE.md`, a note in `MULTIPLAYER.md`).
|
||
- **Dark mode (#80)**, 27ffa33: red text is `--tx-red` (a lighter red at night) everywhere it is text, in the styles
|
||
and in 19 game files; fills, borders and bars that carry white letters keep `--bad`. The market's Hot and Cool tags
|
||
take `--tint-o`/`--tx-amber` and `--tint-b`/`--tx-blue`. `tests/dark-mode.test.js` fails on any new
|
||
`color:var(--bad)`. Decided not to: light mode's `--bad` on white (3.24, under AA) stays as upstream has it.
|
||
- **IPv4 (#150)**, 7930d33: IPv4 notices in the notification log open the Address space (log target `{a:'ip4'}`,
|
||
`ip4Open` in `NOC_GO`); with IPv4 off since, they open the bank.
|
||
- **Satellites (#83)**, 2dc8274: the "no subsea cable lands here" hint (#321) names a satellite circuit where one can
|
||
reach the city, with a "From X" button per teleport (up to four) to the order sheet (`satNoCable()`), or where a teleport would
|
||
have to go. It covers only the city the hint names.
|
||
- **Express fiber (#58)**, ae78e82: a regen site added later charges a regen card per express channel on its fiber
|
||
(`regenAddCost()`, used by the action, the button's price and the MCP quote); a dirty connector (loss with
|
||
`glass:true`) dims every express on the fiber (`xpGlassF()`), and the express panel names the fiber. Decided not to:
|
||
an MTU mismatch, microbursts and a marginal optic's CRC errors stay with the fiber's own routers and optics, which an
|
||
express passes by (as an optic failure already did, while amp-hut and ROADM incidents darken expresses).
|
||
- **Satellites (#83)**, 1f76639: selective networks refuse to peer where a satellite circuit is the island's or
|
||
town's only way out (`satOnly()`: a fiber or cable with no optics of its own does not count): 60 in 100 refuse a
|
||
GEO hop, 15 in 100 a MEO one, each network's answer fixed; a session already there stops carrying until a wave or
|
||
cable is lit. Decided not to: a worse traffic ratio for MEO,
|
||
refusals at exchanges you run, and any effect on PNIs already there.
|
||
- **Build standard**, 286ae48: "Bring everything up now" and the intern follow one rule: a fiber a customer's alien or
|
||
managed wave rides keeps its line system (`dfWaveCust()`), and the sheet says why (`bstd.held_wave`); leased pairs
|
||
and IRUs no longer hold a fiber for the intern. Left as it was: the fiber panel's own upgrade button (`ACT.upSys`)
|
||
still swaps under a sold wave, with its warning toast.
|
||
- **Standing orders**, 02b6c24: the shift's log keeps at most three broken orders, the week's tally no longer makes an
|
||
empty list of places, and `opsTidy()` is gone (`tests/canonical-state.test.js` passes without it).
|
||
- **IPv6-only broadband (#150)**, 417160f: the build standard's "Broadband: IPv6-only" row (`BSTD` `v6`, shown only
|
||
while `ip4On()`). `bstdPlan()` makes one job per dual-stack broadband city (`ip6Todo()`), the most dual-stack homes
|
||
first, priced as the whole swap (`ip6Cost()`); the button and the `std` order start one only with all of it above
|
||
the floor on top of what running swaps still owe (`ip6Owed()`), and the order counts it against its month's budget.
|
||
What running swaps owe, whoever started them, is set aside for every later job: the button's, and every standing
|
||
order's (`X.ow` in `opsShift()`, refreshed when the `std` order starts a swap). Decided not to: a separate hold in
|
||
`ip6Day()` at the cash floor; with the money set aside, the swaps pay down to the floor at most.
|
||
|
||
## The user's answers (2026-11-09)
|
||
|
||
The four questions of the server-run design:
|
||
1. A player who joins an old session starts on the **session's date**: one shared calendar. The game's day-0 rules
|
||
then have to count from each network's own start (`server-run.md`, "What Q1 changes").
|
||
2. Single player in a multiplayer build runs **on the server** by default; "this device" stays an option.
|
||
3. An empty session that wakes runs at **1×**.
|
||
4. Phase-1 sessions **start fresh**: nothing is migrated.
|
||
|
||
## On hold until the user says go
|
||
|
||
- **#97 co-op companies** (several players run one network, with roles, budgets and approvals).
|
||
- **Multiplayer phase 2** (players as carriers in each other's simulations: transit, peering, PNIs, shared fiber):
|
||
design in `docs/plans/multiplayer-phase2.md`. When it restarts, that design needs rework for the shared server clock:
|
||
it assumes each player's own clock, and tenders and notice timed in real minutes.
|
||
- **#144 directional traffic**, last and on its own: keep the totals, split them by traffic profile, utilization is the
|
||
busier direction. It comes after #58 because both touch link capacity (express channels count too).
|
||
|
||
## Open questions waiting for the user
|
||
|
||
Asked on 2026-11-09, not answered yet:
|
||
1. **Late joiners' prices and beginner grace.** With one calendar, a friend who joins an old session meets its economy
|
||
from day one: at day 1868, hardware about 18% dearer and customer prices about 34% lower, with the 180-day beginner
|
||
grace long over. Keep that, or give a grace or extra starting cash counted from the joiner's own start?
|
||
2. **Other players' POPs on the map.** Draw other players' POPs and links on your map (from their cards) as part of
|
||
the server-run work, or wait for phase 2?
|
||
3. **The other modes in a multiplayer build.** Sandbox, scenarios, puzzles and the weekly keep running on the device.
|
||
Fine, or should sandbox (or all of them) also run on the server?
|
||
4. **Dark mode and the build standard upstream.** Upstream contributors have said they will open pull requests for a
|
||
dark mode (#80) and a bulk redundancy kit (#317), and a three-tier router standard sits on another contributor's
|
||
branch (#315). Offer the fork's dark mode and build standard upstream before those land, or keep them fork-only and
|
||
settle the clash at the next merge?
|
||
5. **#58 whole-fiber splicing.** Is the express lightpath enough, or should a whole fiber pair also splice through a
|
||
city (one dark fiber A–C through B, with no ROADM at B)? The issue asks for "waves and/or entire fibers".
|
||
6. **#83 WISP zones and a rented LEO tier.** Add island demand pools served remotely on top of the existing island
|
||
cities, and a tier between MEO and Pie in the Sky that rents LEO capacity from a partner network? Or are teleports
|
||
with GEO and MEO circuits enough?
|
||
7. ~~**Investors' cut of IPv4 lease income.**~~ *Answered 2026-11-11 (yes) and built: investors on a revenue share
|
||
take their cut of IPv4 lease income, as of fiber pairs leased out; a sale stays all the player's.*
|
||
8. **Founding an exchange on a basic router.** Founding your own exchange gives a 400G port even where the POP's router
|
||
only takes 100G, though the shop would not sell that port. Document it as a limitation, block founding until the
|
||
router takes 400G, or found at the router's largest port size? (`tests/server-sim-prereqs.test.js` asserts today's
|
||
behaviour.)
|
||
9. **The six old wip worktrees.** They hold nothing `main` lacks. Delete them and their branches?
|
||
|
||
## Next
|
||
|
||
- **After the user's go:** T3 (host and protocol), T4 (the browser client) and the integration of server-run play,
|
||
as `docs/plans/server-run.md` describes them, with the corrections at its top. That includes the Q1 work: the game's
|
||
`S.day0` and day-0 rules, a start day for a new network on the server, and `CLOCK.off` taken out of the contract.
|
||
|
||
## Known limitations of what shipped
|
||
|
||
- **Multiplayer (phase 1):** each browser runs its own clock, so the players' worlds drift apart (server-run play fixes
|
||
this for new sessions only); other players' POPs are not drawn on the map (open question 2); cards are what each
|
||
browser reports, and the server does not check them; a save over ~60 KB sends only the card when the tab closes, and
|
||
the save goes with that device's next push; a session network still makes its save on the page, so it misses 3.3.0's
|
||
smoother saves in the worker; the capacity market and path moves are each player's own, with no market shared
|
||
between players; the HUD chip in phone landscape wider than 760 px has not been checked by eye (worth doing when T4
|
||
changes the chip). Behind a reverse proxy, run the server with `--trust-proxy`, or every player shares one address's
|
||
rate limits.
|
||
- **Server-run engine (merged, not switched on):** a checkpoint is over its size budget, and so are a snapshot, a big
|
||
realm's memory and a small network's day; a checkpoint written before c5c7ea9 restores close to exact, not exact; the
|
||
engine has no per-call deadline of its own; a worker of its own whose session's loads all fail stays idle until the
|
||
next unload; the path window would read routes the page never gets (`server-run.md`, "Corrections from building
|
||
T2").
|
||
- **Build standard:** the game menu's last row of tiles is not full (7 tiles, or 8 in a multiplayer game, in rows of
|
||
3). The sheet's quote and "Bring everything up now" judge a line-system swap without routing (`bstdDarkOk()`: a
|
||
quiet fiber, under 10% of its capacity, or a parallel link with room; any express with traffic holds its fibers,
|
||
`bstdXpBusy()`), so the quote is the bill; only the intern routes to test. A quiet fiber with no way around can
|
||
still go dark from the button for a day. A fiber a customer's alien or managed wave rides keeps its line system for
|
||
both the button and the intern (`dfWaveCust()`); the fiber panel's own upgrade button still swaps it, with only a
|
||
toast to warn. `bstdSet` accepts the `v6` target while IPv4 is plentiful: it is saved, hidden and never planned. An
|
||
old save's `routers.model` moved into the standard (only from a running
|
||
order with an intern hired; a paused one's is dropped) also becomes what new POPs get. A model or line system in the
|
||
standard is a ceiling for the `routers` and `optup` orders (their next-one-up rule only applies with "keep"), as an
|
||
order's own model was before; `optup` has no per-POP exceptions, so it moves fiber at POPs excepted from `std` too.
|
||
- **Dark mode (#80):** the share card PNG and the web manifest stay light; the WebGL map was checked by tests only, not
|
||
by eye in a real GPU browser.
|
||
- **IPv4 (#150):** the intern does not manage addresses (optional in the issue); transfers are instant (real ones take
|
||
weeks); blocks granted to old saves can be sold after two years (a one-off windfall); CGNAT annoyance costs refunds
|
||
but does not slow broadband growth.
|
||
- **IPv6-only broadband:** no one-off grumble while a city's home routers are swapped; a new home in an IPv6-only city
|
||
pays its router even when cash is short (a running cost, so a finished city never looks like a stopped swap). The
|
||
NAT64 ratio is not in the build standard (the swap is), and the standard starts a swap only with the whole of it to
|
||
spare, stricter than the city panel's button (the first day's routers).
|
||
- **Express fiber (#58):** a whole fiber pair does not splice through a city (every fiber end is a POP; expresses
|
||
cover the need; open question 5). Of a fiber's own incidents only the dirty connector dims its expresses; MTU,
|
||
microbursts and a marginal optic stay with its routers and optics.
|
||
- **Island Wi-Fi (#83):** a zone's traffic enters at its own city's POP, so Starblink serves it only from a gateway in
|
||
that city (16 of the 18 zones; a gateway anywhere in reach would serve the same 16): Nunavut and Southeast Alaska lie
|
||
beyond the 56° shell and MEO's ring, so they stay on GEO (Southeast Alaska keeps its spur). One circuit, one move
|
||
and one spur per zone; a standby satellite pays full rent; no standing order for island backhaul, no zones on the
|
||
map or the multiplayer card, no rain fade. The spurs follow real domestic cables: Tahiti to the Tuamotus and
|
||
Marquesas (Natitua), Tonga's domestic cable (cut by the Hunga Tonga eruption in 2022), Papua New Guinea's Kumul,
|
||
the Solomons' and the Maldives' domestic networks, the Bahamas' and Cape Verde's inter-island cables, and Southeast
|
||
Alaska's.
|
||
- **Satellites (#83):** the rented GEO and MEO circuits never
|
||
fail (no rain fade or sun outage; Pie in the Sky has its own); no island volcano or Caribbean and Pacific hurricane
|
||
events; no "Island Hopper" scenario; no footprints on the map; no satellite tab in the drag-to-link window (ordering
|
||
is from the city panel; the no-cable hint offers a teleport's order sheet only for the city it names); selective
|
||
networks judge a satellite-only island by fixed shares (60 in 100 refuse GEO, 15 in 100 MEO), not by its traffic;
|
||
GEO/MEO losses and prices are design numbers; well-cabled islands (Wellington, Hobart) also count as "can be
|
||
served"; MEO needs 5° elevation (10° would drop 416 pairs); Pitcairn's $120k satellite grant stays Pie-only.
|
||
|
||
## Housekeeping
|
||
|
||
- `npm run perf -- --browser` runs with `PERF_CHROME=/usr/bin/chromium`.
|
||
- The phase-1 playtest on port 8090 runs from its own checkout outside the repo, with its data in
|
||
`mp-data/playtest`: leave it alone unless the user asks. Its one session can go once a server-run build replaces it
|
||
(answer 4).
|
||
- The six old wip worktrees under `.claude/worktrees/` wait for the user's answer (open question 9).
|