cli: standard command surface + Mermaid export; full suite passing#10
Merged
Conversation
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).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Build-order steps 15–16 (issue #3): the standard CLI and Mermaid export. This passes
conformance/cli/01and completes the definition of done — all 22 engine cases +conformance/cli/01.What
state S { … }, orthogonal regions separated by--,[*] --> initial,final --> [*],S --> T : event [guard],after(d)), plus current-state highlighting viaclassDef active/class … activewhen given astate_config.validate/export/new/send/advance/env/state/list/snapshot/restoreover a file-backed store (--store, default$HAREL_STOREor./.harel), with the normative--jsonshapes and exit codes (0/2/3/4/5/1) and the virtual clock. State-changing commands run all instances to quiescence and persist atomically.conformance/cli/*case against a fresh temp store (exit + structural-JSON assertions).Definition of done — all met
01–22).exportproduces valid Mermaid (static + current-state highlight).conformance/cli/.Verification
ruff check .✓ ·mypy src/harel✓ ·pytest -q→ 129 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_checksrule toprotect_mainwith the two contextstest (ubuntu-24.04)andtest (macos-latest). I've left branch-protection untouched (it's a governance change best made by the owner).