test(corpus): guard where an Auto Nest problem nest's last sheet ends

An auto-nest baseline was a sheet count. A job that does not fill its
last sheet can get much worse without taking another one: N26-2CJ went
from ending at 75.2" to 62.1" on one sheet either way, so the corpus
would have passed a layout back at 75.2".

The baseline line may now also say where the last sheet ends,
"auto-nest: 1 sheets, ends 62.2": how far along the sheet's length its
material reaches, measured from the end the layout starts at, the same
figure in every quadrant. At the baseline's sheet count a layout ending
more than 0.05 past it fails; one ending sooner is reported with the
line to record. A line without "ends" checks the sheet count alone, and
older code reads the new line as its sheet count.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
ajandClaude Fable 5.2 committed 2026-11-20 09:17:50 -05:00
1 parent b137df8428
commit 97fc5be021
2 files changed
+133 -11

No files matched your search

+11 -1
View File
@@ -68,6 +68,15 @@ fewer sheets are only reported. Run it with `OPENNEST_PROBLEM_NESTS_CHECKS=auto-
naming only planner areas skips it, and the planning test skips nests guarding only `auto-nest`
and runs not at all for a filter naming only `auto-nest`.
A job that does not fill its last sheet can get worse without taking another sheet, so the line
may also say where that sheet ends: `auto-nest: 1 sheets, ends 62.2`. The end is how far along the
sheet's length the last sheet's material reaches, measured from the end of the sheet the layout
starts at (the right edge of a layout packed from the left; the same figure in every quadrant).
With the baseline's sheet count, a layout ending more than 0.05 past the recorded end fails; one
ending sooner is only reported, with the line to record. A line without `ends` checks the sheet
count alone. Every run prints each nest's end, and a missing baseline's failure prints the whole
line, the end rounded up to a tenth.
### Fill nests
`ProblemNests_FillNoWorseThanTheirBaselines` takes the nests whose `checks:` line names `fill`
@@ -122,7 +131,8 @@ Plates use their own cutting parameters. A plate without them uses line lead-ins
and which commit fixed it, if any.
3. Add a baseline line to the comments, with plate numbers counted from the first plate:
`planning: 1=NoSolutionWithinBudget 2=BestEffort`. An Auto Nest problem takes
`auto-nest: 2 sheets` instead, the sheet count Auto Nest reaches today, and a fill problem
`auto-nest: 2 sheets` instead, the sheet count Auto Nest reaches today (`auto-nest: 1 sheets,
ends 62.2` when the problem was how far a part-filled last sheet reached), and a fill problem
`fill: 1=33`, the part count each listed plate's fill reaches today (`fill (Strip): 1=33` for
a strategy other than Lattice). A fill plate must hold one drawing: the fill uses it.
To get the line, save without one and run the test: the failure prints the observed line.