Skip to content

v1.0.0 — declarative DSL rewrite

Latest

Choose a tag to compare

@b-erdem b-erdem released this 09 May 17:06

Complete rewrite around a macro-based DSL that compiles to introspectable data, replacing the keyword-list meta(...) approach.

Highlights

  • New macros: authorize, load, authorize_owner, loaders/loader. Auth rules read like English: authorize "close_todos", when: arg(:state) == "CLOSED".
  • Conditions compiled to data form{:cmp, [:eq, {:arg, :state}, ...]} — fully introspectable, hashable, serialisable.
  • Public introspection API + mix absinthe_permission.audit Mix task with text or JSON output.
  • Telemetry on every decision and loader call.
  • Custom exceptions with helpful messages (MissingContextError, UnauthorizedError, CompileError).
  • Fail-loud on missing context (was fail-open in v0.1).
  • No String.to_atom on data — Sobelow-clean.
  • AGENTS.md cookbook for AI coding agents.

Compatibility

  • Bumped Absinthe to ~> 1.7, telemetry to ~> 1.0, Elixir to ~> 1.14.
  • Not API-compatible with v0.1.x. See CHANGELOG.md for the full migration table.

Quality bar

  • 60 tests, 0 failures (incl. 6 doctests)
  • mix compile --warnings-as-errors — clean
  • mix credo --strict — clean
  • mix sobelow — clean
  • mix format --check-formatted — clean