fd976b0cd5
fix: resolve 391 Credo issues across codebase
...
- Add jump_credo_checks ~> 0.4 with all 20 checks enabled
- Fix all standard Credo issues: 139 @spec (113 done, 26 remain),
4 refactoring, 3 alias usage, 9 System.cmd env, 5 unsafe_to_atom,
2 max line length, 9 assert_receive timeout
- Fix 170+ jump_credo_checks warnings:
- 117 TopLevelAliasImportRequire: move nested alias/import to module top
- 32 UseObanProWorker: switch to Oban.Pro.Worker
- 4 DoctestIExExamples: add doctests / create test file
- ~20 WeakAssertion: strengthen type-check assertions
- Various ConditionalAssertion, AssertReceiveTimeout fixes
- Exclude vendor/ from Credo analysis
- Remaining: 175 warnings (mostly opinionated WeakAssertion,
AvoidSocketAssignsInTest), 26 @spec annotations
2026-06-12 13:51:32 -05:00
316fb2fbc7
Fix low-severity bugs and re-enable Credo checks
...
- Bug #12 : Lower rate limit to 15/min
- Bug #13 : Wrap model loading in Task.start
- Bug #14 : Fix classify_time_period guard gap at -3.0
- Bug #15 : Not applicable (Elixir has no ?? operator)
- Bug #16 : Remove fallback Repo.get for station preload
- Bug #17 : Extract cache_key() in ContactMapController
- Bug #18 : Add has_many :contacts and :beacons to User schema
- A&D #4 : Move serve_markdown_if_requested after secure headers
- Config #1 : Move signing_salt to runtime.exs env var
- Config #2 : Use --check-unused instead of --unused
- Config #3 : Re-enable UnsafeToAtom Credo check
- Config #5 : Re-enable LeakyEnvironment Credo check
- Add @spec annotations to fix re-enabled Specs violations
- Replace String.to_atom with to_existing_atom where guarded
2026-05-29 17:29:22 -05:00
58f4a7714b
test: add Mox deps + SnmpClient poll/3 tests, RoadProximity, Buildings.Loader
...
- Add {:mox, "~> 1.0", only: :test} to deps
- Commercial.SnmpClient: injectable snmp_runner for poll/3 tests (62→92%)
- Rover.RoadProximity: pure road_distances/3 tests with injectable fetch (37→82%)
- Buildings.Loader: ensure_loaded/1 with real tile file + quadkey tests (69→100%)
- Buildings.Index: records_near, mark_loaded, loaded? tests (72→96%)
Coverage: 77.96% → 78.93% (+0.97%)
2026-05-07 13:36:22 -05:00
dd12a57c2d
Fix SNMP polling: remove invalid timeout option and normalize OID format
...
System.cmd :timeout option doesn't exist in Elixir 1.19, causing every
poll to crash silently. Also translate SNMPv2-SMI::enterprises prefix
to numeric OID so the lookup maps match correctly.
2026-03-30 13:44:49 -05:00
d3f9f0443e
Fix SNMP version to v1 to match radio firmware
2026-03-30 13:32:11 -05:00
10e8feb486
Add commercial link monitoring via SNMP polling
...
Poll UBNT AirFiber radios (AF11X + AF60-LR) every 5 minutes via
net-snmp CLI, storing signal metrics in commercial_samples. Fetches
ASOS weather alongside each cycle for propagation correlation.
Includes 7 seeded link definitions, Oban cron worker, and net-snmp
in the Docker image.
2026-03-30 13:02:59 -05:00