Skip to content

v0.4.0

Choose a tag to compare

@supostat supostat released this 26 Aug 07:11
· 23 commits to main since this release

The road off statesman: rails generate statecraft:from_statesman Order
converts a statesman setup in place — the table you already have becomes
the statecraft log, history included.

  • The generator reflects the live statesman machine and writes the
    conversion migration: the model gains its state column backfilled from
    the last transition by sort_key, the transitions table gains
    from_state (a LAG window along the chain) and a cascade FK, a text
    metadata column becomes native json(b) in one move, and statesman's
    columns and unique indexes retire last.
  • A machine skeleton arrives with the graph copied and the human parts
    honestly left open: statesman has no events — name them yourself — and
    guard bodies cannot be extracted, so each becomes a TODO carrying its
    original file:line.
  • Refusals are loud: a missing machine class, a class that does not quack
    like statesman, a machine with no initial state.
  • The README's new "Migrating from statesman" recipe carries the reasons,
    the two pre-flight checks on live data (id order vs sort_key order;
    text metadata holding valid JSON), and the hand-finished cleanup list.

Full Changelog: v0.3.0...v0.4.0