feat(code): Phase 6 — ConflictRecord taxonomy, muse breakage, muse invariants
MergeResult v2 — ConflictRecord taxonomy New ConflictRecord dataclass in domain.py carries structured conflict metadata alongside the existing conflicts: list[str]: - conflict_type: symbol_edit_overlap | rename_edit | move_edit | delete_use | dependency_conflict | file_level (legacy) - ours_summary / theirs_summary: short change descriptions - addresses: list[str] of involved symbol addresses Added as MergeResult.conflict_records: list[ConflictRecord] (default []). Fully backward-compatible — existing callers that don't populate it continue to work; plugins that implement StructuredMergePlugin can enrich it.
muse breakage Detects symbol-level structural breakage in the working tree vs HEAD: - stale_import: imports a symbol no longer in the HEAD snapshot - missing_interface_method: class body missing methods found in HEAD Purely structural — no code execution, no type checker, no network. Operates on the committed symbol graph + current working-tree parse. Supports --language filter and --json output.
muse invariants Enforces architectural rules from .muse/invariants.toml: - no_cycles: import graph must be acyclic (DFS cycle detection) - forbidden_dependency: source_pattern must not import forbidden_pattern - layer_boundary: lower layers must not import from upper layers - required_test: public functions must have corresponding test functions Minimal built-in TOML parser — no extra dependencies. All rules run against the committed snapshot; no working-tree parsing. Creates invariants.toml if absent — guided onboarding message shown. Supports --commit REF to check historical snapshots and --json output.
mypy: 0 errors · typing_audit: 0 violations · pytest: 797 passed.
Comments
0No comments yet. Be the first to start the discussion.