Skip to content

Packvium 1.4.0

Choose a tag to compare

@github-actions github-actions released this 27 Sep 21:05
· 7 commits to main since this release
8b95a37

Replanning a job that has already started, and container ids that match the other engines.
A request the schema never allowed is now refused instead of packed (see Fixed).

Added

  • fixed_placements in a request. Each entry pins an item type to a container type and
    instance, at the origin a result reports, in one orientation. Fixed items keep their place,
    count toward weight, support and top load, and come back marked fixed: true. A fixed set
    that is not a valid packing on its own throws FixedPlacementError before any search.
  • @packvium/engine/revisions.js — rootRevision, deriveRevision, applyEvents,
    verifyRevisionChain, documentDigest and canonicalRevisionJson, with TypeScript
    declarations. A packvium-plan-revision/v1 chain records what happened on the dock —
    item_missing, container_substituted, placement_locked, placement_verified — against
    the artifact it changed, linked by SHA-256 from node:crypto, and carries the request the
    next plan solves. Every Packvium engine computes the same bytes from the same inputs.
  • InvalidRequestError, exported from the package root. A malformed request names what is
    wrong: code is invalid_request, reason one of a closed set (missing_field,
    wrong_type, below_minimum, above_maximum, negative_measure, invalid_unit,
    duplicate_id, not_allowed, invalid_value), field the JSON Pointer of the bad value, and
    the message reads invalid_request: /items/0/quantity: must be at least 1. It extends
    RangeError, so existing handlers still catch it; FixedPlacementError extends it. The native
    and JavaScript backends raise the same error.
  • examples/revisions.mjs.

Changed

  • Container ids number each type from 1. Searches over more than one container type counted
    containers across types, so a crate opened after a box was crate#2 where the other engines
    said crate#1. Only answers with more than one container type change, and only their ids.

Fixed

  • Numbers below their floor are refused. The JavaScript engine packed requests with
    negative lengths, weights, payloads, clearances and obstacle positions, and with quantities,
    limits and ratios below their minimum, and raised a max_candidate_points below 16 to 16
    without saying so. Each now throws a RangeError naming what is wrong.
  • A fixed_placements that is not the schema's shape throws FixedPlacementError. An
    object in place of the list was ignored, so the items it named were repacked elsewhere; a
    bad instance or orientation threw a bare RangeError.
  • A request key named __proto__ survives a revision as an ordinary key, instead of
    making the canonical writer refuse the document.