import json

progress_file = '/home/aryy/.hermes/profiles/finance/backtests/xauusd_2026/hybrid/reviews/manual_replay_progress.json'

with open(progress_file, 'r') as f:
    data = json.load(f)

# The new batch has 3 items, all needs_more_context
data['cursor']['next_index'] += 3
data['cursor']['processed_count'] += 3
data['cursor']['needs_more_context_count'] += 3
data['cursor']['last_candidate_id'] = "candidate_2026-01-05T04-15-00Z_long_liquidity_sweep_reversal"

# Append the new result file to the first run (or active run)
data['runs'][0]['result_files'].append("hybrid/reviews/manual_replay_results/replay_result_00009_00012.json")
data['runs'][0]['decision_counts']['needs_more_context'] += 3

with open(progress_file, 'w') as f:
    json.dump(data, f, indent=2)

print("Cursor updated.")
