Skip to content

feat: add conflicts --auto-resolve with deterministic-first + llm fallback - #250

Merged
hurttlocker merged 1 commit into
mainfrom
xmate/conflict-resolve
Feb 27, 2026
Merged

hurttlocker merged 1 commit into
mainfrom
xmate/conflict-resolve

Conversation

@hurttlocker

Copy link
Copy Markdown
Owner

Implements #249.

What shipped

  • New conflicts UX:
    • cortex conflicts --auto-resolve [--dry-run] [--threshold 0.85]
  • Deterministic-first path:
    • If normalized subject+predicate match and one fact is strictly newer + higher confidence (and above threshold), resolve without LLM.
  • LLM fallback path:
    • Only ambiguous conflicts are sent to LLM resolution.
  • JSON output includes per-item fields:
    • winner, loser, method (deterministic|llm), reason (+ applied)
  • Cleanup integration:
    • cortex cleanup --resolve-conflicts (works with --dry-run and can be combined with --dedup-facts)

Notes

  • Reuses existing conflict detection and resolver internals; no store conflict-engine rewrite.
  • Dry-run mode plans resolutions and performs no writes.

Tests

  • Added cmd/cortex/conflicts_auto_test.go:
    • deterministic-vs-llm split
    • dry-run no-write behavior
    • JSON shape validation for auto-resolve path
  • Full suite green.

Validation

  • go test ./... ✅

@hurttlocker
hurttlocker merged commit 56048f5 into main Feb 27, 2026
4 checks passed
@hurttlocker
hurttlocker deleted the xmate/conflict-resolve branch March 1, 2026 17:09
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.

2 participants