Commit graph

888 commits

Author SHA1 Message Date
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
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
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
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
b087d4b4e5
Merge pull request #327 from fjaeckel/dependabot/npm_and_yarn/jsdom-31.0.0
Tools: Bump jsdom from 30.1.3 to 31.0.0
2026-11-09 13:39:07 +01:00
Frederic Jung
4630ba99af
Clear the open code scanning alerts
- auto-release.yml: the by-hand test run passes github.sha (what it got anyway) instead of an
  output that also reads workflow_run.head_sha, so CI never checks out a ref a workflow_run
  handed over in a job that uses caches (cache poisoning, 7 alerts in ci.yml).
- tests/harness.js: the script splitter also matches end tags like </SCRIPT > (bad HTML
  filtering regexp).
- Tests paste the fixture saves into the page with lit(), which escapes what could end a
  script or a string, instead of plain JSON.stringify (improper code sanitization).
2026-11-09 12:36:08 +00:00
dependabot[bot]
6a44da4017
Tools: Bump jsdom from 30.1.3 to 31.0.0
Bumps [jsdom](https://github.com/jsdom/jsdom) from 30.1.3 to 31.0.0.
- [Release notes](https://github.com/jsdom/jsdom/releases)
- [Commits](https://github.com/jsdom/jsdom/compare/v30.1.3...v31.0.0)

---
updated-dependencies:
- dependency-name: jsdom
  dependency-version: 31.0.0
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-11-09 12:35:14 +00:00
Frederic Jung
f00bc733d0
Two CSS checks read jsdom 31 as well as 30
jsdom 31 (#327) serializes calc() with its terms sorted and expands the
overflow shorthand into overflow-y; the diagnostic readout and puzzle
dock tests now accept both.
2026-11-09 13:30:28 +01:00
Frederic Jung
d6b08dded3
Kept exit orders also check each exit's kind
An exit that turned from an exchange into a PNI at the same place in the list, city and
preference kept the order made for the exchange, which sorts behind a PNI at the same
distance, so the cached routing could differ from routing without the cache (#320 review).
The exit signature now includes the kind. Also drops the unused e.vis.
2026-11-09 10:40:39 +00:00
Frederic Jung
249ad4d478
Merge pull request #320 from antt0n/perf/routing-core 2026-11-09 10:21:20 +00:00
thesysadmindev
d98b11a1f7
Merge branch 'fjaeckel:main' into move-customer-path 2026-11-09 20:32:27 +11:00
Frederic Jung
36b9b170c5
Merge pull request #326 from fjaeckel/dependabot/npm_and_yarn/tools-e5c9720653
Tools: Bump playwright-core from 1.64.1 to 1.65.0 in the tools group
2026-11-09 09:27:02 +01:00
Frederic Jung
3dbeaeeeb7
Merge pull request #328 from fjaeckel/dependabot/github_actions/actions-aa5920e445
CI: Bump anthropics/claude-code-action from 1.0.268 to 1.0.269 in the actions group
2026-11-09 09:26:47 +01: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
dependabot[bot]
5d76d3afc8
CI: Bump anthropics/claude-code-action
Bumps the actions group with 1 update: [anthropics/claude-code-action](https://github.com/anthropics/claude-code-action).


Updates `anthropics/claude-code-action` from 1.0.268 to 1.0.269
- [Release notes](https://github.com/anthropics/claude-code-action/releases)
- [Commits](c0949c50a7...61a9c274fa)

---
updated-dependencies:
- dependency-name: anthropics/claude-code-action
  dependency-version: 1.0.269
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-11-09 00:57:31 +00:00
dependabot[bot]
afd71a0899
Tools: Bump playwright-core from 1.64.1 to 1.65.0 in the tools group
Bumps the tools group with 1 update: [playwright-core](https://github.com/microsoft/playwright).


Updates `playwright-core` from 1.64.1 to 1.65.0
- [Release notes](https://github.com/microsoft/playwright/releases)
- [Commits](https://github.com/microsoft/playwright/compare/v1.64.1...v1.65.0)

---
updated-dependencies:
- dependency-name: playwright-core
  dependency-version: 1.65.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: tools
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-11-09 00:57:10 +00:00
Frederic Jung
ef6bd750ea
Merge pull request #324 from fjaeckel/claude/fix-321
Say how to reach a coast where no subsea cable lands yet (#321)
2026-11-08 19:25:06 +01: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
9cdab7235b
Merge pull request #325 from fjaeckel/claude/fix-322 2026-11-08 19:19:06 +01: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
Frederic Jung
a1c0afbbbf
Merge pull request #318 from antt0n/perf/page-stays-free
Big networks hold the page less: ambient map at 30 fps, saves and transfers handled by the worker
2026-11-08 11:50:15 +01: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
d03dde6fcd
Release deploys again when its tests were skipped on purpose
A skipped job skips every job that needs it, even through one that runs
anyway: since auto-release passes tested=true, the tests job is skipped,
build ran with always(), and deploy (no condition of its own) was skipped.
v3.2.0 built and never went live. Deploy and IndexNow now run whenever
the job before them succeeded.
2026-11-07 14:38:19 +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
Frederic Jung
4e6f780c81
No double runs in a release: container test and weekly tests once
A version bump's push started docker.yml's test, then auto-release
started docker.yml again for the tag, which tests the same code before
it publishes: the push skips its test while the version is not tagged.
The deploy re-ran the weekly-puzzle tests even when main's weekly files
are the tag's own, which CI had just tested: it now runs them only for
files that differ (a newer or refitted week) or an untested tag.
2026-11-07 10:28:57 +01:00
Frederic Jung
03523cb16b
Auto-release follows CI instead of testing the release again
A version bump on main ran the whole suite twice: once in CI for the
push, once more in auto-release. Auto-release now starts when CI
finishes on main and releases only if that run was green, tagging the
exact commit CI tested. Started by hand, it still tests first, since
there is no CI result to go by.
2026-11-07 10:00:15 +01:00
Frederic Jung
0342d90657
Faster tests, split everywhere: one sharded CI for pushes and releases
- The harness builds the DOM without the page's 2 MB of script text and
  runs the scripts straight in the window: a page load in tests takes
  about half the time (jsdom's parser was slow on the script text).
- That also took the game's source out of the DOM, which showed three
  tests that matched a phrase in the page source rather than the screen;
  they now check the panel, the routing window and the dictionary.
- CI plans its split once and runs the tests on 6 runners; every run on
  main records each file's time and caches it, so the parts stay even
  without anyone refreshing tests/durations.json.
- auto-release.yml and release.yml call the same sharded tests instead
  of running all 170 files on one runner each (11 and 15 min); a release
  is tested once, before it is tagged.
- Audit: five tests that duplicated a gameplay rule or checked nothing
  are gone; the two slowest checks sample a third of the cities, and a
  year of play to reach one due date became a moved due date.
2026-11-07 07:24:09 +01:00
Frederic Jung
7a6eb29013
Interns with specialities, optical upgrades, renewal haggles, seven French cities and smoother big networks (3.1.0) 2026-11-07 06:36:19 +01:00
Frederic Jung
52e740cdae
A slow phone gives a day longer slices between frames
A device that cannot hold 50 frames a second waited a whole slow frame at almost every rest of a big day, so the
game played up to a third slower at 8x. There a day gets half of its own frame, up to 32 ms; screens that keep up
keep 3 to 8 ms.
2026-11-06 22:48:52 +01:00
Frederic Jung
410eb81544
Merge pull request #313: every routing a day needs runs in the route worker, and a long day lets frames through
Conflicts with main resolved: the intern's chosen router model, optical upgrades and personas are generators like the
other orders, with a rest after each job. The optical upgrade's fiber test is a step the day answers, in the route
worker in play (opsDark(), {dark}), like the sales desk's trial; the renewal desk's reroute is a step too (slRenRun()).
2026-11-06 22:47:54 +01:00
Frederic Jung
ed0cac9974
Interns: the same orders, each best at one part of the job
The three interns run every order the same way at the same salary;
each is now better at one thing, and says so when hired:
- Anycast Annie peers: the IX order runs every day, not only weekly, and
  the PNI order twice a week.
- Kevin from the night shift does maintenance: two line system swaps a
  night instead of one, and never a fat finger. He rolls the same dice
  (catching it before Enter), so a seeded game plays the same whoever is
  hired.
- Tracy Route plans ahead: the transit, ports, routers, optics and
  optical transport orders act as if traffic were already 10% higher
  (OPS_AHEAD).
2026-11-06 20:23:25 +00:00
Frederic Jung
c96f9e7644
Sales renewal labels go through N_() so the translation check sees them 2026-11-06 21:03:19 +01:00
Frederic Jung
74e8611f8e
The sales desk answers renewal haggles, each salesperson their way
With the new switch at the sales desk, whoever runs sales answers a
renewal haggle three days after it opens, unless the player did first.
The engineer gives business customers their discount and keeps nerdy
ones at the market price (nobody leaves); the shark holds the old price,
often with a fresh promise, bills a month of the saving, and loses some
(nerds most); the CEO gives 10% more off for a double term, says yes, or
picks a fight. Every answer is a hash of the contract. The switch is
stored only when on, so existing saves are unchanged.
2026-11-06 20:56:50 +01:00