github pthm/melange v0.7.3
Melange v0.7.3

latest releases: cmd/melange/v0.7.4, v0.7.4, melange/v0.7.4...
one month ago

Adds melange init for interactive project scaffolding, fixes four list_objects/list_users bugs, and improves melange doctor with table index recommendations and orphaned tuple detection.

No breaking changes from v0.7.2. Upgrade and run melange migrate to pick up the list function fixes.

Highlights

New melange init command bootstraps a melange project with config, starter schema (four templates), and runtime dependency installation. Detects Go modules and Node.js packages automatically. Use -y to accept all defaults.

Bug Fixes

  • list_objects returned results through non-recursive parent chains (#34) — Relations without from parent incorrectly propagated access to child objects. Thanks to @jtbeach for the fix.
  • list_objects over-propagated when recursive and non-recursive relations share a permission — Non-recursive relations could still propagate through parent chains when combined with recursive ones in the same permission.
  • list_objects and list_users ignored exclusions on userset lookups — Exclusions with userset patterns (e.g., member but not blocked via group#member) were not filtering out excluded subjects.
  • list_users returned incomplete results for multi-path TTU relations — Only the first parent path was walked when a permission could be reached through multiple parent relations.
  • melange doctor multi-table view parsing (#35) — Views joining multiple tables were incorrectly parsed, producing invalid CREATE INDEX suggestions. Thanks to @sgsfak for reporting.

Improvements

  • melange doctor table index recommendations — Checks for recommended indexes when melange_tuples is a table, with severity scaling by row count.
  • melange doctor orphaned tuple detection — Comprehensive validation of all tuples against the schema, replacing the previous sampling-based check. Detects unknown object types, relations, subject types, and invalid subject type assignments.

Testing & Maintenance

  • Removed 1,000+ lines of dead code (#33)
  • Added Codecov integration (#32)
  • Added 22 new test cases covering real-world authorization patterns

Contributors

Don't miss a new melange release

NewReleases is sending notifications on new releases.