Skip to content

Releases: diffo-dev/diffo

v0.4.1

22 May 13:44
901ba29

Choose a tag to compare

Bug Fixes

  • Assigner lifecycle (#168) — broadened the lifecycle states permitted to make assignments. Services may now assign from :feasibilityChecked, :reserved, :inactive, :active, or :suspended (was :active / :inactive only). Resources may now assign from :installing or :operating (was :operating only). Assigner.assignable_state?/1 exposes the policy directly.

Features

  • Diffo.Provider.Changes.Define / Relate / Assign (#170) — change modules that wrap the standard after-action patterns every Instance consumer writes. Replace the hand-written after_action body threading Characteristic.update_all / Pool.update_pools / Relationship.relate_instance / Assigner.assign together with a one-liner:

    update :define do
      argument :characteristic_value_updates, {:array, :term}
      change Diffo.Provider.Changes.Define
    end
    
    update :relate do
      argument :relationships, {:array, :struct}
      change Diffo.Provider.Changes.Relate
    end
    
    update :assign_port do
      argument :assignment, :struct, constraints: [instance_of: Assignment]
      change {Diffo.Provider.Changes.Assign, pool: :ports}
    end

Reload happens via the resource's primary :read action, so no consumer-specific reader is needed.

  • BaseCharacteristic auto-generated :create / :update actions (#171) — BaseCharacteristic-derived resources now get default :create and :update actions synthesised from their public attributes. :create accepts [:name | <public_attrs>] with :instance_id / :feature_id arguments and manage_relationship changes; :update accepts <public_attrs>. Consumers may still declare their own actions to override the defaults.
  • Typed characteristics and pools in Instance JSON (#169) — BaseInstance now loads two new calculations (:typed_characteristics, :pool_characteristics) by default and the jason customize merges their values into the serviceCharacteristic / resourceCharacteristic array. Typed BaseCharacteristic records and AssignableCharacteristic pool records that were already present in the graph are now visible at the TMF JSON surface.

Notable Changes

  • Diffo.Provider.Calculations.TypedCharacteristics and Diffo.Provider.Calculations.PoolCharacteristics — new calc modules backing the JSON surfacing for #169.
  • Regression test added for #62 (characteristic update validation) — typed BaseCharacteristic updates now reject unknown fields and invalid types through Ash's standard changeset machinery.

Full Changelog: v0.4.0...v0.4.1

v0.4.0

20 May 13:49
cdbbea4

Choose a tag to compare

v0.4.0 (2026-05-20)

Breaking Changes

  • Diffo.Provider.AssignedToRelationship replaced by Diffo.Provider.AssignmentRelationship — stores pool assignments with top-level pool, thing, value, and alias scalar attributes, enabling graph-level filtering in AshNeo4j queries. Any existing graph data on AssignedToRelationship nodes must be migrated.
  • create_assigned_to_relationship code interface removed — use create_assignment_relationship instead.
  • instance.assignments now returns AssignmentRelationship records (struct name change only).

Features

  • DefinedSimpleRelationship — new resource for relationships carrying an optional single embedded NameValuePrimitive characteristic, frozen at creation. Used by the Assigner and available as a general-purpose committed-relationship primitive. Accessible via instance.assignments.
  • AssignmentRelationship aliases — the alias attribute on AssignmentRelationship (identity [:target_id, :alias]) gives a consuming instance a stable name for an assignment slot. Mirrors the [:source_id, :alias] identity on DefinedSimpleRelationship. Alias semantics are the foundation of the first-order expectation system (#74).
  • relationships do DSL — source and target validation pipeline for Instance resources. ValidateRelationshipPermitted is injected automatically into relate actions. Supports :all, :none, and explicit role-name lists.
  • Resource lifecycle statesresource_state attribute on Instance resources with standard TMF states (:installed, :operating, :retired, etc.). The Assigner enforces :operating before allowing assignment.
  • inherited_place / inherited_party DSL — declare inside places do / parties do on an Instance resource to generate an Ash calculation that traverses the assignment graph by alias and inherits a place or party from the source instance. No PlaceRef/PartyRef edge is created — the calculation is the reference. Supports single-hop (default: role name as alias) and multi-hop (via: list).
  • FieldFromAssignment (Diffo.Provider.Calculations.FieldFromAssignment) — reads a field directly from an AssignmentRelationship record (:value, :pool, :thing, :alias). Filtered by optional alias:. Returns a list.
  • FieldViaAssignedRelationship (Diffo.Provider.Calculations.FieldViaAssignedRelationship) — traverses AssignmentRelationship in reverse (target → source) and reads a named field from each source instance. Supports multi-hop via: traversal. Returns a list.
  • FieldViaRelationship (Diffo.Provider.Calculations.FieldViaRelationship) — traverses DefinedSimpleRelationship forward (source → target) filtered by optional alias: and/or type:, and reads a named field from each target instance. Returns a list.

Notable Changes

  • Assigner rearchitected — AssignmentRelationship carries pool, thing, value, alias as top-level attributes for AshNeo4j-level filtering; assigned_values and free_values use query-level filtering rather than in-memory computation where possible.
  • TransformBehaviour moved from persister pipeline to transformer pipeline for correct Spark ordering relative to Ash's own transformers.
  • Characteristic type verifier improved — rejects characteristic DSL declarations whose type module is not derived from BaseCharacteristic.

Documentation

  • usage-rules.md — new sections covering alias semantics, inherited_place/inherited_party DSL, and all three field calculation modules including a decision table.
  • AGENTS.md — updated project structure, DSL inline examples for inherited refs, and new common mistakes section entries.
  • Provider Extension livebook — new section "Aliases, Inherited DSL, and Field Calculations" with Compute-domain examples.

What's Changed

v0.3.0 (2026-05-17)

Breaking Changes

  • Diffo.Provider.Relationship no longer stores assignment records. Assignment relationships are now on Diffo.Provider.AssignedToRelationship. Any existing graph data with type: :assignedTo on Relationship nodes will need to be migrated.
  • instance.forward_relationships no longer contains assignment records — use instance.assignments instead.
  • Diffo.Provider.create_assignment_relationship removed — use Diffo.Provider.create_assigned_to_relationship.

Notable Changes

  • Diffo.Provider.BaseRelationship — new Ash Resource Fragment providing common attributes and behaviour for all relationship types
  • Diffo.Provider.AssignedToRelationship — new dedicated resource for pool assignment relationships, split out from Diffo.Provider.Relationship
  • Diffo.Provider.Relationship — now TMF-only; pool, thing, assigned attributes and :create_assignment action removed
  • instance.assignments — new has_many on BaseInstance for pool assignment relationships; included in JSON encoding and default loads
  • Diffo.Provider.BaseCharacteristic — new Ash Resource Fragment for typed characteristic resources; ShelfCharacteristic, CardCharacteristic etc. now extend this rather than using plain Ash.TypedStruct
  • pools do DSL — new section on Instance resources replacing the old characteristic :name, AssignableValue pattern; generates pools/0 and pool/1 introspection functions
  • Module naming convention — Instance resources must be suffixed …Instance, Characteristic resources …Characteristic to avoid Neo4j label collisions (documented in usage-rules.md and AGENTS.md)
  • Diffo.Provider.Extension — unified Spark DSL extension consolidating the prior per-kind extensions

What's Changed

v0.2.2 (2026-05-08)

Notable Changes

  • Updated to ash_neo4j 0.5.0 with async test support
  • Igniter installer — mix igniter.install diffo now sets up Neo4j config, custom expressions, and Spark DSL formatter
  • Spark DSL formatter configured for all provider extensions; mix format enforced across the codebase
  • usage-rules.md added for AI coding assistant guidance when working with Diffo

What's Changed

  • async tests by @matt-beanland in #114
  • igniter by @matt-beanlanda in #116
  • spark formatter by @matt-beanlanda in #117
  • usage_rules by @matt-beanlanda in #118

v0.2.1 (2026-05-06)

Notable Changes

  • Updated to ash_neo4j 0.4.1 and bolty 0.0.12, now supporting transactions and test sandbox
  • Improvements to provider DSL and documentation

What's Changed

v0.2.0 (2026-04-24)

Breaking Changes

  • Updated to ash_neo4j 0.3.1 and bolty 0.0.10 — no database compatibility with prior versions due to significant changes in the data layer and Bolt...
Read more

v0.3.0

17 May 10:06
d432d41

Choose a tag to compare

What's Changed

Full Changelog: v0.2.2...v0.3.0

v0.2.2

08 May 12:15
e3ad078

Choose a tag to compare

What's Changed

Full Changelog: v0.2.1...v0.2.2

v0.2.1

06 May 13:55
8330bb5

Choose a tag to compare

What's Changed

Full Changelog: v0.2.0...v0.2.1

v0.2.0

24 Apr 13:15
e4b19da

Choose a tag to compare

What's Changed

Full Changelog: v0.1.6...v0.2.0

v0.1.6

19 Mar 12:58
7e6d5ff

Choose a tag to compare

What's Changed

Full Changelog: v0.1.5...v0.1.6

v0.1.5

19 Mar 02:50
75cdbfd

Choose a tag to compare

What's Changed

  • 54 relationship enrichment inconsistent across neo4j versions by @matt-beanland in #55

Full Changelog: v0.1.4...v0.1.5

v0.1.4

12 Mar 13:36
b1cf782

Choose a tag to compare

What's Changed

  • assigner unassign operation by @matt-beanland in #51
  • update ash_neo4j, uses bolty rather than boltx

Full Changelog: v0.1.3...v0.1.4

v0.1.3

01 Dec 04:19
0cc91be

Choose a tag to compare

What's Changed

Full Changelog: v0.1.2...v0.1.3