fix: C1/C2 simulate heights only, off the drawn packing, and skip the gap above 300 pieces (Rodada 5)
All checks were successful
Build and deploy / Validate source (push) Successful in 5s
Build and deploy / Integration suite on a real stack (push) Successful in 7m2s
Build and deploy / Secret scan and release gate (push) Successful in 6s
Build and deploy / Publish images (push) Successful in 56s

The simulations went through encaixar, so the browser test, which watches
the drawn packing, sometimes read a simulated one (failed 1 in 3), and
each simulation built the preview's masks: 0,5 s per run with 143 pieces.
alturaSimulada applies the same rule (same heights in every mode, checked)
in 155 ms; the test wrapper also passes the new mode through.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Cauê Faleiros
2026-11-30 15:38:26 -03:00
parent 35d508e561
commit 22239f21d8
2 changed files with 19 additions and 4 deletions

View File

@@ -132,7 +132,7 @@ try{
// Observe the actual engine, without replacing its placement or rendering.
await evaluate(`(()=>{
const original=encaixar;
encaixar=(pieces,width)=>{const result=original(pieces,width);
encaixar=(pieces,width,...rest)=>{const result=original(pieces,width,...rest);
if(pieces.some(p=>p.a))window.lastLayout={altura:result.altura,pos:result.pos.map(p=>({x:p.x,y:p.y,w:p.w,h:p.h,rot:p.rot}))};
return result;};
window.sendImage=async(type='image/png',drop=false)=>{