Skip to content

maint: sync bundled schema from the spec repo#39

Merged
fruwe merged 1 commit into
mainfrom
maint-sync-schema
Jul 1, 2026
Merged

maint: sync bundled schema from the spec repo#39
fruwe merged 1 commit into
mainfrom
maint-sync-schema

Conversation

@fruwe

@fruwe fruwe commented Jul 1, 2026

Copy link
Copy Markdown
Member

Closes #38.

The bundled src/harel/data/machine.schema.json was a manual copy of harel's schema (I hand-copied it during the choice work). Adds tooling so it's a one-command refresh; the drift test still guards correctness.

What

  • scripts/sync_schema.py — writes the bundled schema from harel's schema/machine.schema.json at the tag matching this package's version (falling back to main), or from HAREL_SPEC_DIR for a local checkout. Dependency-free (reads the version by regex, validates JSON before overwriting, no-ops when already current).
  • make sync-schema target.

Verify

  • make sync-schema → "already up to date" (fetches v0.0.2, matches bundle); HAREL_SPEC_DIR path works.
  • Proved the update path: corrupt the bundle → drift test fails → make sync-schema restores it byte-identical → drift passes.
  • ruff + mypy clean; 129 unit + 57 conformance green.

Add 'make sync-schema' + scripts/sync_schema.py to refresh the bundled
src/harel/data/machine.schema.json from fruwehq/harel at the matching version tag
(falling back to main, or HAREL_SPEC_DIR for a local checkout) — removing the
manual copy. The schema-drift test still guards that they match. The script is
dependency-free (reads the version by regex; validates JSON before overwriting).

Closes #38.
@fruwe fruwe merged commit 6412b14 into main Jul 1, 2026
2 checks passed
@fruwe fruwe deleted the maint-sync-schema branch July 1, 2026 12:29
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.

maint: sync bundled schema from the spec repo (no manual copy)

1 participant