Skip to content

Commit dc1f32f

Browse files
committed
feat: add fireflyframework-kernel to DAG and cqrs-eda bridge
- Introduce fireflyframework-kernel as Layer 0.5 foundational module - Add kernel dependency to 13 core framework modules for unified exception hierarchy (FireflyException, FireflySecurityException, FireflyInfrastructureException) - Add cqrs → eda edge for optional command-event publishing bridge
1 parent 69c4272 commit dc1f32f

1 file changed

Lines changed: 15 additions & 2 deletions

File tree

internal/dag/graph.go

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,7 @@ func FrameworkGraph() *Graph {
325325
const (
326326
parent = "fireflyframework-parent"
327327
bom = "fireflyframework-bom"
328+
kernel = "fireflyframework-kernel"
328329
utils = "fireflyframework-utils"
329330
validators = "fireflyframework-validators"
330331
plugins = "fireflyframework-plugins"
@@ -367,7 +368,10 @@ func FrameworkGraph() *Graph {
367368
// ── Layer 0: root ──────────────────────────────────────────────────
368369
g.AddNode(parent)
369370

370-
// ── Layer 1: bom + leaf modules (only depend on parent POM) ───────
371+
// ── Layer 0.5: kernel (foundational — only depends on parent) ────
372+
g.AddEdge(kernel, parent)
373+
374+
// ── Layer 1: bom + leaf modules (depend on parent POM + kernel) ──
371375
g.AddEdge(bom, parent)
372376
for _, mod := range []string{
373377
utils, cache, eda, ecm, idp, configServer,
@@ -376,6 +380,14 @@ func FrameworkGraph() *Graph {
376380
g.AddEdge(mod, parent)
377381
}
378382

383+
// All framework modules depend on kernel for unified exception hierarchy
384+
for _, mod := range []string{
385+
utils, cache, eda, cqrs, eventsourcing, workflow, client,
386+
web, transactionalEng, application, plugins, ruleEngine, data,
387+
} {
388+
g.AddEdge(mod, kernel)
389+
}
390+
379391
// ── Layer 1.5: observability consumers (depend on observability) ────
380392
// These modules gain an edge to observability for centralized metrics/tracing/health
381393
g.AddEdge(eda, observability)
@@ -388,9 +400,10 @@ func FrameworkGraph() *Graph {
388400
// r2dbc depends on utils
389401
g.AddEdge(r2dbc, utils)
390402

391-
// cqrs depends on validators, cache, observability
403+
// cqrs depends on validators, cache, eda (optional bridge), observability
392404
g.AddEdge(cqrs, validators)
393405
g.AddEdge(cqrs, cache)
406+
g.AddEdge(cqrs, eda)
394407
g.AddEdge(cqrs, observability)
395408

396409
// web depends on cache, observability

0 commit comments

Comments
 (0)