PINK: E2E trace analysis — Pass 16 error handling/arithmetic/test infra (S1-S16)
Sixteenth pass: realized_pnl/mark_price NaN bypasses <=0 guard (S1 Critical), MockVenue _exchange_event_queue check-then-act race drops events (S2 Critical), no test_kernel_fsm.py exists (S3 Critical), generated tests use asyncio.sleep(0.8) flaky on slow CI (S4 Critical), _rate_limit_retry_after_ms returns 0 on parse failure instant retry storm (S5 High), venue adapter detects rate limits but enforces zero backoff (S6 High), capital_epsilon=1e-4 too tight false WARN (S7 High), tests use asyncio.run() leaks tasks on 3.12+ (S8 High), str.replace() patching silently does nothing (S9 High), WS _consume no per-message timeout (S10 High), _run blocks pool thread with no timeout lock adapter (S11 High). 305 total flaws across 16 passes. Co-authored-by: CommandCodeBot <noreply@commandcode.ai>
This commit is contained in:
@@ -30,7 +30,8 @@
|
||||
| P | Pass 13 (FFI Safety/Dangling Pointers/Coverage) | 9 | 1 | 3 | 3 | 1 | 1 |
|
||||
| Q | Pass 14 (Serde Edges/Backup Diffs/Market Data) | 12 | 0 | 4 | 3 | 2 | 3 |
|
||||
| R | Pass 15 (Resource Leaks/Trust Boundaries/Security) | 14 | 2 | 6 | 3 | 2 | 1 |
|
||||
| **Total** | | **289** | **23** | **83** | **82** | **64** | **37** |
|
||||
| S | Pass 16 (Error Handling/Arithmetic/Test Infra) | 16 | 4 | 7 | 5 | 0 | 0 |
|
||||
| **Total** | | **305** | **27** | **90** | **87** | **64** | **37** |
|
||||
|
||||
---
|
||||
|
||||
@@ -412,6 +413,31 @@
|
||||
|
||||
---
|
||||
|
||||
## S-Series: Error Handling, Arithmetic Stability, Test Infrastructure (Pass 16)
|
||||
|
||||
*Full detail in TRACE doc under "PASS 16 — ERROR HANDLING, ARITHMETIC STABILITY, TEST INFRASTRUCTURE."*
|
||||
|
||||
| # | Flaw | Layer | Severity |
|
||||
|---|------|-------|----------|
|
||||
| S1 | `realized_pnl()`/`mark_price()` NaN bypasses `<=0.0` guard — NaN PnL corrupts k_realized_pnl | Rust/Python | **Critical** |
|
||||
| S2 | MockVenue `_exchange_event_queue` check-then-act race — silently drops events | Test | **Critical** |
|
||||
| S3 | No `test_kernel_fsm.py` or `test_kernel_fsm_recovery.py` exists | Test | **Critical** |
|
||||
| S4 | Generated tests use `await asyncio.sleep(0.8)` — flaky false negatives on slow CI | Test | **Critical** |
|
||||
| S5 | `_rate_limit_retry_after_ms()` returns 0 on parse failure — instant retry storm | Venue | **High** |
|
||||
| S6 | Venue adapter detects rate limits but enforces zero backoff | Venue | **High** |
|
||||
| S7 | `capital_epsilon = 1e-4` too tight — false WARN classifications | Accounting | **High** |
|
||||
| S8 | Generated tests use module-level `asyncio.run()` — leaks tasks on Python 3.12+ | Test | **High** |
|
||||
| S9 | `str.replace()` patching silently does nothing on format change | Build | **High** |
|
||||
| S10 | `_consume()` no per-message WS timeout — silent hang blocks forever | Venue | **High** |
|
||||
| S11 | `_run()` blocks pool thread with no timeout — 3 hung calls lock adapter | Venue | **High** |
|
||||
| S12 | Rate-limit regex depends on exchange message format — non-portable | Venue | Medium |
|
||||
| S13 | `_row_float()` silently skips malformed rows, filters zero values | Venue | Medium |
|
||||
| S14 | Reconnection backoff lacks jitter — thundering herd risk | Venue | Medium |
|
||||
| S15 | `_venue_event_status_from_row()` falls back to ACKED — masks new rejections | Venue | Medium |
|
||||
| S16 | `except: pass` in generated test code — swallows KeyboardInterrupt | Test | Medium |
|
||||
|
||||
---
|
||||
|
||||
## H-Series: Edge Domains — Dependencies, Error Handling, Types, Contracts (Pass 5)
|
||||
|
||||
*Full detail in TRACE doc under "PASS 5 — EDGE DOMAINS."*
|
||||
|
||||
Reference in New Issue
Block a user