from research import *
s=begin(956,'Whole-family cap prediction','Does one rule reproduce every SP pre-Noah lifespan?',{},['C953','C955','File18 §3.1.3'])
p=json.loads((ROOT/'model/sp_cap_inputs.json').read_text()); c=json.loads((ROOT/'model/sp_capacity_field.json').read_text())['capacities']; out=[min(a,b) for a,b in zip(p['baseline_lives'],c)]; expected=[930,912,905,910,895,847,365,720,653]; active=[i for i,(a,b) in enumerate(zip(p['baseline_lives'],c)) if a>b]
a=artifact('model/sp_cap_prediction.json',json.dumps({'lifespans':out,'active_rows':active,'tags':['inclusive cap' if i in active else 'ordinary life' for i in range(9)]},indent=2)+'\n')
finish(s,{'predicted_field':a,'lifespans':out,'clipped_names':[p['names'][i] for i in active]},'The source-qualified minimum reproduces all nine SP lives; only Jared, Methuselah and Lamech are shortened. This is a conditional reconstruction, not a historical direction claim.','Inspect slack and reduction across unchanged as well as changed rows.',{'all_rows':out==expected,'active_support':active==[5,7,8]})
