1---2name: edge-case-enumeration3description: Systematic edge case discovery using structured enumeration techniques4---56# Edge Case Enumeration78## Purpose9Systematically discover edge cases for proposed features using structured enumeration techniques.1011## Inputs12- Feature specification or user story being analyzed13- Input fields and their expected types/formats14- State transitions and lifecycle of the feature15- User roles and permission model1617## Process1819### Step 1: Identify Input Boundaries20For each input: document the type, valid range, length constraints, format requirements, and whether it's required or optional.2122### Step 2: Apply Boundary Value Analysis23For each input, enumerate:2425- **Empty/null/undefined**: What happens with no input, null, undefined, empty string, whitespace-only?26- **Minimum and maximum values**: At the boundary, one below, one above27- **Just inside and just outside valid ranges**: Off-by-one errors, boundary transitions28- **Special characters**: Unicode (CJK, Arabic, RTL text), emoji, zero-width characters, combining characters, null bytes29- **Extremely long inputs**: Past max length, at max length, strings that look like numbers3031### Step 3: Enumerate State Combinations32- **Empty state**: First use, no data created yet, fresh account33- **Partial state**: Incomplete setup, mid-operation interruption, partially filled forms34- **Full state**: At capacity limits, pagination boundaries, maximum items reached35- **Stale state**: Cached data from previous version, outdated references, deleted dependencies3637### Step 4: Analyze Concurrent Scenarios38- **Same user simultaneous ops**: Double submit, rapid clicks, multiple tabs, back button after submit39- **Different users on same resource**: Concurrent edits, delete while viewing, permission change during session40- **Operations during deployment/migration**: Request in flight during deploy, schema change mid-operation4142### Step 5: Consider Temporal Edge Cases43- **Timezone boundaries**: UTC midnight, DST transitions, user in different timezone than server44- **Session expiry mid-operation**: Token expires during long form fill, refresh token rotation45- **Long-running operations**: Timeout during processing, progress loss on reconnect, orphaned background jobs4647### Step 6: Map Permission Edge Cases48- **Role transitions**: Admin demoted to user during active session, role upgrade without re-login49- **Shared resources with mixed permissions**: Viewer accessing editor's link, public/private toggle50- **Deleted/suspended user data**: References to deleted users, suspended account data visibility, orphaned content5152## Output Format5354### Edge Case Table5556#### Input Edge Cases57| Input | Edge Case | Expected Behavior | Test Priority |58|---|---|---|---|59| [Field] | Empty/null | [Behavior] | P0/P1/P2 |60| [Field] | Max length + 1 | [Behavior] | P0/P1/P2 |6162#### State Edge Cases63| State | Edge Case | Expected Behavior | Test Priority |64|---|---|---|---|65| Empty | No items, first load | [Behavior] | P0/P1/P2 |66| Stale | Cached reference to deleted item | [Behavior] | P0/P1/P2 |6768#### Concurrency Edge Cases69| Scenario | Edge Case | Expected Behavior | Test Priority |70|---|---|---|---|71| Double submit | Rapid form submission | [Behavior] | P0/P1/P2 |7273#### Temporal Edge Cases74| Scenario | Edge Case | Expected Behavior | Test Priority |75|---|---|---|---|76| Session expiry | Token expires mid-save | [Behavior] | P0/P1/P2 |7778#### Permission Edge Cases79| Scenario | Edge Case | Expected Behavior | Test Priority |80|---|---|---|---|81| Role change | Admin demoted during session | [Behavior] | P0/P1/P2 |8283### Priority Key84- **P0**: Will break in production, must handle before launch85- **P1**: Likely to occur, causes poor UX or data issues86- **P2**: Unlikely but possible, handle if time permits8788## Quality Checks89- [ ] Every input field has boundary value analysis90- [ ] Empty/null/error states are covered for all inputs91- [ ] Concurrent scenarios are addressed for shared resources92- [ ] At least 5 edge cases per category (input, state, concurrency, temporal, permission)93- [ ] Each edge case has defined expected behavior94- [ ] P0 cases are flagged for immediate implementation9596## Evolution Notes97<!-- Observations appended after each use -->