Commit Graph

1619 Commits

Author SHA1 Message Date
08fcafa0a4 sync: auto-sync from HOWARD-HOME at 2026-06-16 18:09:18
Author: Howard Enos
Machine: HOWARD-HOME
Timestamp: 2026-06-16 18:09:18
2026-06-16 18:09:27 -07:00
d6cbfb3e50 sync: auto-sync from HOWARD-HOME at 2026-06-16 17:03:02
Author: Howard Enos
Machine: HOWARD-HOME
Timestamp: 2026-06-16 17:03:02
2026-06-16 17:03:10 -07:00
8c048c3d51 cascades: 2.4 GHz remediation runbook for tonight (mesh-safe power-down + per-floor disable, gated)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-16 16:46:17 -07:00
3374483cd6 unifi-wifi: coverage-thin mesh-awareness — never disable wireless-mesh APs or their parents
Howard caught a real hazard: coverage-thin was mesh-blind. At Cascades, 2nd Floor Atrium is the
wireless-mesh PARENT for CC Bridge + salon (backhaul ch36/5GHz), and 206 U7 Pro carries 108. The tool
had listed 2nd Floor Atrium / CC Bridge / 206 as 2.4 disable targets. Although the backhaul is 5GHz
(so a 2.4-radio disable wouldn't drop it), touching infra APs that feed others is needless risk.

Fix: fetch live uplink topology (stat/device); build the mesh set = wireless-uplink APs UNION their
parents; exclude them from disable (kept as coverers if their 2.4 is on); print MESH-PROTECTED line.
Falls back with a clear WARNING if no controller cred. Cascades now auto-excludes 108/206/2nd Atrium/
CC Bridge/salon; resilient plan 34->33. Also verified SSIDs are not AP-pinned (broadcasting_aps off),
so no client is orphaned by a radio disable.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-16 16:43:08 -07:00
6f77222bcb unifi-wifi: coverage-thin apply hint -> per --ap (was --zone, which would disable a whole floor)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-16 16:28:35 -07:00
f936224de8 unifi-wifi: add coverage-thin.sh — 2.4 coverage-redundancy disable planner (active-2.4 aware)
Answers "which 2.4 radios can we turn OFF given over-coverage, based on AP proximity." Greedy
dominating-set on the AP-to-AP 2.4 SNR layer: disables radios whose area stays covered by a nearby
ACTIVE-2.4 neighbor, maximizing interference-airtime removed without opening a 2.4 hole. Caps per-zone,
guards coverer capacity, flags single-coverer (low-resilience) disables, reports co-channel before/after.

Why separate from optimize-radios: optimize uses band-AGNOSTIC physical adjacency, so it counts an AP
whose ng radio is DISABLED as a "coverer" via its 5/6 GHz (observed: it proposed disabling 127/229/330/428
"covered by 128" — but 128's 2.4 is already disabled => those would be 2.4 holes). coverage-thin uses the
2.4 SNR layer specifically and only counts neighbors whose 2.4 stays ON.

Cascades (live): aggressive MINCOV=1 -> disable 36/76; resilient MINCOV=2 -> disable 34/76 with >=2 active
2.4 coverers each; co-channel ch6 28->13, ch11 25->13, ch1 20->13; ~2400 interference-airtime pts removed.
Read-only; needs NEIGHBOR_JSON. SKILL.md step 3b.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-16 16:17:54 -07:00
80384a79f4 unifi-wifi: radio-usage.sh --ap mode — per-device 2.4 history + steerable-vs-legacy tagging
Adds `radio-usage.sh <site> <band> --ap "<AP name>"`: lists the devices on one AP's band by merging
live clients (stat/sta) with recent association events (wifi_connectivity_event, band-aware), enriched
from ace.user identity. Tags each device steerable vs legacy:
  - from events: DUAL (also seen on 5/6 GHz -> steerable) vs NG-ONLY (2.4-only -> legacy/IoT)
  - fallback when no event in the (short ~1d) retention window: randomized MAC = modern phone/laptop
    (likely 5G/steerable) vs fixed vendor OUI = likely IoT/legacy.
Decision value: steerable -> fix via band-steering/min-RSSI; a legacy/IoT device present argues AGAINST
disabling that 2.4 radio. Needs controller cred for the live BSSID (vap_table) map; honest about the
short event retention. Validated live on Cascades (347, Dining Room).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-16 15:51:13 -07:00
659c3a2bda unifi-wifi: add radio-usage.sh — per-AP band client-usage history (disable-safe vs power-down)
Answers "is this 2.4 radio actually used?" from accumulated controller stats (ace_stat.stat_daily,
~77d). Reports per-AP time-avg concurrent users (<radio>-num_sta_avg) + peak station snapshot
(<band>-num_sta), distinguishing avg~0/peak>0 (takes bursts -> POWER-DOWN) from peak==0 (genuinely
unused -> disable-safe). With NEIGHBOR_JSON it crosses low-use APs against the AP-to-AP SNR matrix to
emit a defensible safe-to-disable shortlist (low-use AP + strong overlapping neighbor with headroom),
noting mutual-coverage conflicts and deferring conflict-free selection to optimize-radios.

Validated live on Cascades: of 76 APs only 1 has peak==0 over 77d (the offline AP 108); every other
2.4 radio takes real client bursts (peaks 5-58) at very low avg (12 APs <0.5 concurrent). I.e. the
usage history independently CONFIRMS the conservative power-down-not-disable call. Read-only (Mongo
plane). Uses var-assignment to avoid the legacy-mongo REPL echo. SKILL.md documents it as step 2b.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-16 15:38:26 -07:00
e1031ae91a 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>
2026-06-16 15:08:35 -07:00
7e2f49020a sync: auto-sync from HOWARD-HOME at 2026-06-16 14:11:33
Author: Howard Enos
Machine: HOWARD-HOME
Timestamp: 2026-06-16 14:11:33
2026-06-16 14:11:42 -07:00
e3bb7d3f95 unifi-wifi: pfSense compat layer ON HOLD — Cascades pfSense too old for RESTAPI pkg, needs upgrade first
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-16 14:11:33 -07:00
1118594cd2 unifi-wifi: pfSense gateway compat layer (§E) — REST backend + dispatch inside gw-audit/gw-control
Per Howard's decision (2026-06-16, "try what Mike wanted"): Mike's §E open decisions resolved as
REST API package backend + dispatch INSIDE the existing gateway verbs (his lean), not sibling scripts.

- NEW scripts/pfsense-backend.sh: pfSense REST API (pfSense-pkg-RESTAPI v2, X-API-Key) driver exposing
  the same verbs as gw-control (audit, pf-list/disable/enable/delete/set-ports, fw-list/disable/enable,
  block-ips) + a `setup` helper. Writes --apply-gated with per-object rollback to .claude/tmp + firewall/apply.
- gw-audit.sh: when num_gw=0 and a clients/<slug>/pfsense-api cred is vaulted (or --pfsense <slug>),
  appends the pfSense WAN/DHCP/firewall audit; else prints the setup hint. (captures num_gw to gate.)
- gw-control.sh: same-verb auto-dispatch to pfsense-backend when a pfSense cred resolves for the site.
- SKILL.md [PROPOSED]->[SCAFFOLDED]; ROADMAP §E open decisions marked resolved.

STATUS: scaffolded. BLOCKED/setup/no-cred paths tested; gw-audit dispatch validated live (Cascades
num_gw=0 -> hint). Live REST calls pending a reachable pfSense with the API pkg + a vaulted key; v2
endpoint paths must be verified against the installed API version on first live run.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-16 13:51:10 -07:00
708379732e sync: auto-sync from HOWARD-HOME at 2026-06-16 13:43:14
Author: Howard Enos
Machine: HOWARD-HOME
Timestamp: 2026-06-16 13:43:14
2026-06-16 13:43:23 -07:00
0956f76cb2 sync: auto-sync from HOWARD-HOME at 2026-06-16 13:30:26
Author: Howard Enos
Machine: HOWARD-HOME
Timestamp: 2026-06-16 13:30:26
2026-06-16 13:30:35 -07:00
2f6057518d sync: auto-sync from HOWARD-HOME at 2026-06-16 13:12:16
Author: Howard Enos
Machine: HOWARD-HOME
Timestamp: 2026-06-16 13:12:16
2026-06-16 13:12:26 -07:00
34091500ee sync: auto-sync from GURU-5070 at 2026-06-16 09:02:24
Author: Mike Swanson
Machine: GURU-5070
Timestamp: 2026-06-16 09:02:24
2026-06-16 09:02:39 -07:00
a32dfc33fa syncro: invoice-note policy — block hours remaining, low-block (<4hr) renew + Winter tag, recurring sweep
Extends the invoice Message (note) automation into a single reusable helper
set_invoice_note <invoice_id> <customer_id> [pre_billing_prepay]:
  - no block (prepay_hours==0)  -> "Interested in discounted labor? Ask us about block-rate pricing."
  - block, >=4 hrs left         -> "Block hours remaining: N."
  - block, <4 hrs left          -> remaining + renew line, AND tags Winter (<@624666486362996755>)
                                   in #bot-alerts (low-block heads-up; mentions ping, no allowed_mentions)
Pre-billing prepay arg keeps a just-depleted block counted as a block customer (shows renew, not upsell).
Never clobbers a non-empty note.

Wired into billing Step 3 (set_invoice_note "$INVOICE_ID" "$CUST_ID" "$PREPAY"), and a new
"Recurring invoice note sweep" applies the same policy to Syncro's auto-generated recurring invoices
(schedule_id != null, recent, current balance) — idempotent, run after each recurring run.

Branch logic + a real e2e note set/restore validated on the ACG internal test account (#67741); the
<4hr Winter alert was stubbed in testing so no real ping fired.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-16 08:56:42 -07:00
864f4d0a33 syncro: document Invoice Message (note field) + auto block-rate hint for non-block customers
The on-screen "Invoice Message" text block IS the invoice `note` field, editable via
PUT /invoices/{id} {"note": "..."} (response {"invoice": {...}}). Verified on the ACG
internal test account (#67741: set/verify/restore).

Billing flow now sets a one-line upsell hint on the invoice note — "Interested in
discounted labor? Ask us about block-rate pricing." — ONLY for customers with no prepaid
block (prepay_hours == 0). Block customers (prepay_hours > 0) get no hint; never clobber
a non-empty note.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-16 08:48:25 -07:00
313fd0ac3d onboarding-diagnostic: fix two Server-SKU false positives
Both surfaced on GND-SERVER (Server 2019 DC), would mis-grade every Windows Server:

1. OS EOL: build numbers are SHARED between client and server SKUs (17763 = Win10
   1809 AND Server 2019; 14393 = 1607/Server2016; 26100 = 24H2/Server2025). The map
   only had client dates, so Server 2019 (supported to 2029) was flagged EOL-2020 =
   false critical. Now branch on SKU ($caption -match 'Server') with a Server EOL map.

2. Stability disk errors: ids 7/51/153 are shared across providers; provider 'disk'
   = real I/O error, but 'Microsoft-Windows-Kernel-Boot' id 153 = "VBS disabled" boot
   noise. The unfiltered fallback counted that noise as disk errors (false warning on
   healthy boxes). Now count only true storage providers, no unfiltered fallback.

Parses clean. Re-run on GND-SERVER should drop from RED to AMBER (both false findings gone).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-16 08:18:27 -07:00
a33bc423f6 grabb-durando: GND-SERVER full health/security baseline (RED)
First onboarding-diagnostic baseline for GND-SERVER (Grabb & Durando DC/file/RRAS box,
gd.local, 192.168.242.200). Grade RED: 2 critical (host firewall OFF on all profiles;
OS-EOL flag — false positive, build 17763 is Server 2019, supported to 2029), 6 warning
(Defender/AV unconfirmed, built-in Administrator enabled, 1 pending update, 2 disk errors
/14d, pending reboot, 2 stopped auto services), plus tempadmin local admin + no confirmed
BitLocker. Immutable JSON + report under onboarding-baselines/.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-16 08:11:35 -07:00
76d006c08b sync: auto-sync from HOWARD-HOME at 2026-06-16 07:49:26
Author: Howard Enos
Machine: HOWARD-HOME
Timestamp: 2026-06-16 07:49:26
2026-06-16 07:49:34 -07:00
5f347dcf79 memory: AAD Connect AdminSDHolder writeback-permission pattern
Reference memory + index entry: diagnosing/fixing AAD Connect "completed-export-errors"
(8344 INSUFF_ACCESS_RIGHTS) where AdminSDHolder strips the connector account's write
permission on a protected admin object. Covers msDS-KeyCredentialLink (Russo) and
msExchSafeSendersHash (Glaztech); csexport /f:x diagnosis + dsacls AdminSDHolder grant.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-16 07:45:32 -07:00
d4d526ae26 sync: auto-sync from HOWARD-HOME at 2026-06-16 07:44:03
Author: Howard Enos
Machine: HOWARD-HOME
Timestamp: 2026-06-16 07:44:03
2026-06-16 07:44:15 -07:00
69987190fc unifi-wifi: roadmap — pfSense gateway compatibility layer (§ E)
Capture the "UniFi APs/switches behind a pfSense gateway" topology (Cascades, our
office, several clients) as a first-class roadmap item: make the gateway verbs
(gw-audit / gw-control / VPN) work against pfSense via a thin driver behind the
same verbs (gw-audit already detects num_gw=0 = third-party firewall).

Includes the verb->pfSense mapping (NAT port-forwards, filter rules,
easyrule block-ips, native OpenVPN/IPsec/WireGuard), ranked backend options
(REST-API pkg vs stock SSH easyrule/pfSsh.php vs diag_command.php vs config.xml),
existing vaulted pfSense creds (Cascades + office), and open decisions. SKILL.md
status block notes the proposed layer.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-16 07:39:53 -07:00
eb87710b9a unifi-wifi: add gw-control.sh — gateway router actions (port-forward + WAN firewall)
The write companion to gw-audit. Closes/scopes internet-facing port-forwards and
toggles WAN firewall rules at the USG/UXG/UDM via the RW controller REST admin.

Actions: pf-list / pf-disable / pf-enable / pf-delete / pf-set-ports / pf-set-src,
fw-list / fw-disable / fw-enable, block-ips (WAN address-group + WAN_IN drop rule).
Reads via Mongo (no cred); writes via login->CSRF->REST (rest/portforward,
rest/firewallrule, rest/firewallgroup). DRY-RUN default, --apply gated on
infrastructure/uos-server-network-api-rw, rollback saved to .claude/tmp.

Dry-run validated on Grabb & Durando (USG-3P): identifies the live "VPN" forward
(80,443,1723 -> 192.168.242.200) + the "GRE" WAN_IN accept that back an
internet-exposed, brute-forced PPTP. Closes the ROADMAP firewall/port-forward item.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-16 07:35:55 -07:00
48592bd16b sync: auto-sync from HOWARD-HOME at 2026-06-16 07:26:57
Author: Howard Enos
Machine: HOWARD-HOME
Timestamp: 2026-06-16 07:26:57
2026-06-16 07:27:06 -07:00
03b429d10a sync: auto-sync from HOWARD-HOME at 2026-06-16 01:20:51
Author: Howard Enos
Machine: HOWARD-HOME
Timestamp: 2026-06-16 01:20:51
2026-06-16 01:21:00 -07:00
4e797dbf61 sync: auto-sync from HOWARD-HOME at 2026-06-16 01:13:51
Author: Howard Enos
Machine: HOWARD-HOME
Timestamp: 2026-06-16 01:13:51
2026-06-16 01:13:59 -07:00
6557cdb5bb sync: auto-sync from HOWARD-HOME at 2026-06-16 01:09:44
Author: Howard Enos
Machine: HOWARD-HOME
Timestamp: 2026-06-16 01:09:44
2026-06-16 01:09:53 -07:00
af2feb1dfb sync: auto-sync from HOWARD-HOME at 2026-06-16 00:58:45
Author: Howard Enos
Machine: HOWARD-HOME
Timestamp: 2026-06-16 00:58:45
2026-06-16 00:58:54 -07:00
60b763df0c sync: auto-sync from HOWARD-HOME at 2026-06-16 00:40:03
Author: Howard Enos
Machine: HOWARD-HOME
Timestamp: 2026-06-16 00:40:03
2026-06-16 00:40:12 -07:00
ae3d760c37 sync: auto-sync from HOWARD-HOME at 2026-06-16 00:24:18
Author: Howard Enos
Machine: HOWARD-HOME
Timestamp: 2026-06-16 00:24:18
2026-06-16 00:24:27 -07:00
35a0cca2c6 sync: auto-sync from HOWARD-HOME at 2026-06-16 00:03:10
Author: Howard Enos
Machine: HOWARD-HOME
Timestamp: 2026-06-16 00:03:10
2026-06-16 00:03:21 -07:00
a62bd65be7 sync: auto-sync from HOWARD-HOME at 2026-06-15 23:43:51
Author: Howard Enos
Machine: HOWARD-HOME
Timestamp: 2026-06-15 23:43:51
2026-06-15 23:44:00 -07:00
e5f07afd90 sync: auto-sync from HOWARD-HOME at 2026-06-15 23:34:02
Author: Howard Enos
Machine: HOWARD-HOME
Timestamp: 2026-06-15 23:34:02
2026-06-15 23:34:11 -07:00
60d0a2bf87 sync: auto-sync from HOWARD-HOME at 2026-06-15 23:24:56
Author: Howard Enos
Machine: HOWARD-HOME
Timestamp: 2026-06-15 23:24:56
2026-06-15 23:25:05 -07:00
d9c7f3cd7d sync: auto-sync from HOWARD-HOME at 2026-06-15 23:04:23
Author: Howard Enos
Machine: HOWARD-HOME
Timestamp: 2026-06-15 23:04:23
2026-06-15 23:04:31 -07:00
cb421c44fb sync: auto-sync from HOWARD-HOME at 2026-06-15 22:06:13
Author: Howard Enos
Machine: HOWARD-HOME
Timestamp: 2026-06-15 22:06:13
2026-06-15 22:06:20 -07:00
bf74f967eb sync: auto-sync from HOWARD-HOME at 2026-06-15 21:59:42
Author: Howard Enos
Machine: HOWARD-HOME
Timestamp: 2026-06-15 21:59:42
2026-06-15 21:59:51 -07:00
6532476e7f wiki: compile cascades-tucson (full) — integrate UniFi RF audit (77 APs, 2.4GHz pain band, DFS resilience, 6GHz untapped); Syncro 55.75h/0 open 2026-06-15 21:03:03 -07:00
b83057f6e2 sync: auto-sync from HOWARD-HOME at 2026-06-15 20:56:36
Author: Howard Enos
Machine: HOWARD-HOME
Timestamp: 2026-06-15 20:56:36
2026-06-15 20:56:45 -07:00
3a7b252caf sync: auto-sync from GURU-5070 at 2026-06-15 20:49:22
Author: Mike Swanson
Machine: GURU-5070
Timestamp: 2026-06-15 20:49:22
2026-06-15 20:49:36 -07:00
c99615df7e sync: auto-sync from HOWARD-HOME at 2026-06-15 20:40:48
Author: Howard Enos
Machine: HOWARD-HOME
Timestamp: 2026-06-15 20:40:48
2026-06-15 20:40:59 -07:00
f341ee9398 sync: auto-sync from Mikes-MacBook-Air.local at 2026-06-15 20:33:42
Author: Mike Swanson
Machine: Mikes-MacBook-Air.local
Timestamp: 2026-06-15 20:33:42
2026-06-15 20:33:43 -07:00
6772c96fef sync: auto-sync from GURU-5070 at 2026-06-15 20:03:03
Author: Mike Swanson
Machine: GURU-5070
Timestamp: 2026-06-15 20:03:03
2026-06-15 20:03:17 -07:00
7eab5ed030 sync: auto-sync from GURU-5070 at 2026-06-15 19:38:20
Author: Mike Swanson
Machine: GURU-5070
Timestamp: 2026-06-15 19:38:20
2026-06-15 19:38:35 -07:00
710db4c311 sync: auto-sync from HOWARD-HOME at 2026-06-15 19:25:09
Author: Howard Enos
Machine: HOWARD-HOME
Timestamp: 2026-06-15 19:25:09
2026-06-15 19:25:17 -07:00
b36b882568 sync: auto-sync from GURU-5070 at 2026-06-15 18:57:26
Author: Mike Swanson
Machine: GURU-5070
Timestamp: 2026-06-15 18:57:26
2026-06-15 18:57:39 -07:00
94ff0d61ee sync: auto-sync from GURU-5070 at 2026-06-15 18:45:55
Author: Mike Swanson
Machine: GURU-5070
Timestamp: 2026-06-15 18:45:55
2026-06-15 18:46:11 -07:00
3f01efb6bf sync: auto-sync from GURU-5070 at 2026-06-15 18:32:17
Author: Mike Swanson
Machine: GURU-5070
Timestamp: 2026-06-15 18:32:17
2026-06-15 18:32:32 -07:00