46 lines
6.1 KiB
Plaintext
46 lines
6.1 KiB
Plaintext
from pathlib import Path
|
|
|
|
root = Path.cwd()
|
|
d = root / 'docs/hel-892/scail-document-evidence'
|
|
for name in ['run-dualloop-document.py','dualloop-document-server.py']:
|
|
text = (root/'e2e'/name).read_text().replace('dualloop','scail')
|
|
if name.startswith('run-'):
|
|
text = text.replace('== 139','== 140')
|
|
(root/'e2e'/name.replace('dualloop','scail')).write_text(text)
|
|
text = (root/'e2e/dualloop-document.mjs').read_text().replace('dualloop','scail')
|
|
text = text.replace("const names=[", "const names=['Wan2.1_SCAIL2_角色迁移_动作迁移_FOR循环长视频',")
|
|
text = text.replace('===139','===140').replace('===8627','===8822').replace('===252','===262').replace('139图8627','140图8822').replace('139图252','140图262').replace('old_one_hundred_thirty_eight','old_one_hundred_thirty_nine')
|
|
start = text.index(' check(b.counts.saved_fields===147')
|
|
end = text.index(' const notesBox=',start)
|
|
text = text[:start] + ''' check(b.counts.saved_fields===195&&b.comments.length===10&&b.boundaries.length===3&&b.zero_saved_nodes.length===32,`${width}195原条目/十注释/三子图/32空或缺保存`);
|
|
check(b.fields.every(f=>f.named_state==='missing'&&!('named_pointer'in f)&&!('named_value'in f))&&b.fields.filter(f=>f.scope==='root').length===39,`${width}无具名值且root39/internal156`);
|
|
check(b.node_bindings.length===139&&b.node_bindings.filter(x=>x.implementation_verified).length===111&&b.node_bindings.filter(x=>x.source_id.startsWith('unresolved-')).map(x=>x.node_id).sort().join(',')==='213:197,262:245'&&b.node_bindings.filter(x=>x.source_id==='unknown-no-version').length===23&&b.node_bindings.filter(x=>x.source_id==='subgraph-definition').length===3,`${width}111准确/两具体缺口/23未知/三宿主边界`);
|
|
check(b.sources.some(x=>x.id==='litegraph'&&x.file==='src/lib/litegraph/LICENSE'),`${width}同树内部LiteGraph许可`);
|
|
const source=JSON.parse(fs.readFileSync('docs/hel-892/scail-document-evidence/source-check.json'));
|
|
const node=n=>JSON.parse(b.flow.find(x=>x.startsWith(n+' 原节点完整保存 ')).split(' 原节点完整保存 ')[1]);
|
|
const edges=b.flow.filter(x=>x.includes(' 物理/边界记录 ')).map(x=>JSON.parse(x.split(' 物理/边界记录 ')[1]));
|
|
const expected=JSON.parse(fs.readFileSync('docs/hel-892/scail-document-evidence/expected-edges.json'));
|
|
check(b.counts.physical_edges===254&&edges.length===254,`${width}254条按scope物理与边界记录保留`);
|
|
check(field('264','expression').value==='ceil(a / (81 - 5))'&&field('355','value').value===false&&field('368:344','expression').value==='a-1',`${width}完整表达式与false原值`);
|
|
check(node('213:19').outputs[0].links.length===0&&node('262:227').outputs[0].links.length===0&&node('213:19').outputs[1].links.includes(124)&&node('262:227').outputs[1].links.includes(124),`${width}两采样普通输出为空且denoised124实际消费`);
|
|
check(node('213').properties.proxyWidgets.length===24&&node('262').properties.proxyWidgets.length===24&&node('368').properties.proxyWidgets.length===0&&['213','262','368'].every(n=>node(n).widgets_values.length===0),`${width}48条真实代理与三宿主空保存`);
|
|
check(field('262:253','batch_index').value===-1&&field('262:252','source_stats').value==='per_frame'&&field('213:114','previous_frame_count').value===5,`${width}负裁片/颜色统计/previous缓存完整保留`);
|
|
check(expected&&edges.every(e=>e!==null),`${width}独立端点证据存在且全记录可解码`);
|
|
''' + text[end:]
|
|
start=text.index(" for(const [phrase,label]of")
|
|
end=text.index(" await dialog.getByText('版本、",start)
|
|
text=text[:start]+''' for(const [phrase,label]of [['本图确有proxyWidgets','proxy'],['代理与后端支持必须分列','source-gap'],['root视频原链','video'],['真正LATENT入口与消费','latent'],['具体协议差异','protocol'],['root循环物理图','loop'],['第三定义按准确版本','boundary'],['两CreateVideo各保存','save']]){
|
|
const line=b.flow.filter(x=>x.includes(phrase)).sort((a,b)=>a.length-b.length)[0];assert.ok(line,phrase);await fixedCard.getByText(line,{exact:true}).first().evaluate(el=>el.scrollIntoView({block:'start'}));await page.screenshot({path:`${out}/${width}-${d.id}-${label}.png`});
|
|
}
|
|
''' + text[end:]
|
|
old="['129.position_0','232.position_3','187.position_0','212.expression','248.value','174.value','252.total','259.batch_index','268.chunk_overlap','274.audioUI','263.audio','273.image','209.prompt','245.save_output','245.videopreview','246.videopreview','171.noise_seed']"
|
|
new="['264.expression','201.position_1','30.image','346.value','355.value','213:3.text','213:114.previous_frame_count','213:197.object_indices','213:19.noise_seed','213:169.switch','262:253.batch_index','262:252.source_stats','262:259.video_frame_offset','262:258.text','368:344.expression','368:370.total','368:372.position_0']"
|
|
assert old in text
|
|
text=text.replace(old,new).replace('// Local GET-only:147 entries/6 Notes/45 exact/2 bounded unresolved/56 unversioned aliases.','// Local GET-only:195 entries/10 Notes/111 exact/2 bounded unresolved/23 unversioned/3 boundaries.')
|
|
(root/'e2e/scail-document.mjs').write_text(text)
|
|
f=d/'finalize.py'; text=f.read_text();start=text.index(' histories = []');end=text.index(' write(\n "rendered-text-sha256.json"',start);text=text[:start]+text[end:]
|
|
text=text.replace('len(texts) == 6 and len(doc["source_notes"]) == 6','len(texts) == 10 and len(doc["source_notes"]) == 10').replace('history_nested_types_checked=True','per_value_types_checked=True').replace('accurate_nodes=45','accurate_nodes=111').replace('unknown_nodes=56','unknown_nodes=23,\n boundary_hosts=3').replace('saved_entries=147','saved_entries=195').replace('notes=6','notes=10').replace('old_fixed_blocks=138','old_fixed_blocks=139').replace('GET/export and147','GET/export and195').replace('6 Notes and complete','10 Notes and complete')
|
|
start=text.index(' findings=');end=text.index('\n ),',start)
|
|
text=text[:start]+''' findings="代表截图实际查看;三定义/48代理/两denoised消费/准确来源缺口/十完整注释以DOM与SHA复核;长文不称逐字目验,无溢出,未改CSS/字体。",'''+text[end:]
|
|
f.write_text(text)
|