Skip to content

Stop auto-fix from joining words or typing guesses - #1

Merged
drknowhow merged 4 commits into
mainfrom
fix/autofix-policy
Oct 20, 2026
Merged

drknowhow merged 4 commits into
mainfrom
fix/autofix-policy

Conversation

@drknowhow

Copy link
Copy Markdown
Owner

Auto-fix joined words and typed guesses. Harper rules such as everyone, repeated_words and disjoint_prefixes replace two words with one and were applied even at the default level (Every one became Everyone, up date became update), and Bold typed ambiguous spelling guesses, 26 of 40 of which were undone or overwritten.

Now a fix must replace one word with one word and keep its punctuation; edits across words and style rewrites are never automatic; Bold adds only doubled-letter fixes on capitalised words; typos under four letters need a doubled letter; learned autocorrect entries drop the punctuation around the typo. Risk: fewer fixes at Bold and for three-letter typos. cargo test --workspace passes, including a replay of 22 sentences that make Harper offer joins.

https://claude.ai/code/session_01DiRshLaPboWShtRAdGazjy

Harper rules join words and some came out S0 or S1: `out side` -> `outside`,
`Every one` -> `Everyone`, `had had` -> `had`. Whether they are right depends on
words not typed yet, so they become S3 once overlaps are settled (`that that`
cannot fall to `that` -> `which`); an edit that changes one word of its span is
narrowed to that word. Style lints are S3. Typos under four letters are S0 only
with a doubled letter (`soo`): `har`, `anb`, `thw` have several likely fixes.
Verified with cargo test -p cc-correct.

Claude-Session: https://claude.ai/code/session_01DiRshLaPboWShtRAdGazjy
fixgate::reject now refuses an edit whose original spans several words, that
deletes the word, splits it (unless an autocorrect entry such as `alot` ->
`a lot` says so) or changes the punctuation around it. Bold (S2) stops typing
guesses, of which 26 of 40 were undone or overwritten; it now adds only
doubled-letter fixes on capitalised words (`Outllook`). Replaying 22 sentences
that make Harper offer joins finds none applied at any level.
Verified with cargo test -p cc-app -p cc-tray -p cc-ui.

Claude-Session: https://claude.ai/code/session_01DiRshLaPboWShtRAdGazjy
The profile had learned `reeviews, -> reviews`, which deletes the comma every
time it fires, and `(iof -> (if`. Entries are now keyed by the bare word, the
same punctuation comes off the fix, lookups use the bare word (`(teh` looks up
`teh`), and a file with such entries is rewritten when the app starts.
Verified with cargo test -p cc-correct -p cc-app.

Claude-Session: https://claude.ai/code/session_01DiRshLaPboWShtRAdGazjy
CI failed linking cc-window's `demo` because cc-overlay, cc-ui and cc-window
all built `examples/demo.exe` into one directory (cargo issue 6313), and
cc-hook and cc-store both built `dump.exe`. cc-tray already used `tray_demo`;
the overlay, ui and store examples now follow it.
Verified: cargo build --workspace --examples prints no collision warning.

Claude-Session: https://claude.ai/code/session_01DiRshLaPboWShtRAdGazjy
@drknowhow
drknowhow merged commit 3a54e3d into main Oct 20, 2026
1 check passed
@drknowhow
drknowhow deleted the fix/autofix-policy branch October 20, 2026 21:29
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.

1 participant