fix(lint): add #[non_exhaustive] to 44 public enums + wildcard arms#207
Merged
forkwright merged 1 commit intomainfrom Apr 20, 2026
Merged
fix(lint): add #[non_exhaustive] to 44 public enums + wildcard arms#207forkwright merged 1 commit intomainfrom
forkwright merged 1 commit intomainfrom
Conversation
…arms Clears RUST/non-exhaustive-enum across aitesis, akouo-core, apotheke, ergasia, exousia, horismos, kathodos, komide, kritike, paroche, prostheke, syndesis, syntaxis, theatron-core, themelion, zetesis. Each public enum gets #[non_exhaustive] for forward-compat semver safety. Cross-crate match sites updated with appropriate wildcard arms: - kathodos::import::identify::resolve_media_type matches on the horismos::MediaType enum: added an unreachable!() arm noting a new variant without updated matcher is a programming error - kathodos::scanner::watcher::detect_watcher_mode_at matches on the horismos::WatcherMode enum: same unreachable!() pattern Within-crate matches unchanged — #[non_exhaustive] only forces wildcards across crate boundaries. Part of the harmonia 77-warning cleanup arc unblocking 05e cutover.
Contributor
|
Consider splitting into smaller PRs for easier review. Not a blocker, just a signal. |
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.
Summary
#[non_exhaustive]to 44 public enums across 16 crates (aitesis, akouo-core, apotheke, ergasia, exousia, horismos, kathodos, komide, kritike, paroche, prostheke, syndesis, syntaxis, theatron-core, themelion, zetesis) to clearRUST/non-exhaustive-enumwarningshorismos::MediaTypeandhorismos::WatcherMode(both in kathodos)#[non_exhaustive]only forces wildcard arms across crate boundariesRationale
Forward-compat hygiene for the internal closed-system workspace: adding a variant to a public enum later won't break downstream
matchexhaustiveness in semver-stable releases.Cross-crate break resolution
Both breaks hit
horismos::*enums consumed fromkathodos. Choseunreachable!()with file/line context — these are state-machine/classification enums where forgetting to update a downstream matcher is a programming error, not a runtime condition to silently absorb.kathodos/src/import/identify.rs::resolve_media_type— mapshorismos::MediaTypetothemelion::MediaType; added_ => unreachable!("unhandled horismos::MediaType variant in resolve_media_type — ...")kathodos/src/scanner/watcher.rs::detect_watcher_mode_at— branches onhorismos::WatcherMode; same patternScope
Test plan
cargo check --workspace --tests --examples --benchespassescargo nextest run --workspace— 1075 tests pass (3 skipped)kanon lint . | grep RUST/non-exhaustive-enumreturns 0 matches (down from 44)kanon gateexpected to still fail on 33 pre-existing warnings (TOML, unwrap, indexing-slicing, clippytoo_many_arguments, staleclippy::type_complexityexpectations) — none introduced by this PRGate state
kanon gate --stamp→ FAIL on 2 pre-existing steps (cargo clippy,kanon lint), all tied to the other 33 warnings owned by sibling cleanup agents. Verified by git-stash comparison that every clippy/lint error reproduces on pristine branch base. No Gate-Passed trailer per task spec.