Commit graph

2 commits

Author SHA1 Message Date
b5512f2579 fix: resolve credo warnings — refactor decoder_macros complexity and remove unused assign indirection
Some checks failed
Build base image / Build and push base image (push) Failing after 2s
Production Deployment / Run ExUnit Tests (push) Failing after 58s
Production Deployment / Build and Push Docker Image (push) Has been skipped
- Refactored build_field_handler_ast to use pattern-matching function heads
  instead of a large cond block, reducing cyclomatic complexity from 30 to ≤9
- Extracted classify_type_spec and per-type AST builder helpers into separate
  private functions for maintainability
- Removed :previous_interface_stats initialization from show.ex (only
  polling.ex reads it); prev_stats now passed explicitly as a parameter
  to polling functions instead of reaching through socket.assigns
- Updated Polling.poll_sensors, poll_traffic, and poll_traffic_with_state
  to accept prev_stats as an explicit argument
2026-07-25 09:46:19 -05:00
3bf21c746f refactor: upgrade to Elixir 1.20, extract GraphLive.Polling, async subscriber impact
- Bump elixir requirement from ~> 1.19 to ~> 1.20 for gradual typing
- Extract SNMP polling functions from graph_live/show.ex (1492→1118 lines)
  into new GraphLive.Polling module (363 lines) — 374 lines net reduction
- Defer subscriber impact API call via start_async/handle_async in
  device_live/show.ex, avoiding synchronous Gaiia API call in handle_params
- Add terminate/2 to graph_live/show.ex for live_poll timer cleanup
- Fix .tool-versions to match installed Erlang 27.3.4.2
- Relax AGENTS.md dialyzer policy: allow ignore file for deps/vendored code
2026-07-22 11:01:00 -05:00