Skip to content

feat: add versioned Spring Boot FSM example - #5

Merged
NGirchev merged 9 commits into
masterfrom
feature/spring-boot-example
Sep 18, 2026
Merged

NGirchev merged 9 commits into
masterfrom
feature/spring-boot-example

Conversation

@NGirchev

@NGirchev NGirchev commented Aug 24, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add an isolated Spring Boot/PostgreSQL example with editable drafts, validated publishing, immutable published versions and orders pinned to their flow version.
  • Reuse the core FsmDto JSON and toExTransitionTable() converter; two small factories resolve ordinary Action/Guard Spring beans by name. No separate compiler, transition schema or dynamic behavior interfaces.
  • Bound compiled-table caching and require a positive runtime limit whenever synchronous auto transitions are enabled, instead of example-specific cycle analysis.
  • Read existing stored JSON through a read-only compatibility adapter; no migration rewrites existing flow versions.
  • Fix independent review findings: reject state IDs exceeding the database's 120-character limit and amounts that cannot be stored exactly as NUMERIC(19,2).
  • Preserve valid trailing-zero amounts and report invalid amounts as HTTP 400 before database access.
  • Update vulnerable dependencies, including Vitest 4.1.11.

Verification

  • Independent subagent review against master.
  • Regression tests reproduced the state-length, amount and HTTP handling failures before the fixes; focused tests passed after them.
  • Core quality/tests/coverage and all non-Docker example tests passed.
  • Editor: npm test -- --run (59 tests), npm run build, npm audit --audit-level=moderate (0 vulnerabilities).
  • Simplification regression tests cover core JSON round trips, real Spring bean injection, post-actions, unknown behavior IDs, database bounds, runtime limits and legacy JSON reading. Local core checks and all non-Docker example tests passed.
  • Docker is not running locally; GitHub CI passed on the simplified implementation, including PostgreSQL integration, build, Detekt and coverage gates: https://github.com/NGirchev/fsm/actions/runs/35385046601.

Branch relationship

Related: #6 (WIP modularization/transactional example), a separate branch from the same master commit, not an ancestor or replacement. Core layout/runtime and dependency changes overlap; reconcile the second PR after the first is merged.

@NGirchev NGirchev self-assigned this Aug 24, 2026
@NGirchev NGirchev changed the title Feature/spring boot example feat: add versioned Spring Boot FSM example Sep 18, 2026
@NGirchev
NGirchev merged commit 9a1c793 into master Sep 18, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant