Skip to content

feat: propose safe rules from corrections - #44

Merged
tcballard merged 2 commits into
mainfrom
codex/issue-39-correction-proposals
Aug 2, 2026
Merged

feat: propose safe rules from corrections#44
tcballard merged 2 commits into
mainfrom
codex/issue-39-correction-proposals

Conversation

@tcballard

@tcballard tcballard commented Aug 2, 2026

Copy link
Copy Markdown
Owner

What changed

  • make one-off manual correction independent from ruleset changes
  • generate one local, structured correction-rule proposal after the file is safely filed
  • show the inference evidence and exact editable rule before any activation
  • reuse the Issue feat(rules): preview filing outcomes before activation #41 preview against the corrected file or up to eight selected files
  • detect duplicates, same-subject conflicts, broader/narrower overlaps, invalid routes, ordering problems, and catch-all conflicts
  • insert an approved specific rule immediately before the catch-all while preserving every unrelated rule
  • record accepted, edited, discarded, and pending proposal outcomes in the local Activity ledger
  • retry invalid Foundation Models proposals within a bounded loop while keeping Swift validation authoritative

Product impact

Correcting a file no longer risks silently teaching the hat. The correction completes first. A reusable rule is then an optional, inspectable proposal that can be edited, previewed, explicitly added, or discarded without affecting the already-filed item.

File content used for the proposal stays in the on-device Foundation Models path. No correction, excerpt, or teaching history is uploaded solely to learn a rule.

Validation

  • focused correction/ruleset suite: 6 tests passed
  • GitHub CI full suite: passed in 3m17s
  • package app build: passed
  • no-signing Xcode build including app, Finder extension, and Sparkle: passed
  • XcodeGen reproducibility check: passed
  • native visual and accessibility pass: correction disclosure, loading, generated proposal, overlap warning, editable rule, Preview menu, Add Rule, and Escape-to-discard inspected
  • isolated real-model pass: unsupported placeholders were refused, bounded retry produced a validated proposal, overlap was explained, and discard left the saved rules byte-for-byte unchanged
  • local full suite: 91 of 94 tests passed; the three unchanged Vision OCR fixtures failed on this Mac with TextRecognition.CRImageReaderError error 1, while all 94 passed on the fresh GitHub runner

Closes #39

@tcballard
tcballard marked this pull request as ready for review August 2, 2026 16:17
@tcballard
tcballard merged commit 3b5cbbe into main Aug 2, 2026
1 check passed
@tcballard
tcballard deleted the codex/issue-39-correction-proposals branch August 2, 2026 16:17
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.

feat(review): propose safe rule changes from corrections

1 participant