Follow-ups to #276, #277 and #278

Saves clamp a runaway DE-Kicks price and its remembered quote to the ceiling, and a clipped rise announces only what the bill shows.
A PNI steps down only to the smallest size its network sells, so Tier 1 and closed-CDN PNIs stop at 100G.
A trace off the metrics says it shows a customer circuit's path, not where the internet traffic goes.
This commit is contained in:
Frederic Jung 2026-11-04 08:11:03 +01:00
parent c358b715c7
commit 24d865aa57
No known key found for this signature in database
14 changed files with 56 additions and 9 deletions

View file

@ -52,8 +52,12 @@ test('a PNI steps down one size at a time, but not while an augment is on order'
assert.equal(ev("S.pni.find(p=>p.id==='pt1').tier"), 1, 'down one size');
ev("S.pni.find(p=>p.id==='pt1').up={tier:1,n:2,ready:S.day+30};ACT.downP({id:'pt1'})");
assert.equal(ev("S.pni.find(p=>p.id==='pt1').tier"), 1, 'an augment on order blocks it');
ev("S.pni.find(p=>p.id==='pt1').up=null;S.pni.find(p=>p.id==='pt1').tier=0;ACT.downP({id:'pt1'})");
assert.equal(ev("S.pni.find(p=>p.id==='pt1').tier"), 0, 'the smallest port stays');
ev("S.pni.find(p=>p.id==='pt1').up=null;ACT.downP({id:'pt1'})");
assert.equal(ev("pniMin('cog')"), 1, 'Cogentle, a Tier 1, sells no 10G PNIs');
assert.equal(ev("S.pni.find(p=>p.id==='pt1').tier"), 1, 'so its PNI stops at 100G');
assert.doesNotMatch(ev("cityPanel('fra')"), /Downgrade 10G/, 'and offers no 10G step');
ev("S.pni.push({id:'pt2',net:'cmc',city:'fra',tier:0});ACT.downP({id:'pt2'})");
assert.equal(ev("S.pni.find(p=>p.id==='pt2').tier"), 0, 'the smallest port stays');
ev("S.pni.find(p=>p.id==='pt1').tier=1;S.pni.find(p=>p.id==='pt1').ready=S.day+9;ACT.downP({id:'pt1'})");
assert.equal(ev("S.pni.find(p=>p.id==='pt1').tier"), 1, 'a PNI that is not up yet stays');
assert.deepEqual(errors, []);