Files
praxisandClaude Fable 5.2 45ecd73fe0 Evidence records
1888 files, from working commit b1a079a.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-19 01:32:48 +02:00

26 lines
1.9 KiB
Python

import sys,json,hashlib,struct
from pathlib import Path
sys.path.insert(0,'ops')
from item_effect_compat import compose_consumable_links,effective_item_links,TABLES,DBD,NATIVE
from item_sparse_compat import fields,check_db2
out=Path('runtime/buff-cooldown-reproduce-20261019');out.mkdir(exist_ok=True);cat=Path('runtime/catalog-items-20261018/catalogue-full-curves');pins={}
def read(p):
raw=p.read_bytes();pins[str(p)]=hashlib.sha256(raw).hexdigest();return json.loads(raw)
p=read(Path('runtime/ale-consumable-links-20261019/package.json'));e=read(Path('runtime/octo-forever-item-effects.json'));l=read(Path('runtime/octo-forever-item-effect-links.json'));existing={r['ItemID']for r in effective_item_links(l,p['rows'])}
m=read(cat/'manifest.json');items=[]
for f in m['files']:
if not f['path'].startswith('items-'):continue
rows=read(cat/f['path']);assert pins[str(cat/f['path'])]==f['sha256']
for r in rows:
s=r['source']
if r['entry']in existing and s['class']==0 and s['spellid_1'] and s['spelltrigger_1']==0 and s['spellcharges_1']==-1:items.append(r)
schemas={t:fields(DBD/(t+'.dbd'),layout,n)for t,(_,layout,n)in TABLES.items()};maxima={}
for t,(table,layout,n)in TABLES.items():
check_db2(NATIVE/(t+'.db2'),table,layout);maxima[t]=struct.unpack_from('<I',(NATIVE/(t+'.db2')).read_bytes(),164)[0]
r=compose_consumable_links(p,items,{i['source']['spellid_1']for i in items},e,l,schemas,maxima,{'slots':{}},refresh_cooldowns=True)
package=r.pop('package');r['added_count']=len(r.pop('added'));r['inputs']=pins;r['package_rows']=len(package['rows']);r['scope']='Existing exact spell/slot/charge/trigger identities only. Correct source item timings; no spell execution semantics changed.'
for name,value in [('package.json',package),('cooldown-report.json',r)]:
from item_batch_stage import json_bytes
(out/name).write_bytes(json_bytes(value))
print({k:r[k]for k in ('selected','preserved','added_count','package_rows')});print('blocked',len(r['blocked']))