Skip to content

FIX: Reword Excluded.OMITTED and add taxonomy sample walkthroughs - #20

Merged
kishorereddy merged 2 commits into
mainfrom
fix/260816-excluded-default
Aug 15, 2026
Merged

FIX: Reword Excluded.OMITTED and add taxonomy sample walkthroughs#20
kishorereddy merged 2 commits into
mainfrom
fix/260816-excluded-default

Conversation

@kishorereddy

@kishorereddy kishorereddy commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

Overview

Small wording fix to Excluded.OMITTED's message, plus new sample code that walks through
picking the right status for common validation scenarios.

Ticket(s)

N/A

Links(s)

N/A

Example(s)

  • test2() in the sample app randomly builds one of the 8 status groups and prints both the
    group name and the specific status name, a quick way to see the whole taxonomy in one run.
  • test3()/validatePhone(...) shows a realistic validation function that picks a different
    status group depending on why the input failed: bad format (Invalid), a reserved test value
    (Rejected), or a caller-restricted number range (Restricted).

Dependencies

None.

Design

  1. Wording fix: Excluded.OMITTED's message changed from "The item was left out." to "The
    item was excluded from the result.", clearer and more consistent with the other Excluded
    members' phrasing. OMITTED stays the first-declared, default member of the group.
  2. Sample app: added test2() and test3() to sample-kotlin's SampleApp.kt, demonstrating
    building/matching all 8 status groups and a small validatePhone function that shows how to
    pick between Invalid, Rejected, and Restricted depending on the failure reason. The
    original test1() demo (unchanged) is temporarily commented out of main() while iterating
    on the new examples.

Notes

validatePhone's Restricted case is keyed off an explicit caller parameter (defaults to
"guest"), since Restricted is about who's asking, not what value they passed in, an earlier
draft used Restricted for a value-based rule, which didn't quite fit; this version ties it to
an actual identity/permission check instead.

Pending

n/a

Tests

No unit tests added, this is sample/demo code. Verified via ./gradlew :kiit-codes:jvmTest and
:samples:sample-kotlin:compileKotlin, both pass.

@kishorereddy
kishorereddy merged commit 345a3b2 into main Aug 15, 2026
1 check passed
@kishorereddy
kishorereddy deleted the fix/260816-excluded-default branch August 16, 2026 01:36
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