forked from chiki2bum2/SniperGold_ML
268 lines
No EOL
10 KiB
Markdown
268 lines
No EOL
10 KiB
Markdown
# SESSION HANDOVER — P3-S.17R.1 RESEARCH SWEEP EVENT CONTRACT REPAIR + FULL GATE WIRING
|
|
|
|
```text
|
|
Date : 2026-08-23
|
|
Session : P3-S.17R.1 — Research Sweep Event Contract Repair + Full Gate Wiring
|
|
Baseline : P3-S.17R close checkpoint 92e5bd6a8fa065c4be5509ad6c2100c1893739da
|
|
VERIFIED (authoritative workspace; local == origin/main, branch
|
|
main, origin = forge.mql5.io/chiki2bum2/SniperGold_ML.git).
|
|
Scope : RESEARCH-ONLY. XAUUSD M15 (Files/AlgoForge/Data), authorized
|
|
2017-01-03..2026-07-21 (194,985 bars). NO Tickstory/Dukascopy.
|
|
Human verif: REMAINS CANCELLED. NO AUC/PF/backtest/opt/ML training.
|
|
Verdict : PARITY ACHIEVED WITH CAVEATS (see §1).
|
|
Next gate : NOT training (P3-S.18 NOT ready). Full-scope vectorization of
|
|
CHoCH/OB/FVG kernels -> re-run staged parity on the complete
|
|
scope -> P3-S.17 re-audit on the reconciled population.
|
|
```
|
|
|
|
---
|
|
|
|
## 1. What P3-S.17R.1 established
|
|
|
|
```text
|
|
A. SWEEP EVENT PARITY — ACHIEVED (full authorized scope):
|
|
research event onsets 2,938 == runtime 2,938 (byte-locked sliding-window
|
|
reference); runtime-only 0, research-only 0; contract-active bars
|
|
194,985 / 194,985 exact; event identity (onset+dir+valid_until+
|
|
superseded) identical.
|
|
The legacy persistent-latch proxy (`smc_semantic_common.sweep_state`,
|
|
1,896 active / 2,000 bars) is REPLACED in the setup path by the semantic
|
|
EVENT port `ml/p3/smc_semantic/sweep_event.py`.
|
|
NOTE: the P3-S.17R "58 onsets / 2,000" measurement was itself an
|
|
approximation (PAR-suite 4/4 pivot port without begin=100); the faithful
|
|
runtime pivot (internal len=5, begin=100) gives 25 onsets / 2,000, exactly
|
|
matching the runtime reference.
|
|
|
|
B. GATE SERIES — WIRED (full scope) with runtime as-of semantics:
|
|
H4 = Narrative agent dir, M30 = Context agent dir (newest CLOSED HTF bar
|
|
with close_time <= decision-bar close), M15 = Entry agent dir (decision
|
|
bar). Port: `ml/p3/smc_semantic/spec_tests_engine2_gates.py` (frozen
|
|
Engine-2 agent rules, AF_E2_DIR_TOL, E2_MIN_BARS, Engine-1 cache as-of).
|
|
In-scope non-zero: h4 163,830 / m30 178,764 / m15 145,220 of 194,985.
|
|
Boundary (GR-T11): exactly at HTF close the just-closed HTF bar IS visible
|
|
(runtime Engine-1 cache; contract §L text "close_time <= t" vs runtime
|
|
"close_time <= decision close" — deterministic, documented, not a blocker).
|
|
|
|
C. CANDIDATE SETUP PARITY — runtime == research on every deterministic
|
|
window (11 windows x 2,000 bars sampled; 8 setups total in 3 windows,
|
|
identity + per-bar outcome match everywhere; the rest 0 by genuine frozen
|
|
lifecycle filtering — e.g., 90000..92000: 19 single-bar complete chains,
|
|
13 slot-blocked, 6 started and discarded at STRUCTURE_CONFIRMED by
|
|
context/event lapse).
|
|
The previous 0-population (P3-S.17) was an EXTRACTOR ARTIFACT:
|
|
proxy latch + proxy mitigation + neutral gates + a frame/decision
|
|
coordinate bug in the research runner (fixed).
|
|
|
|
D. P3-S.17 RE-AUDIT: NOT RUN (requires full-scope vectorization; see §5).
|
|
```
|
|
|
|
## 2. Deliverables
|
|
|
|
```text
|
|
docs/P3_S17R1_RESEARCH_SWEEP_GATE_REPAIR.md (this parity report)
|
|
ml/p3/smc_semantic/sweep_event.py (semantic EVENT port)
|
|
ml/p3/smc_semantic/spec_tests_engine2_gates.py (Engine-2 gate port)
|
|
ml/p3/setup_dataset/spec_tests_sweep_research_parity.py (SR-T01..T15)
|
|
ml/p3/setup_dataset/spec_tests_gate_research_parity.py (GR-T01..T14)
|
|
ml/p3/setup_dataset/spec_tests_p3_s17r1_full_parity.py (real-data runner)
|
|
ml/p3/setup_dataset/output/p3_s17r1_sweep_parity.json (SR report)
|
|
ml/p3/setup_dataset/output/p3_s17r1_gate_parity.json (GR report)
|
|
ml/p3/setup_dataset/output/p3_s17r1_full_parity.json (staged full parity
|
|
+ sweep detail +
|
|
gate evidence +
|
|
verdict)
|
|
docs/SESSION_HANDOVER_2026-08-23_P3_S17R1.md (this file)
|
|
(gitignored: p3_s17r1_gate_series_cache.npz, *.csv)
|
|
```
|
|
|
|
## 3. Regression status (after research-only changes)
|
|
|
|
```text
|
|
P3-S.2 17/17 | P3-S.3 20/20 | P3-S.4 20/20 | P3-S.5 20/20 | P3-S.6 20/20
|
|
P3-S.7 22/22 | P3-S.8 25/25 | F1 8/8 | F2 20/20 | F3 25/25 | F4 16/16
|
|
P3-S.16 20/20 | P3-S.17R 17/17 | P3-S.17R.1 SR 15/15 | P3-S.17R.1 GR 14/14
|
|
No historical suite weakened or modified. Historical report JSON timestamp
|
|
side-effects reverted.
|
|
Namespace: the new FVG/OB-referencing research files live in the spec_tests_*
|
|
namespace (frozen P3-S.17R decision) so P3-S.4 FVG-T20 / P3-S.5 OB-T20 stay
|
|
green (verified 20/20 each).
|
|
```
|
|
|
|
## 4. Explicitly unchanged areas
|
|
|
|
```text
|
|
- MQL5 detectors / AF_Engine2_Setup / AF_Engine2_Agents / F1/F2/F3/F4 : unchanged
|
|
- FEATURE_CONTRACT.md / SniperGold_ML.mqh / weights / labels / legacy MLP : unchanged
|
|
- P3-S.16 entry timestamp / TP-SL / horizon / WIN-LOSS-UNRESOLVED-AMBIGUOUS /
|
|
de-overlap / feature timing : unchanged
|
|
- No AUC/PF/backtest/optimization/ML/human annotation used.
|
|
```
|
|
|
|
## 5. Open for a FUTURE phase (NOT resolved in P3-S.17R.1)
|
|
|
|
```text
|
|
1. Full-scope CHoCH/OB/FVG detection kernels need vectorization for the
|
|
complete 194,985-bar Candidate Setup pass (the staged chain currently runs
|
|
on 11 deterministic 2,000-bar windows).
|
|
2. After (1): re-run this staged parity on the COMPLETE scope, then the
|
|
P3-S.17 re-audit (de-overlap, class distribution, censoring, ambiguity,
|
|
lifetime, feature snapshot, reproducibility) on the reconciled full
|
|
population.
|
|
3. Tickstory/Dukascopy = future independent data-source robustness study only.
|
|
```
|
|
|
|
## 6. Handoff
|
|
|
|
```text
|
|
DO NOT train ML (P3-S.18 NOT ready). The sweep byte-lock and the H4/M30/M15
|
|
gate wiring are done; the research side now reproduces the frozen Candidate
|
|
Setup semantics wherever the chain is computable. The full-population
|
|
certification requires the deferred vectorization, then the P3-S.17 re-audit.
|
|
The legacy MLP remains frozen reference.
|
|
```
|
|
|
|
## 7. Provenance / Checkpoint
|
|
|
|
```text
|
|
Forge HEAD (start) : 92e5bd6a8fa065c4be5509ad6c2100c1893739da (P3-S.17R close)
|
|
Branch / remote : main == origin/main (forge.mql5.io/chiki2bum2/SniperGold_ML.git)
|
|
Working tree : CLEAN at start (research artifacts adopted); CLEAN at close
|
|
P3_S17R1_FINAL_SHA : 13a23df0d87e1cda0178b2924dae2a5c1e143b46
|
|
Human verification : CANCELLED
|
|
```
|
|
|
|
*End P3-S.17R.1 handover. Sweep event parity byte-locked; H4/M30/M15 gate
|
|
series wired; Candidate Setup parity runtime==research on the computable
|
|
scope; full-population certification deferred to the vectorization phase.*
|
|
|
|
---
|
|
|
|
# OFFICIAL SESSION CLOSE — P3-S.17R.1
|
|
|
|
## A. Session
|
|
|
|
```text
|
|
P3-S.17R.1 — Research Sweep Event Contract Repair + Full Gate Wiring
|
|
Final status : COMPLETE / Verdict = PARITY ACHIEVED WITH CAVEATS
|
|
```
|
|
|
|
## B. Starting Checkpoint
|
|
|
|
```text
|
|
92e5bd6a8fa065c4be5509ad6c2100c1893739da VERIFIED
|
|
(local == origin/main, branch main, working tree clean; the 4 untracked
|
|
P3-S.17R.1 artifacts from the interrupted earlier attempt were reviewed,
|
|
adopted, and completed)
|
|
```
|
|
|
|
## C. Final Forge HEAD
|
|
|
|
```text
|
|
1165174fbaf2f1bcc9eb41cba6ec887f6c3cbd13 (local == origin/main, working tree CLEAN;
|
|
P3_S17R1_FINAL_SHA recorded = 13a23df0d87e1cda0178b2924dae2a5c1e143b46)
|
|
```
|
|
|
|
## D. Data Source
|
|
|
|
```text
|
|
SAME authorized P3-S.17 source: XAUUSD M15 (Files/AlgoForge/Data),
|
|
2017-01-03..2026-07-21, 194,985 bars. NO Tickstory/Dukascopy.
|
|
```
|
|
|
|
## E. Parity Results
|
|
|
|
```text
|
|
data identity : PASS (194,985 bars == P3-S.17)
|
|
H4 gate : WIRED + GR-T01..T03 (full scope, as-of)
|
|
M30 gate : WIRED + GR-T04..T06 (full scope, as-of)
|
|
Sweep : PARITY (2,938 == 2,938 onsets; 194,985/194,985 active;
|
|
0 runtime-only, 0 research-only; SR-T01..T15)
|
|
CHoCH : subset parity (PAR-T06/T07; full-scope kernel deferred)
|
|
OB : subset parity (PAR-T08/T09; P3-S.5 20/20)
|
|
FVG : subset parity (PAR-T10/T11; P3-S.4 20/20)
|
|
M15 entry : WIRED + GR-T09/T10 (full scope, as-of)
|
|
Candidate Setup : runtime == research (identity + per-bar outcome) on all
|
|
11 sampled windows; 8 setups total; previous 0 = artifact
|
|
```
|
|
|
|
## F. First Divergence Resolution
|
|
|
|
```text
|
|
Liquidity Sweep:
|
|
legacy latch : 1,896 active bars / 2,000 (state, no expiry)
|
|
faithful EVENT port : 25 onsets / 2,000
|
|
byte-locked runtime reference: 25 onsets / 2,000 -> IDENTICAL
|
|
full-scope : 2,938 == 2,938 onsets; active 194,985/194,985
|
|
Classification: STATE/EVENT CONVENTION DIVERGENCE RESOLVED.
|
|
```
|
|
|
|
## G. Second Blocker Resolution
|
|
|
|
```text
|
|
H4/M30/M15 gate series wired into the research path with the runtime as-of
|
|
semantics (Engine-2 agents; newest CLOSED HTF bar <= decision close; no
|
|
future bar; GR-T11/T12/T13 pin the temporal contract).
|
|
```
|
|
|
|
## H. Zero Population Interpretation
|
|
|
|
```text
|
|
NOT CONFIRMED and now EXPLAINED: the previous 0 was an extractor artifact
|
|
(proxy latch + proxy mitigation + neutral gates + runner coordinate bug).
|
|
With faithful detectors + real gates the sampled population is non-zero
|
|
(8 setups / 22,000 sampled bars; runtime == research).
|
|
```
|
|
|
|
## I. Production Changes
|
|
|
|
```text
|
|
NONE. MQL5 detectors, AF_Engine2_Setup, F1/F2/F3/F4, FEATURE_CONTRACT.md,
|
|
SniperGold_ML.mqh, weights, training pipeline all UNCHANGED.
|
|
```
|
|
|
|
## J. ML Status
|
|
|
|
```text
|
|
NOT TOUCHED. No MLP/LSTM/Informer/regime training, no calibration, no
|
|
AUC/PF/profitability/backtest/parameter optimization.
|
|
```
|
|
|
|
## K. Tickstory/Dukascopy
|
|
|
|
```text
|
|
DEFERRED. Future order: SAME SOURCE runtime<->research parity -> valid
|
|
Candidate Setup population -> P3-S.17 re-audit -> only then independent
|
|
data-source robustness study.
|
|
```
|
|
|
|
## L. Final Verdict
|
|
|
|
```text
|
|
PARITY ACHIEVED WITH CAVEATS
|
|
```
|
|
|
|
## M. Next Authorized Phase
|
|
|
|
```text
|
|
P3-S.17R.2 (or P3-S.17R.1 follow-on):
|
|
Vectorize CHoCH/OB/FVG detection kernels -> re-run the staged parity on the
|
|
COMPLETE 194,985-bar scope -> P3-S.17 re-audit on the reconciled full
|
|
population -> only then consider P3-S.18 baseline readiness.
|
|
```
|
|
|
|
## N. Explicit Prohibitions for Next Phase
|
|
|
|
```text
|
|
- NO MQL5 runtime changes
|
|
- NO Candidate Setup redesign
|
|
- NO F2/F3 semantic changes
|
|
- NO ML training
|
|
- NO optimization
|
|
- NO Tickstory/Dukascopy source substitution
|
|
- NO P3-S.16 label contract changes
|
|
```
|
|
|
|
---
|
|
|
|
*P3-S.17R.1 is officially CLOSED. Next authorized phase: full-scope
|
|
vectorization + P3-S.17 re-audit (NOT training).* |