fix(core): flag "a software" with modifiers#3805
Open
ychampion wants to merge 2 commits into
Open
Conversation
Constraint: Preserve valid compound-noun uses and existing direct suggestion behavior. Rejected: General qualified mass-noun matching | Corpus snapshots exposed valid countable senses and clause false positives. Confidence: high Scope-risk: narrow Directive: Gate any broader modifier matching on corpus tests and noun-specific ambiguity. Tested: Full default and no-default harper-core package suites; focused regressions; strict library Clippy; cargo fmt; diff check. Not-tested: JavaScript Biome formatting because node_modules is absent and the diff is Rust-only.
hippietrail
requested changes
Jul 11, 2026
hippietrail
left a comment
Collaborator
There was a problem hiding this comment.
AI-written linters, especially for tricky mistakes that need context to disambiguate need a lot of real world test cases. I spent some human time and effort to find some to help see how close this is.
Constraint: Preserve valid software compounds while covering every real-world sentence supplied in review. Rejected: Broaden follower classification for every mass noun | Corpus snapshots exposed a false positive in an unrelated literary sentence. Confidence: high Scope-risk: narrow Directive: Keep future qualified-mass-noun exceptions noun-specific and corpus-tested. Tested: focused 64-test noun-countability suite; full default and no-default harper-core suites; corpus snapshots; strict default and no-default Clippy; cargo fmt; release CLI positive and negative smokes; diff check. Not-tested: JavaScript Biome formatting because the clean clone has no node_modules; just format completed its Rust formatting step.
Author
Nah, I reviewed dw |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
AI disclosure: This change was implemented by an autonomous Codex agent and reviewed and tested in the local workspace.
Issues
Fixes #3799
Description
MassNounsnow recognizessoftwareas the head of a qualified noun phrase, including the reporteda novel writing softwarecase. Corrections preserve the original modifiers.The matcher stops when a later noun becomes the head, so compounds such as
a software toolanda software engineering managerremain unchanged. This is scoped tosoftware; applying the same heuristic to every mass noun caused corpus false positives for words with valid countable senses.Demo
a novel writing softwarenow offersa novel writing program,novel writing software, andsome novel writing software.How Has This Been Tested?
CARGO_PROFILE_TEST_DEBUG=0 CARGO_INCREMENTAL=0 cargo test -p harper-core --quietCARGO_PROFILE_TEST_DEBUG=0 CARGO_INCREMENTAL=0 cargo test -p harper-core --no-default-features --quietcargo clippy -p harper-core --lib -- -D warnings -A clippy::useless-borrows-in-formatting -A clippy::question-markcargo clippy -p harper-core --lib --no-default-features -- -D warnings -A clippy::useless-borrows-in-formatting -A clippy::question-markcargo fmt --all -- --checkAI Disclosure
If Your PR Implements or Enhances a Linter
Checklist