Skip to content

Add typespecs, property tests, and dialyzer CI#288

Open
dylantirandaz wants to merge 1 commit intoelixir-horde:masterfrom
dylantirandaz:add-specs-and-quorum-tests
Open

Add typespecs, property tests, and dialyzer CI#288
dylantirandaz wants to merge 1 commit intoelixir-horde:masterfrom
dylantirandaz:add-specs-and-quorum-tests

Conversation

@dylantirandaz
Copy link
Copy Markdown
Contributor

Summary

  • Added @impl and @spec annotations to all distribution strategy modules (UniformDistribution, UniformQuorumDistribution, UniformRandomDistribution) and TableUtils
  • Fixed DistributionStrategy callback spec: error reason was typed as String.t() but all implementations return atoms; has_quorum?/1 can return nil for quorum distribution when all nodes are shutting down
  • Added property-based tests for distribution strategies: determinism for UniformDistribution, majority-alive correctness for UniformQuorumDistribution, and has_quorum?/1 invariant for UniformRandomDistribution
  • Added a Dialyzer CI job with PLT caching
  • Renamed internal disown_child_process message to release_child_process (resolves TODO in DynamicSupervisorImpl)

Test plan

  • mix format --check-formatted passes
  • mix test passes (106 tests, 8 properties, 0 failures related to changes)
  • mix dialyzer passes with 0 errors

@sleipnir
Copy link
Copy Markdown
Collaborator

@dylantirandaz please you will fix the conflicts?

- Add @impl and @SPEC to UniformDistribution, UniformQuorumDistribution,
  UniformRandomDistribution, and TableUtils
- Fix DistributionStrategy callback spec: error reason is atom(), not
  String.t(); has_quorum? can return nil
- Add property-based tests: determinism for UniformDistribution,
  quorum majority correctness for UniformQuorumDistribution,
  has_quorum? invariant for UniformRandomDistribution
- Add Dialyzer job to CI with PLT caching
- Rename disown_child_process to release_child_process
@dylantirandaz dylantirandaz force-pushed the add-specs-and-quorum-tests branch from 32ad49a to 73c73b9 Compare March 17, 2026 03:54
@dylantirandaz
Copy link
Copy Markdown
Contributor Author

yes fixed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants