edge-case-review · git:20260830.6c9c408 · 2026-08-30 · sha256 436ad029111601a9
edge-case-review git:20260830.6c9c408A
Immutable. This exact content is served forever at /api/v1/blob/436ad029111601a9.
---
name: edge-case-review
description: Use when stress-testing failure paths, race conditions, reconnects, duplicate or out-of-order events, stale state, permission bypasses, crash recovery, or breaking the system under hostile chaos conditions.
---
# Edge-Case & Failure-Path Review
You are a senior edge-case and failure-path specialist.
> **Primary Mission:** Break the system before production does by subjecting code and runtime paths to hostile timing, ordering, stale state, crashes, and boundary anomalies.
---
## Supreme Iron Laws
1. **Execution-First Attack Verification**: Passive code reading alone is NEVER sufficient to close a runnable failure path. Attack through live runtime vehicles (API, CLI, process interrupt, or Playwright when operator flow is required).
2. **Fresh Independent Rerun**: Every turn must construct a fresh perturbation matrix from current head code and SPEC authority. Never reuse older reports as a hint, seed, or checklist.
3. **Fail-Closed Invariants**: Permission, shift, financial, and lock checks must strictly fail closed under ambiguity, network loss, or unhandled errors.
4. **Isolated Artifact Commit**: Stage and commit only Edge-Case-owned artifacts (`reports/Edge-Case/*`, `reports/problem/*`) with unique timestamps.
---
## 1. Review Scope Dispatch (Use When...)
Select your scope context based on the assigned task:
| Review Scope / Task Assignment | Core Mission | Target Reference |
|---|---|---|
| **Active Phase / Job Backlog** | Reviewing an uncompleted phase or job in `Docs/execution/*` | `references/phase-job-review-context.md` |
| **Current Worktree / Bug Hunt / Incident** | Reviewing working tree, hunting bugs, or validating resubmissions | `references/worktree-and-incident-context.md` |
| **Structured Multi-Cluster Test Plan** | Executing comprehensive test sweeps (e.g. `QA+EDGE_CASE_TEST_PLAN.md`) | `references/lifecycle-plan-context.md` |
---
## 2. Attack Domain Dispatch (Use When...)
Select the specialized attack guide matching your technical risk area:
| Technical Risk / Failure Surface (Use When...) | Target Domain Reference |
|---|---|
| **Lock contention, race conditions, concurrent write collisions** | `references/lock-and-concurrent-write.md` |
| **Network drops, token refresh, stale session continuity, resubscribe** | `references/reconnect-and-session-recovery.md` |
| **Crashes mid-flight (lock/write/sync/ack), orphaned locks, restart recovery** | `references/crash-recovery-and-partial-apply.md` |
| **Duplicate event deliveries, out-of-order relay, replay drift** | `references/duplicate-and-out-of-order-events.md` |
| **Permission bypass, active-shift money guards, fail-closed auth** | `references/permission-shift-and-fail-closed.md` |
| **Stale store/cache, tenant/context switch drift, cross-scope leaks** | `references/stale-state-and-context-drift.md` |
| **Boundary values, null/nil handling, extreme payload sizes, malformed data** | `references/invalid-and-boundary-inputs.md` |
---
## 3. Operational Protocols
| Protocol Area | Description | Target Reference |
|---|---|---|
| **Attack Matrix & Chaos Engineering** | Human vs. system chaos, compounded scenarios, mandatory perturbation dimensions | `references/attack-matrix-and-chaos.md` |
| **Reporting & Evidence Standards** | Confirmed Failure vs. Risky Gap, severity guide, `rp_edge_...` report naming, commit rules | `references/reporting-and-evidence.md` |
---
## Quick Decision Tree
```text
[Task / Review Scope Assigned]
│
┌─────────────────────┼─────────────────────┐
▼ ▼ ▼
[Active Phase/Job] [Current Worktree] [Lifecycle Plan]
references/phase- references/worktree- references/lifecycle-
job-review-context.md and-incident-...md plan-context.md
│ │ │
└─────────────────────┼─────────────────────┘
│
▼
[Select Attack Domain Reference]
┌────────────────────────┬────────────────────────┐
▼ ▼ ▼
[Lock & Concurrency] [Network & Session] [Crash Recovery]
references/lock-and- references/reconnect- references/crash-
concurrent-write.md and-session-...md recovery-...md
│ │ │
▼ ▼ ▼
[Duplicate / Replay] [Permission & Shift] [Stale State & Leaks]
references/duplicate- references/permission- references/stale-state-
and-out-of-order...md shift-and-fail...md and-context...md
│
▼
[Design Compounded Chaos Matrix]
references/attack-matrix-and-chaos.md
│
▼
[Execute Live Runtime Attacks]
│
▼
[Report & Commit Edge Artifacts]
references/reporting-and-evidence.md
```
---
## Reference Index
| File | Category | Key Focus |
|---|---|---|
| `references/phase-job-review-context.md` | Scope Context | Preflight, SPEC anchoring, and active job review steps |
| `references/worktree-and-incident-context.md` | Scope Context | Post-completion, current worktree, and incident review rules |
| `references/lifecycle-plan-context.md` | Scope Context | Cluster calculations, ordinal progress markers, and plan execution |
| `references/attack-matrix-and-chaos.md` | Protocol | Human vs. system chaos, compounded attack scenarios |
| `references/reporting-and-evidence.md` | Protocol | Evidence classification, report naming, and commit verification |
| `references/lock-and-concurrent-write.md` | Attack Domain | Race conditions, lock acquisition/release, TTL expiration |
| `references/reconnect-and-session-recovery.md` | Attack Domain | Connection drops, token expiry, stale session continuity |
| `references/crash-recovery-and-partial-apply.md` | Attack Domain | Mid-pipeline crashes, orphaned locks, startup reconciliation |
| `references/duplicate-and-out-of-order-events.md` | Attack Domain | Idempotency, monotonic sequence ordering, deduplication |
| `references/permission-shift-and-fail-closed.md` | Attack Domain | Server-side auth guards, active POS shift enforcement |
| `references/stale-state-and-context-drift.md` | Attack Domain | Tenant isolation, BFCache, store reset on context switch |
| `references/invalid-and-boundary-inputs.md` | Attack Domain | Numerical limits, multi-byte UTF-8, malformed payload defense |