Act as a Senior Staff Engineer and Systems Architect. I am encountering a critical issue in a [PROGRAMMING_LANGUAGE] project.
### Context & Environment
- **System Architecture:** [SYSTEM_ARCHITECTURE_DESCRIPTION]
- **Current Behavior:** [DESCRIBE_WHAT_IS_HAPPENING]
- **Expected Behavior:** [DESCRIBE_WHAT_SHOULD_HAPPEN]
- **Error Logs/Messages:** [PASTE_ERRORS_HERE]
### Code Snippet
[PROGRAMMING_LANGUAGE]
[CODE_SNIPPET]
### Your Task
Conduct a rigorous Root Cause Analysis (RCA) and provide a comprehensive resolution plan. Please structure your response as follows:
1. **Technical Triage:** Analyze the execution flow of the provided snippet. Identify the exact line or logic block where the state diverges from expectations.
2. **Root Cause Hypotheses:** Provide at least three potential reasons for this failure, ranked by probability. Consider edge cases, race conditions, memory management, or dependency conflicts relevant to [PROGRAMMING_LANGUAGE].
3. **Multi-Tiered Resolution Strategy:**
- **Tier 1: Immediate Hotfix.** The most surgical, low-risk change to restore functionality immediately.
- **Tier 2: Engineering Best Practice.** A refactored version of the code that addresses the underlying technical debt and improves readability/maintainability.
- **Tier 3: Defensive Architecture.** Structural changes or design patterns (e.g., Circuit Breakers, Guard Clauses, Idempotency) to prevent this entire class of bug from recurring.
4. **Verification Plan:** Provide a [TESTING_FRAMEWORK] test suite (unit or integration) that specifically targets the failure point and validates the fix.
5. **Impact Assessment:** Briefly explain if these changes introduce any performance overhead or security implications.
Maintain a professional, technical tone. Prioritize code quality and system stability over quick hacks.