from research import *
from verify import verify_strategy_reviews,record_digest
s=begin(1428,'Check sequential coverage and review timing','Does the completed prefix retain reassessment and every due full Strategy review?',{},['journal.json','evidence/strategy_reviews'])
rows=[r for r in json.loads((ROOT/'journal.json').read_text()) if r['step']<=1427]
reviews=verify_strategy_reviews(rows)
r={'through':1427,'completed_prefix':len(rows),'review_checkpoints':[x['checkpoint'] for x in reviews],'every_action_has_reassessment':all(bool(x['reassessment'].strip()) for x in rows),'every_record_hash_valid':all(record_digest(x)==x['sha256'] for x in rows),'next_due_full_review':1431}
a=artifact('model/final_prefix_discipline.json',json.dumps(r,indent=2)+'\n')
finish(s,{'discipline':a},'The296-action prefix is contiguous, each action retains its reassessment, and all five due full Strategy reviews bind the correct completed checkpoints before the next action.','Confirm the user-requested outcome before the preseal replay.',{'prefix':len(rows)==296 and [x['step'] for x in rows]==list(range(1132,1428)),'reviews':r['review_checkpoints']==[1181,1231,1281,1331,1381],'hashes':r['every_record_hash_valid'],'reassessments':r['every_action_has_reassessment']})
