import json

c624 = {
  "candidate_id": "candidate_2026-06-09T00-30-00Z_long_liquidity_sweep_reversal",
  "timestamp": "2026-06-09T00:30:00Z",
  "decision": "rejected",
  "reason": "H4 downtrend context (from 4475 high down to 4250s). Price bounced slightly to 4323 but chopped at 4317-4320 range for hours. No clear sweep and reversal pattern on M5; chop zone, no momentum entry trigger.",
  "htf_context": "H4 aggressive downtrend structure playing out (recent high 4475 -> low 4268 -> lower high 4346 -> making way to lower lows).",
  "m30_structure": "Consolidation/chop near 4320 after a move down.",
  "m15_m5_execution": "M5 shows tight chop between 4315-4323 from 23:30 to 01:30. Long entry here lacks momentum and structure break.",
  "entry": None,
  "stop": None,
  "target": None,
  "r": None,
  "promoted_to_journal": False
}

c625 = {
  "candidate_id": "candidate_2026-06-09T03-15-00Z_short_liquidity_sweep_reversal",
  "timestamp": "2026-06-09T03:15:00Z",
  "decision": "rejected",
  "reason": "M5 popped up to 4342 (03:15) but did not form a strong rejection/reversal for a short. Continued higher towards 4351 later in the session. No valid short setup triggered.",
  "htf_context": "H4 overall downtrend, but currently in a retracement/pullback phase up from 4312 low towards 4351.",
  "m30_structure": "Rallying from 4312 consolidation upwards.",
  "m15_m5_execution": "M5 pushed to 4342 at 03:15, chopped, then made higher high to 4351 at 05:40. Shorting at 03:15 would have been premature/stopped out.",
  "entry": None,
  "stop": None,
  "target": None,
  "r": None,
  "promoted_to_journal": False
}

c626 = {
  "candidate_id": "candidate_2026-06-09T05-15-00Z_long_liquidity_sweep_reversal",
  "timestamp": "2026-06-09T05:15:00Z",
  "decision": "rejected",
  "reason": "M5 dipped to 4324 at 04:30 then rallied to 4351 at 05:40. At 05:15 price was already at 4333 mid-rally. Buying here is chasing the move; best entry was 04:30 dip.",
  "htf_context": "H4 retracement phase in a broader downtrend.",
  "m30_structure": "Bullish structure on LTF as it pulls back up.",
  "m15_m5_execution": "Price dropped to 4324 at 04:30 (possible sweep), then rallied aggressively to 4351. At 05:15, price is at 4333 and pushing up. Buying at 05:15 is chasing, poor R:R.",
  "entry": None,
  "stop": None,
  "target": None,
  "r": None,
  "promoted_to_journal": False
}

results = [c624, c625, c626]
with open('hybrid/reviews/manual_replay_results/replay_result_00624_00627.json', 'w') as f:
    json.dump(results, f, indent=2)

with open('hybrid/reviews/manual_replay_progress.json', 'r') as f:
    prog = json.load(f)

prog['cursor']['next_index'] = 627
prog['cursor']['processed_count'] = 627
prog['cursor']['rejected_count'] += 3
prog['cursor']['last_candidate_id'] = c626['candidate_id']

import datetime
prog['cursor']['last_updated'] = datetime.datetime.utcnow().isoformat() + "Z"

with open('hybrid/reviews/manual_replay_progress.json', 'w') as f:
    json.dump(prog, f, indent=2)

print("done")
