towerops/test/towerops_web/live
Graham McIntire 727a743c11 feat(llm): per-insight-type prompt hints + flake fixes
Generic prompts produce generic advice. This commit adds per-type
expert hints appended to the base system prompt, listing the metadata
field names the rule provides plus short domain heuristics so the
LLM has the context it needs to write a tight, specific recommendation.

Hints cover: ap_frequency_change, own_fleet_channel_conflict,
sector_overload, cpe_realign, wireless_signal_weak, wireless_snr_low,
backhaul_over_capacity, backhaul_near_capacity, qoe_degradation,
capacity_saturation. Unknown types fall back to the base prompt.

No change to rules, schema, or worker — this lifts every existing
insight's enrichment quality on the next cron run.

Also fixes two recurring flaky tests:

- agent_live_test.exs:567 now mirrors the companion show_test.exs
  pattern of accepting any of the valid update-flow flashes (Failed
  / Update command sent / No binary available). The previous
  Req.Test stub-and-allow approach was itself flaky because both
  test files stub the same module name and ownership tracking can
  leak under full-suite parallelism.
- telemetry_test.exs is now async: false. Its handle_endpoint_stop
  describe block mutates global Logger.level which races with other
  async tests; running this single module sync removes the race
  without sacrificing the per-test setup/restore pattern.
