unifi-wifi: skill health pass — fix optimize-radios stray REPL echo + ASCII-clean all output

Full verification of the skill against Cascades (live):
- All 19 scripts syntax-clean.
- Controller-side read-only validated live: sites, audit-site, switch-audit, live-stats, model-rank,
  optimize-radios, monitor-run, gw-audit. Dry-run apply paths validated: apply-radio, apply-wlan,
  client-control, device-control. AP-side mechanism validated: SSH auth + /proc/ui_neighbor read on a
  sample AP; full neighbor-collect (74-AP SNR sweep) -> channel-plan end-to-end produced a 1/6/11 plan.

Fixes:
- optimize-radios.sh: the `for(k in prof)` loop's numeric completion value was REPL-echoed by the legacy
  mongo shell (stray "94.56..." line in output). Terminated the loop body with `void 0` to suppress it.
- ASCII-clean printed output (CLAUDE.md no-non-ASCII): replaced em-dashes / Unicode arrows / § that
  reached stdout and rendered as `?`/mojibake on the Windows console, across optimize-radios,
  neighbor-collect, survey-collect, dfs-check, audit-site, sites, monitor-run, apply-radio, apply-wlan,
  pfsense-backend. (Comment-only non-ASCII left as-is; never printed.)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-16 15:08:35 -07:00
parent de7ad33671
commit 412c0eff31
10 changed files with 19 additions and 19 deletions

View File

@@ -34,7 +34,7 @@ while [ $# -gt 0 ]; do case "$1" in
*) POS+=("$1"); shift;; esac; done
setup_msg(){ cat <<EOF
[SETUP] pfSense REST API backend one-time per client:
[SETUP] pfSense REST API backend - one-time per client:
1) pfSense GUI -> System > Package Manager > Available Packages: install 'RESTAPI'
2) System > REST API > Settings: enable; Auth Method = API Key
3) System > REST API > Keys: create a key (READ-ONLY for audit; a write-capable key for pf-/fw-/block-ips)
@@ -42,7 +42,7 @@ setup_msg(){ cat <<EOF
bash $REPO/.claude/skills/vault/scripts/vault-helper.sh new $VP \\
--kind generic --name '<Client> pfSense REST API' --tag pfsense \\
--set url=https://<pfsense> --set apikey=<key>
(No package / can't install? SSH 'easyrule' + config.xml fallback is the planned alt backend ROADMAP §E.)
(No package / can't install? SSH 'easyrule' + config.xml fallback is the planned alt backend - ROADMAP section E.)
EOF
}
[ "$ACT" = "setup" ] && { setup_msg; exit 0; }
@@ -77,7 +77,7 @@ def err(e):
try: body=e.read().decode('utf-8','replace')[:300]
except Exception: pass
print(f"[FAIL] HTTP {getattr(e,'code','?')}: {body or e}")
print("[hint] if 404/endpoint-not-found, the installed REST API version uses a different path "
print("[hint] if 404/endpoint-not-found, the installed REST API version uses a different path - "
"check System > REST API > Documentation and adjust pfsense-backend.sh.")
sys.exit(1)
def save_rollback(tag,obj):
@@ -119,7 +119,7 @@ try:
s=data(call('GET',ep))
if isinstance(s,dict): print(" "+", ".join(f"{k}={s.get(k)}" for k in list(s)[:8])); break
except urllib.error.HTTPError: continue
else: print(" (system endpoint not found verify path)")
else: print(" (system endpoint not found - verify path)")
print("\n== DHCP scopes (pool pressure) ==")
try:
ds=data(call('GET','/services/dhcp_server'))