Releases: diffo-dev/diffo
Releases · diffo-dev/diffo
v0.4.1
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/:inactiveonly). Resources may now assign from:installingor:operating(was:operatingonly).Assigner.assignable_state?/1exposes 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-writtenafter_actionbody threadingCharacteristic.update_all/Pool.update_pools/Relationship.relate_instance/Assigner.assigntogether 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/:updateactions (#171) —BaseCharacteristic-derived resources now get default:createand:updateactions synthesised from their public attributes.:createaccepts[:name | <public_attrs>]with:instance_id/:feature_idarguments andmanage_relationshipchanges;:updateaccepts<public_attrs>. Consumers may still declare their own actions to override the defaults. - Typed characteristics and pools in Instance JSON (#169) —
BaseInstancenow loads two new calculations (:typed_characteristics,:pool_characteristics) by default and the jason customize merges their values into theserviceCharacteristic/resourceCharacteristicarray. TypedBaseCharacteristicrecords andAssignableCharacteristicpool records that were already present in the graph are now visible at the TMF JSON surface.
Notable Changes
Diffo.Provider.Calculations.TypedCharacteristicsandDiffo.Provider.Calculations.PoolCharacteristics— new calc modules backing the JSON surfacing for #169.- Regression test added for #62 (characteristic update validation) — typed
BaseCharacteristicupdates now reject unknown fields and invalid types through Ash's standard changeset machinery.
Full Changelog: v0.4.0...v0.4.1
v0.4.0
v0.4.0 (2026-05-20)
Breaking Changes
Diffo.Provider.AssignedToRelationshipreplaced byDiffo.Provider.AssignmentRelationship— stores pool assignments with top-levelpool,thing,value, andaliasscalar attributes, enabling graph-level filtering in AshNeo4j queries. Any existing graph data onAssignedToRelationshipnodes must be migrated.create_assigned_to_relationshipcode interface removed — usecreate_assignment_relationshipinstead.instance.assignmentsnow returnsAssignmentRelationshiprecords (struct name change only).
Features
DefinedSimpleRelationship— new resource for relationships carrying an optional single embeddedNameValuePrimitivecharacteristic, frozen at creation. Used by the Assigner and available as a general-purpose committed-relationship primitive. Accessible viainstance.assignments.AssignmentRelationshipaliases — thealiasattribute onAssignmentRelationship(identity[:target_id, :alias]) gives a consuming instance a stable name for an assignment slot. Mirrors the[:source_id, :alias]identity onDefinedSimpleRelationship. Alias semantics are the foundation of the first-order expectation system (#74).relationships doDSL — source and target validation pipeline for Instance resources.ValidateRelationshipPermittedis injected automatically into relate actions. Supports:all,:none, and explicit role-name lists.- Resource lifecycle states —
resource_stateattribute on Instance resources with standard TMF states (:installed,:operating,:retired, etc.). The Assigner enforces:operatingbefore allowing assignment. inherited_place/inherited_partyDSL — declare insideplaces do/parties doon 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. NoPlaceRef/PartyRefedge 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 anAssignmentRelationshiprecord (:value,:pool,:thing,:alias). Filtered by optionalalias:. Returns a list.FieldViaAssignedRelationship(Diffo.Provider.Calculations.FieldViaAssignedRelationship) — traversesAssignmentRelationshipin reverse (target → source) and reads a named field from each source instance. Supports multi-hopvia:traversal. Returns a list.FieldViaRelationship(Diffo.Provider.Calculations.FieldViaRelationship) — traversesDefinedSimpleRelationshipforward (source → target) filtered by optionalalias:and/ortype:, and reads a named field from each target instance. Returns a list.
Notable Changes
- Assigner rearchitected —
AssignmentRelationshipcarriespool,thing,value,aliasas top-level attributes for AshNeo4j-level filtering;assigned_valuesandfree_valuesuse query-level filtering rather than in-memory computation where possible. TransformBehaviourmoved from persister pipeline to transformer pipeline for correct Spark ordering relative to Ash's own transformers.- Characteristic type verifier improved — rejects
characteristicDSL declarations whose type module is not derived fromBaseCharacteristic.
Documentation
usage-rules.md— new sections covering alias semantics,inherited_place/inherited_partyDSL, 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
- defined_simple_relationship by @matt-beanland in #142
- refactored assigner using defined_simple_relationship by @matt-beanland in #143
- relationships DSL by @matt-beanland in #146
- relationships target side validation by @matt-beanlanda in #148
- clean code by @matt-beanland in #150
- improved assigner using aggregates by @matt-beanland in #151
- refactor transformers and persisters by @matt-beanland in #152
- resource lifecycle state by @matt-beanland in #154
- inherited party and place via instance DSL by @matt-beanland in #155
- agent guidance by @matt-beanland in #161
- FieldViaAssignedRelationship calculation by @matt-beanland in #162
- FieldViaRelationship calculation by @matt-beanland in #165
- FieldFromAssignment calculation by @matt-beanland in #164
- docs pass — inherited DSL, aliases, and field calculations by @matt-beanland in #166
v0.3.0 (2026-05-17)
Breaking Changes
Diffo.Provider.Relationshipno longer stores assignment records. Assignment relationships are now onDiffo.Provider.AssignedToRelationship. Any existing graph data withtype: :assignedToonRelationshipnodes will need to be migrated.instance.forward_relationshipsno longer contains assignment records — useinstance.assignmentsinstead.Diffo.Provider.create_assignment_relationshipremoved — useDiffo.Provider.create_assigned_to_relationship.
Notable Changes
Diffo.Provider.BaseRelationship— new Ash Resource Fragment providing common attributes and behaviour for all relationship typesDiffo.Provider.AssignedToRelationship— new dedicated resource for pool assignment relationships, split out fromDiffo.Provider.RelationshipDiffo.Provider.Relationship— now TMF-only;pool,thing,assignedattributes and:create_assignmentaction removedinstance.assignments— newhas_manyonBaseInstancefor pool assignment relationships; included in JSON encoding and default loadsDiffo.Provider.BaseCharacteristic— new Ash Resource Fragment for typed characteristic resources;ShelfCharacteristic,CardCharacteristicetc. now extend this rather than using plainAsh.TypedStructpools doDSL — new section on Instance resources replacing the oldcharacteristic :name, AssignableValuepattern; generatespools/0andpool/1introspection functions- Module naming convention — Instance resources must be suffixed
…Instance, Characteristic resources…Characteristicto avoid Neo4j label collisions (documented inusage-rules.mdandAGENTS.md) Diffo.Provider.Extension— unified Spark DSL extension consolidating the prior per-kind extensions
What's Changed
- provider extension consolidation by @matt-beanland in #130
- base characteristic by @matt-beanland in #133
- assigner refactor — BaseRelationship, AssignedToRelationship, pools DSL, resource naming by @matt-beanland in #135
v0.2.2 (2026-05-08)
Notable Changes
- Updated to ash_neo4j 0.5.0 with async test support
- Igniter installer —
mix igniter.install diffonow sets up Neo4j config, custom expressions, and Spark DSL formatter - Spark DSL formatter configured for all provider extensions;
mix formatenforced across the codebase usage-rules.mdadded 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
- base party and related DSL and livebook by @matt-beanland in #82
- Instance DSL parties — multiplicity, validation, and enforcement by @matt-beanland in #89
- 86 transformers persisters verifiers by @matt-beanland in #92
- 91 place dsl by @matt-beanland in #93
- 79 provider instance specification doesnt set description by @matt-beanland in #95
- 94 provider instance specification dsl additional fields by @matt-beanland in #97
- document instance versioning lifecycle by @matt-beanland in #98
- accept raw dynamic by @matt-beanland in #100
- removed duplicate tests by @matt-beanland in #108
- 105 latest ash neo4j by @matt-beanland in #109
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...
v0.3.0
What's Changed
- 126 hexdocs how-to guides and tutorial by @matt-beanland in #127
- 103 provider extension consolidation by @matt-beanland in #130
- 128 basecharacteristic typed ash resource fragment for characteristics by @matt-beanland in #133
- 120 refactor assigner by @matt-beanland in #135
Full Changelog: v0.2.2...v0.3.0
v0.2.2
What's Changed
- Main by @matt-beanland in #111
- async tests by @matt-beanland in #114
- igniter by @matt-beanland in #116
- spark formatter by @matt-beanland in #117
- 113 usage rules by @matt-beanland in #118
- dev by @matt-beanland in #119
Full Changelog: v0.2.1...v0.2.2
v0.2.1
What's Changed
- base party and related DSL and livebook by @matt-beanland in #82
- Instance DSL parties — multiplicity, validation, and enforcement by @matt-beanland in #89
- 86 transformers persisters verifiers by @matt-beanland in #92
- 91 place dsl by @matt-beanland in #93
- 79 provider instance specification doesnt set description by @matt-beanland in #95
- 94 provider instance specification dsl additional fields by @matt-beanland in #97
- document instance versioning lifecycle by @matt-beanland in #98
- accept raw dynamic by @matt-beanland in #100
- removed duplicate tests by @matt-beanland in #108
- 105 latest ash neo4j by @matt-beanland in #109
Full Changelog: v0.2.0...v0.2.1
v0.2.0
What's Changed
- 63 update to refactored ashneo4j by @matt-beanland in #64
- value dynamic 1 added, 2 hidden by @matt-beanland in #66
- dynamic nil safety and deps update by @matt-beanland in #71
- type and unwrap docs improvement, unwrap list, type livebook by @matt-beanland in #73
- 69 homogenous array of value by @matt-beanland in #75
- is_valid by @matt-beanland in #76
Full Changelog: v0.1.6...v0.2.0
v0.1.6
What's Changed
- fix incorrect domain label by @matt-beanland in #58
- improved error handling by @matt-beanland in #60
Full Changelog: v0.1.5...v0.1.6
v0.1.5
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
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
What's Changed
- remove access domain, adapting to test assigner by @matt-beanland in #39
- 29 livebook for provider instance extension by @matt-beanland in #40
- added deep wiki badge by @matt-beanland in #42
- 43 instance events by @matt-beanland in #44
- 46 place and party relationships by @matt-beanland in #47
- 0.1.3 release by @matt-beanland in #49
Full Changelog: v0.1.2...v0.1.3