Prefer keeps the say at its own POP only, and the direct ranks stop slowing the game day

Review of #205:

- Prefer no longer switches the carrier-direct rule off for the whole network.
  A POP with a Prefer-marked transit port keeps what Prefer says; every other
  POP keeps the rule. compute(), traceroute and the reference loop in the tests
  all use the same per-POP rule, and a new test covers it (New York and Chicago,
  Prefer on one POP's Tell-Ya port).
- dayTick() cost. The harness is neutral (the same page on both sides differs by
  1%), but the cost was real: the four extra rank passes inside compute()'s main
  loop made V8 deoptimise compute() 954 times in 30 game days against 46 on main.
  The direct ranks now run in a small function of their own, in the plain way the
  reference loop does (their lists are one carrier's ports), so the main loop is
  the one main has, and the setup moved out of compute(). 61 deopts instead of 954.
- Italian: "Porta qui" read as "port here" next to "Porta più vicina"; it is
  "Instrada qui" now, and "Ogni POP instrada il traffico..." matches.
- Help text: says that real BGP carries the traffic from every POP (the shorter
  AS path beats IGP distance), that Carry here does that here, and that Nearest
  port is the default. All six languages.
This commit is contained in:
Christopher Hawker 2026-11-01 20:07:23 +11:00
parent b8845413d3
commit eb78d7104e
14 changed files with 77 additions and 23 deletions

View file

@ -128,7 +128,8 @@ never freezes the game.
goes first, before plain transit, for traffic bound for that carrier or for a network that buys
transit from it (`25-direct-egress.js`: the shorter AS path): always at its own POP, and from every
POP when the port is set to carry. Such a port is still an ordinary transit exit for the other
POPs. A Prefer-marked port, backup, RouteScript and Auto-TE rules keep their say. With Auto-TE, overflow spills
POPs. Backup, RouteScript and Auto-TE rules keep their say, and so does a Prefer-marked port at its own POP (the other
POPs keep the rule). With Auto-TE, overflow spills
onto alternate paths; RouteScript rules (`teRules()`) can prefer, avoid, cap, drain
or blackhole.
5. Layer-2 customers (L2VPN, SD-WAN, waves) are carved out of link capacity first.