Skip to content

cli: standard command surface + Mermaid export; full suite passing#10

Merged
fruwe merged 1 commit into
mainfrom
cli-export
Jun 29, 2026
Merged

cli: standard command surface + Mermaid export; full suite passing#10
fruwe merged 1 commit into
mainfrom
cli-export

Conversation

@fruwe

@fruwe fruwe commented Jun 29, 2026

Copy link
Copy Markdown
Member

Build-order steps 15–16 (issue #3): the standard CLI and Mermaid export. This passes conformance/cli/01 and completes the definition of done — all 22 engine cases + conformance/cli/01.

What

  • Mermaid export (§12) behind a pluggable exporter interface: static structure (composites as state S { … }, orthogonal regions separated by --, [*] --> initial, final --> [*], S --> T : event [guard], after(d)), plus current-state highlighting via classDef active / class … active when given a state_config.
  • Standard CLI (§13)validate / export / new / send / advance / env / state / list / snapshot / restore over a file-backed store (--store, default $HAREL_STORE or ./.harel), with the normative --json shapes and exit codes (0/2/3/4/5/1) and the virtual clock. State-changing commands run all instances to quiescence and persist atomically.
  • A CLI harness runs each conformance/cli/* case against a fresh temp store (exit + structural-JSON assertions).

Definition of done — all met

  • Engine passes the full conformance suite (0122).
  • Schema validation enforced on load.
  • CI green on ubuntu-24.04 and macos-latest.
  • Snapshot round-trip + ≥1 migration case passing.
  • export produces valid Mermaid (static + current-state highlight).
  • CLI matches the §13 surface and passes conformance/cli/.

Verification

  • ruff check . ✓ · mypy src/harel ✓ · pytest -q129 passed (22 engine + 1 CLI + unit tests; 0 skips).

One follow-up for the repo owner (branch protection)

Per the issue's "Tooling / CI" section, when CI is green add a required_status_checks rule to protect_main with the two contexts test (ubuntu-24.04) and test (macos-latest). I've left branch-protection untouched (it's a governance change best made by the owner).

Build-order steps 15-16 (issue #3). The CLI conformance case (cli/01) passes,
completing the definition of done: all 22 engine cases + conformance/cli/01.

- Mermaid export (SPEC 12) behind a pluggable exporter interface: static
  structure (composites as `state S { ... }`, orthogonal regions separated by
  `--`, `[*] --> initial`, `final --> [*]`, `S --> T : event [guard]`,
  `after(d)`), plus current-state highlighting via `classDef active` when given
  a state_config.
- Standard CLI (SPEC 13): `validate` / `export` / `new` / `send` / `advance` /
  `env` / `state` / `list` / `snapshot` / `restore` over a file-backed store
  (`--store`, default $HAREL_STORE or ./.harel), with the normative `--json`
  shapes and exit codes (0/2/3/4/5/1) and the virtual clock. State-changing
  commands run all instances to quiescence and persist atomically.
- A CLI harness runs each `conformance/cli/*` case against a fresh temp store
  (exit + structural-JSON assertions).
@fruwe fruwe merged commit 568f7e1 into main Jun 29, 2026
2 checks passed
@fruwe fruwe deleted the cli-export branch June 29, 2026 19:44
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