cgcardona / muse public
feat code main #69 / 100

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

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.

Co-authored-by: Gabriel Cardona <gabriel@tellurstori.com>

G Gabriel Cardona <cgcardona@gmail.com> · 1d ago Mar 18, 2026 · a748f814 · parent f214943b
oldest
newest 32%

Comments

0

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