2026-05-09 17:36:07 -05:00
..
account_live test: account activity request_path + data_accessed render branches 2026-05-09 09:28:18 -05:00
admin test: cover Admin OrgLive override / pricing event paths 2026-05-09 12:04:48 -05:00
agent_live test: lift coverage 84.08% → 84.99%; exclude declarative modules from coverage 2026-05-08 11:18:26 -05:00
alert_live test: AlertLive sort_alerts impact branch + minor sweep 2026-05-08 18:27:06 -05:00
check_live test: lift coverage 79.78% → 80.92%+ with broad new tests 2026-05-08 09:11:06 -05:00
components test: GlobalSearch keyboard nav + StatusPageLive mount + Coverages.Profile clutter polygons 2026-05-08 13:23:13 -05:00
coverage_live test: CoverageLive.Map probe_point malformed input + coverage_status broadcast 2026-05-09 12:41:15 -05:00
device_live test: stabilize DeviceLive.Index health-color tests; drop deadlock-prone latency cases 2026-05-09 13:09:00 -05:00
device_live_nested chore: remove backup files from sed operations 2026-03-06 07:57:30 -06:00
graph_live test: GraphLive.Show error branches for missing sensor/storage/interface 2026-05-09 11:58:48 -05:00
help_live test: HelpLive generate_password success/failure/transport-error branches 2026-05-09 10:17:51 -05:00
helpers test: fix all compile warnings in subscriber matching tests 2026-03-10 13:02:32 -05:00
maintenance_live test: alert severity badges, maintenance form save success paths 2026-05-09 10:12:19 -05:00
mikrotik_backup_live test: lift coverage 79.59% → 79.85% with more focused tests 2026-05-07 19:16:13 -05:00
org test: Org.SettingsLive billing tab paid plan and past-due rendering 2026-05-09 12:45:26 -05:00
org_live fix test warnings and failures 2026-02-05 15:24:41 -06:00
site_live tests: raise coverage to 70% via helper promotion + new unit/property tests 2026-04-24 09:49:06 -05:00
trace_live test: fix slow + flaky tests (Mox global, env pollution, pool starvation) 2026-05-08 14:43:30 -05:00
user_settings_live test: more LiveView event coverage (TotpManager, ApiTokenManager, OrgSettings) 2026-05-07 14:32:35 -05:00
activity_feed_live_test.exs test: GraphLive live mode + Show snmp_sensor format + Alert/Activity events 2026-05-08 18:12:32 -05:00
agent_live_test.exs feat(llm): per-insight-type prompt hints + flake fixes 2026-05-09 17:36:07 -05:00
alert_live_events_test.exs test: GraphLive live mode + Show snmp_sensor format + Alert/Activity events 2026-05-08 18:12:32 -05:00
alert_live_test.exs test: alert severity badges, maintenance form save success paths 2026-05-09 10:12:19 -05:00
config_timeline_live_helpers_test.exs tests: raise coverage to 70% via helper promotion + new unit/property tests 2026-04-24 09:49:06 -05:00
config_timeline_live_test.exs test: lift coverage 84.08% → 84.99%; exclude declarative modules from coverage 2026-05-08 11:18:26 -05:00
dashboard_live_test.exs test: TcpExecutor receive_timeout + Preseem.get_device_qoe_data 2026-05-09 12:18:47 -05:00
escalation_policy_live_test.exs feat(on_call): drag-drop reorder + restrictions editor + new-schedule polish 2026-04-28 14:27:38 -05:00
insights_live_events_test.exs feat(insights): SectorOverload + CpeRealign recommendation rules 2026-05-09 17:07:15 -05:00
integrations_smoke_test.exs ci: enable PostGIS in test workflows + add tests covering ~3pp more 2026-05-05 10:35:22 -05:00
live_helpers_test.exs tests: raise coverage to 70% via helper promotion + new unit/property tests 2026-04-24 09:49:06 -05:00
map_live_events_test.exs test: cover live view event handlers, invitation query, fix flaky timeout test 2026-05-05 11:13:01 -05:00
mobile_qr_live_test.exs test: lift coverage 84.08% → 84.99%; exclude declarative modules from coverage 2026-05-08 11:18:26 -05:00
my_data_live_test.exs gdpr (#86) 2026-03-19 14:28:31 -05:00
network_map_live_events_test.exs test: lift coverage 78.42% → 79.59% with focused unit + integration tests 2026-05-07 18:40:43 -05:00
network_map_live_test.exs test: refactor LiveView tests to use HTML-aware element/form helpers 2026-04-29 11:14:20 -05:00
onboarding_live_test.exs test: sweep more branches in sync workers + Onboarding + Gaiia insights 2026-05-08 18:21:49 -05:00
org_live_test.exs fix: improve insight auto-resolution and query performance 2026-03-05 10:11:52 -06:00
reports_live_test.exs test: ReportsLive toggle/delete/run_now + UserRegistration invitation paths + SiteLive geocode/apply 2026-05-08 12:53:06 -05:00
rf_link_health_live_helpers_test.exs tests: raise coverage to 70% via helper promotion + new unit/property tests 2026-04-24 09:49:06 -05:00
schedule_live_test.exs test: more coverage across LiveViews (gaiia mapping, schedule, integrations) 2026-05-08 09:58:10 -05:00
site_live_test.exs test: SiteLive force_rediscover + CoverageLive.Show coverage_status broadcast 2026-05-08 13:16:13 -05:00
smoke_test.exs ci: enable PostGIS in test workflows + add tests covering ~3pp more 2026-05-05 10:35:22 -05:00
status_page_live_helpers_test.exs tests: raise coverage to 70% via helper promotion + new unit/property tests 2026-04-24 09:49:06 -05:00
status_page_live_test.exs test: GlobalSearch keyboard nav + StatusPageLive mount + Coverages.Profile clutter polygons 2026-05-08 13:23:13 -05:00
user_registration_live_test.exs test: ReportsLive toggle/delete/run_now + UserRegistration invitation paths + SiteLive geocode/apply 2026-05-08 12:53:06 -05:00
user_reset_password_live_test.exs test: UserResetPasswordLive HIBP check_password_breach with value branch 2026-05-09 10:07:45 -05:00
user_settings_live_test.exs test: UserSettingsLive delete_api_token + revoke_session/mobile_device events 2026-05-09 10:27:53 -05:00
weathermap_live_events_test.exs test(api_docs): assert page renders rather than checking for sample_token 2026-05-07 15:57:36 -05:00
weathermap_live_test.exs test: add LiveView tests following testing-liveview patterns 2026-05-07 12:55:39 -05:00