Files
kitadmin 24d8fbd366 fix: revert TUNNEL_LOCAL_SSH_PORT to 2223, fix registry, add incident docs
- wizard.sh + connect.conf: TUNNEL_LOCAL_SSH_PORT back to 2223 (Synology SSH port)
- port-registry: renamed x6340 → x4662 (matches QuickConnect ID)
- port-registry: added MR2200ac mesh satellite note for x4662
- deployment checklist: added kit-connect section, post-deployment rules,
  incident log, and complete fleet port registry table
- memory: added fleet-router-inventory.md with full fleet state
- hub README: updated with current status and locations

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-22 21:20:08 +00:00

24 lines
785 B
Bash

setup() { load '../../package/kit-busrouter/files/usr/lib/busrouter/lib-score.sh'; }
@test "composite weights sum to a 0-100 score" {
# latency35 dl25 up10 jit10 loss10 sig10 ; all metrics perfect -> 100
run score_composite 5 25 12.5 1 0 -65
[ "$output" -eq 100 ]
}
@test "composite all-worst -> 0" {
run score_composite 200 0.5 0.5 50 40 -95
[ "$output" -eq 0 ]
}
@test "rolling average of 3 samples" {
run rolling_avg 90 60 30 # -> 60
[ "$output" -eq 60 ]
}
@test "rolling average rounds half-up" {
run rolling_avg 100 100 99 # 299/3 = 99.67 -> 100
[ "$output" -eq 100 ]
}
@test "signal weight redistributes when no modem (signal='')" {
run score_composite 5 25 12.5 1 0 "" # still 100, sig weight moved to latency/throughput
[ "$output" -eq 100 ]
}