cgcardona / muse public
feat code main #72 / 100

feat(code): Phase 7 — semantic versioning metadata on StructuredDelta + CommitRecord

SemVerBump type alias (Literal["major", "minor", "patch", "none"])

StructuredDelta gains two optional v2 fields: sem_ver_bump: inferred impact of this delta on the public API breaking_changes: sorted list of symbol addresses whose public contract was removed or incompatibly changed

infer_sem_ver_bump(delta) → (SemVerBump, list[str]) Pure function in domain.py, domain-agnostic: delete public symbol → major + address added to breaking_changes rename public symbol → major + address added to breaking_changes signature_only change → major + breaking insert public symbol → minor impl_only (body changes) → patch metadata/formatting only → none PatchOp child_ops → recurse into children (structural)

CommitRecord gains: sem_ver_bump: SemVerBump = "none" (default for legacy + non-code) breaking_changes: list[str] = []

commit command: After computing structured_delta, calls infer_sem_ver_bump() and stores both on the delta and the CommitRecord. First commit (no parent) stays at "none" / [].

muse log: Long-form view now shows SemVer: MAJOR / MINOR / PATCH when non-none, plus first 3 breaking-change addresses ("+N more" when list is longer).

mypy: 0 errors · typing_audit: 0 violations · pytest: 797 passed.

G Gabriel Cardona <gabriel@tellurstori.com> · 1d ago Mar 18, 2026 · b69599f3 · parent 49d82b61
oldest
newest 29%

Snapshot Diff

135 files in tree
~5 -2
muse/cli/commands/breakage.py .py
muse/cli/commands/invariants.py .py

Comments

0

No comments yet. Be the first to start the discussion.