Spaces:
Sleeping
Sleeping
Session 25: ACTUAL root cause = S21 stage0_require_stage1_to_lock flag (lock-admission rule), ~30x fewer funnel entries; proven via user's uploaded pre-update app.py + locktest.py A/B
Browse files
Log.md
CHANGED
|
@@ -3256,3 +3256,44 @@ FIX (surgical, NO detection-math change) — proposed, AWAITING GO:
|
|
| 3256 |
VERIFY: after FIX-1+2, expect thin_skips/cycle -> ~0, zones_found to climb, Stage-1 to rebuild
|
| 3257 |
toward ~16-40 within ~1-2 full universe sweeps (~10-20 min).
|
| 3258 |
Repeatable tools: output/zonetest.py, output/zonetest_s21.py, output/baserate.py.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3256 |
VERIFY: after FIX-1+2, expect thin_skips/cycle -> ~0, zones_found to climb, Stage-1 to rebuild
|
| 3257 |
toward ~16-40 within ~1-2 full universe sweeps (~10-20 min).
|
| 3258 |
Repeatable tools: output/zonetest.py, output/zonetest_s21.py, output/baserate.py.
|
| 3259 |
+
|
| 3260 |
+
## SESSION 25 (cont. 5) — *** ACTUAL ROOT CAUSE FOUND *** (user uploaded pre-update app.py)
|
| 3261 |
+
User uploaded their LAST-WORKING codebase (workspace/web/app.py, 7453 lines, pre-v8: has
|
| 3262 |
+
conviction_enabled + evaluate_entry_filters, NO SMART_ENGINE_V8 / structural_read). Saved as
|
| 3263 |
+
/tmp/app_lastworking.py. It is DIFFERENT from S21 3ce44188 and does NOT contain
|
| 3264 |
+
stage0_require_stage1_to_lock -> it pre-dates S21 (one of the "Upload 20 files" builds).
|
| 3265 |
+
|
| 3266 |
+
FULL DETECTION-LAYER DIFF (uploaded last-working vs HEAD):
|
| 3267 |
+
IDENTICAL: detect_candidate_zones, find_swings, atr, _lock_first_liquidity, _fvg_first_touch,
|
| 3268 |
+
_run_machine, _probe_zone_stage, _rebase_indices, _resolve_idx, load_bars,
|
| 3269 |
+
load_symbols, should_scan, _prune_states.
|
| 3270 |
+
CFG detection/universe diff = exactly 1 key: stage0_require_stage1_to_lock (absent->True).
|
| 3271 |
+
evaluate_stages: ONE behavioural change (the S21 Option C line):
|
| 3272 |
+
OLD: if best_zone is None: return None
|
| 3273 |
+
NEW: if best_zone is None or (CFG.get("stage0_require_stage1_to_lock",True) and best_stage<1): return None
|
| 3274 |
+
process_symbol: legacy filter branch -> single v8 conviction path (DOWNSTREAM stage4->5 only);
|
| 3275 |
+
_reset_state: clears new v8 latches (additive). g_phase_label + alert_on_exit gate (additive).
|
| 3276 |
+
|
| 3277 |
+
EMPIRICAL PROOF (output/locktest.py, 70 random of 812-symbol universe, same live bars, both rules):
|
| 3278 |
+
LAST-WORKING rule (lock at stage 0 on any clean FVG): 64/70 lock -> ~742 across universe.
|
| 3279 |
+
CURRENT rule (require best_stage>=1 to lock): 2/70 lock -> ~23 across universe.
|
| 3280 |
+
=> ~30x collapse in funnel entries. THIS is "16-46 pairs then, ~1 now". Detector unchanged;
|
| 3281 |
+
the LOCK ADMISSION RULE changed.
|
| 3282 |
+
|
| 3283 |
+
CONCLUSION: The freeze is NOT the v8 legacy removal (that's downstream of Stage 1, confirmed by the
|
| 3284 |
+
filters-off test doing nothing). It is the S21 "Option C" flag stage0_require_stage1_to_lock=True,
|
| 3285 |
+
committed the SAME DAY as v8 (10:57 vs 15:22+), so it READ as "the update broke it". The v8
|
| 3286 |
+
REDEPLOY wiped warm inventory; the cold rebuild under Option C then locked ~30x fewer pairs, making
|
| 3287 |
+
the regression suddenly visible. User's instinct ("a code change in the rewrite did it") = CORRECT.
|
| 3288 |
+
|
| 3289 |
+
INSTANT NO-CODE TEST: Settings -> STAGE0_REQUIRE_STAGE1_TO_LOCK=false + Save (hot-reload). Restores
|
| 3290 |
+
exact old admission rule; board should repopulate within 1-2 sweeps. Pair with REQUEST_CONCURRENCY=3
|
| 3291 |
+
so the cold rebuild isn't throttled.
|
| 3292 |
+
|
| 3293 |
+
TRADE-OFF (why S21 added the flag): with it OFF a symbol locks the best candidate at Stage 0 and is
|
| 3294 |
+
NEVER re-sorted (acquire only runs when st.zone is None) -> if that zone dies it sits on a dead
|
| 3295 |
+
Stage-0 zone ("slot exhaustion"). Flag ON avoids that but empties the board.
|
| 3296 |
+
PROPOSED PROPER FIX (await user vet): keep the rich board WITHOUT slot-exhaustion -> allow a held but
|
| 3297 |
+
un-promoted Stage-0 zone to be RE-SORTED to a better fresh candidate (or expire faster) instead of
|
| 3298 |
+
being married for life. i.e. set flag false AND add stage-0 re-sort/short-TTL so dead zones recycle.
|
| 3299 |
+
Tools: output/locktest.py (lock-rule A/B), output/zonetest.py, output/baserate.py.
|