docs: Add Bug #74 - Position Manager monitoring failure to Top 10 Critical Pitfalls
- Moved from #10 to #1 (most critical) - This bug cost user 08 in real losses Dec 8, 2025 - Root cause: Container restart without verifying fix deployment - Prevention: ALWAYS verify container timestamp > commit timestamp
This commit is contained in:
20
.github/copilot-instructions.md
vendored
20
.github/copilot-instructions.md
vendored
@@ -747,16 +747,16 @@ docs/COMMON_PITFALLS.md
|
|||||||
```
|
```
|
||||||
|
|
||||||
**Top 10 Critical Pitfalls (Summary):**
|
**Top 10 Critical Pitfalls (Summary):**
|
||||||
1. **Drift SDK Memory Leak (#1)** - JS heap OOM after 10+ hours → Smart health monitoring
|
1. **Position Manager Never Monitors (#73, #74)** - Container running old code = NO MONITORING = $108 loss
|
||||||
2. **Wrong RPC Provider (#2)** - Alchemy breaks Drift SDK → Use Helius only
|
2. **Drift SDK Memory Leak (#1)** - JS heap OOM after 10+ hours → Smart health monitoring
|
||||||
3. **P&L Compounding Race Condition (#48, #49, #61)** - Multiple closures → Atomic Map.delete()
|
3. **Wrong RPC Provider (#2)** - Alchemy breaks Drift SDK → Use Helius only
|
||||||
4. **Database-First Pattern (#29)** - Save DB before Position Manager
|
4. **P&L Compounding Race Condition (#48, #49, #61)** - Multiple closures → Atomic Map.delete()
|
||||||
5. **Container Deployment Verification (#31)** - Always check container timestamp
|
5. **Database-First Pattern (#29)** - Save DB before Position Manager
|
||||||
6. **Position.size Tokens vs USD (#24)** - SDK returns tokens → multiply by price
|
6. **Container Deployment Verification (#31)** - Always check container timestamp
|
||||||
7. **External Closure Race Condition (#67)** - 16 duplicate notifications → Atomic lock
|
7. **Position.size Tokens vs USD (#24)** - SDK returns tokens → multiply by price
|
||||||
8. **Smart Entry Wrong Price (#66)** - Use Pyth oracle, not webhook percentage
|
8. **External Closure Race Condition (#67)** - 16 duplicate notifications → Atomic lock
|
||||||
9. **MAE/MFE Wrong Units (#54)** - Store percentages, not dollars
|
9. **Smart Entry Wrong Price (#66)** - Use Pyth oracle, not webhook percentage
|
||||||
10. **Execute Endpoint Quality Bypass (#62)** - Quality check after timeframe validation
|
10. **MAE/MFE Wrong Units (#54)** - Store percentages, not dollars
|
||||||
|
|
||||||
**How to Use:**
|
**How to Use:**
|
||||||
- **Quick lookup:** Check Quick Reference Table in `docs/COMMON_PITFALLS.md`
|
- **Quick lookup:** Check Quick Reference Table in `docs/COMMON_PITFALLS.md`
|
||||||
|
|||||||
Reference in New Issue
Block a user