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.
This commit is contained in:
jvanvik 2026-11-09 22:47:21 +01:00
parent 1f76639b8f
commit 286ae48207
14 changed files with 102 additions and 24 deletions

View file

@ -305,9 +305,10 @@ function opsAround(l){const adj={};for(const x of S.links){if(x===l||linkDown(x)
// answers (OPS_ROUTE, then {dark}: opsDarkTrial(), in play in the route worker).
// Nothing rides the fiber: no traffic of its own (customers' circuits are in it), none on an express through it (#58).
const opsUnused=l=>{const L=(R&&R.load)||{};return !(L[l.id]>1e-6)&&!xpOver(l.id).some(x=>L[x.id]>1e-6);};
// What a day dark comes to, said without routing: false (a customer rides it, or it carries traffic with no other way
// between its cities), true (nothing rides it, so nothing is lost), null (a routing decides: opsDarkTrial()).
function opsDarkPre(l){if(S.biz.some(b=>b.link===l.id))return false;return opsUnused(l)?true:opsAround(l)?null:false;}
// What a day dark comes to, said without routing: false (a customer's wave rides its line system, or it carries traffic
// with no other way between its cities), true (nothing rides it, so nothing is lost), null (a routing decides:
// opsDarkTrial()). Leased pairs and IRUs are glass: a line-system swap never touches them. ws: as dfWaveCust() takes it.
function opsDarkPre(l,ws){if(dfWaveCust(l,ws))return false;return opsUnused(l)?true:opsAround(l)?null:false;}
const OPS_ROUTE={route:true};
// X.dk.t counts the tests that route.
function* opsDark(l,X){let k=opsDarkPre(l);if(k===false)return false;if(X.dirty){yield OPS_ROUTE;X.dirty=false;k=opsDarkPre(l);}