Enforce Dialyzer in CI #1

merged colechristensen cole.christensen@gmail.com wants to merge fix/enforce-dialyzer-ci into main
No CI

Summary

  • Fix all 4 existing Dialyzer warnings (type mismatches in diff.ex, pack/reader.ex, protocol/receive_pack.ex)
  • Add mix dialyzer step to .anvil.yml CI pipeline
  • Any new Dialyzer warning now fails the build

Closes #20

Changes

  • diff.ex: diff_blobs spec was missing the {:ok, :binary, sizes} return variant
  • pack/reader.ex: Exposed read_object/4 with external resolver param, making the REF_DELTA code path reachable (previously dead code)
  • protocol/receive_pack.ex: Added missing pre_receive_hook and cmd_buffer fields to state() type; targeted @dialyzer {:no_opaque, init: 2} for known MapSet opaque type limitation
  • .anvil.yml: Added dialyzer CI step depending on compile

Test plan

  • mix dialyzer passes with 0 errors locally
  • mix compile --warnings-as-errors passes
  • mix format --check-formatted passes
  • mix test — 529 tests, 0 failures
Created Apr 09, 2026 at 04:23 UTC | Merged Apr 09, 2026 at 04:36 UTC by colechristensen cole.christensen@gmail.com