Repository navigation
Packvium 1.7.0
A rebuild on the 1.7.0 Rust core. Breaking: a refused call now throws a typed Error, not a
string. The reference validator joins the package, and quality looks ahead in its block solver.
No request or result field changes.
Added
validate(request, result)andMalformedResult. The reference validator, a promise of a
list of issues (code,detail), empty when the result is valid;MalformedResultfor a
result of the wrong shape.PackviumWasmModulegains an optionalvalidate_json. The
WebAssembly module grows by about 414 KB (148 KB gzipped) to carry it.InvalidRequestError,FixedPlacementError,UnsupportedFeatureErrorand
CommerceInputError, exported from both entry points with their types.
Changed
- Node 18 or later. The WebAssembly module uses reference types (
externref), which
Node 16 cannot instantiate. 1.6.0's module did too, so it never loaded on the Node 16 that
enginesand this README promised; both now say 18, and CI runs Node 18, 20 and 22. - A refused call throws an
Error, not a string. Breaking for code that tested
typeof error === 'string'or read the message as the thrown value. A refused request throws
InvalidRequestError(aRangeError) orFixedPlacementErrorwithcode,reason,field
anddetail; a field the engine does not implement throwsUnsupportedFeatureErrorwith
codeandfields; a commerce refusal throwsCommerceInputError. The message is the
engine's own sentence, unchanged. The classes are built as@packvium/engine's are:
new UnsupportedFeatureError(fields)takes the list of fields, not a message. - Every schema enum value is refused as
not_allowed. A value outside its list in
allowed_rotations, the output and dimensional-weight units,shape_type,
ground_contact_ruleorconfiguration.solversthrowsInvalidRequestErrorwith reason
not_allowedat its JSON Pointer. An unknown output unit was copied through;ticksas an
output unit is now refused, as the schema always said. qualitylooks ahead in the block solver, completing its leading blocks greedily
and committing the best, so the answer is never worse than the greedy pass. Under a tight
effort budget the block start can now reporttruncated/effort_limit.qualitydoes less work for the same answers. Its staged beam refines
the best greedy order instead of the first two, and extreme points scan the exposed corners
instead of every combination of placed faces. Measured on the native Rust build, no answer
changed with either: the first took 44% offquality's CPU on our benchmark, and the second
cut what was left to 42%.- Portfolio starts go to distinct item orders; a stacking scene that took two
containers now takes one. no_eligible_containeris reportedproven, andinsufficient_supportis reported
(observed) where the support rule is the only blocker.- A
nesting_heightnot below the item's height is refused asinvalid_valueat its
pointer, and with nooutputblock the result is written inunits.length's schema code.
Fixed
- A rejected
initis retried on the next call instead of cached, and the Node loader
imports a literal path. incompatible_tagsis applied item against item, not against container tags.