Check a saved acquisition-cost report
Extract the whole companion, then use Python 3.11 or later from the cost
folder. No package installation, account, key, scientific library or network
is needed for this saved-file route. Keep cost_report and _cost_backend
beside each other. The separate cut_plan_client.py starts a paid platform
job only when deliberately invoked; it is not needed for checking files.
Keep the original input JSON used for the cost run and the complete saved
REPORT object. The supported pair is report schema 2.0 / components 2.0.0, 2.1.0 or 2.1.1,
with objective: "acquisitionCost". Every original stock row, including zero
inventory, needs its explicit decimal-string price in stockUnitCosts.
The raw browser tools use a different contract and deliberately refuse these
files. Unknown versions are refused by this checker too.
For component 2.1.1, mandatoryStockCore may independently prove a checked finite core while spare rows stay unused. Whole geometry and original supplied amounts are checked first; the source flag is not a certificate. Read the numerical example and limits.
This companion supports exactly cost components 2.0.0, 2.1.0 and 2.1.1. Upgrade older strict checkers or API examples before deliberately starting a new cost-mode run. Keep original saved version fields unchanged.
From the cost folder:
python -m cost_report input.json report.json --cuts cuts.csv --stock stock.csv --uniform-proof --record checked-cost.html
Supply --cuts and --stock only when you want the corresponding CSV checked.
Each supplied CSV must match its own report exactly. --uniform-proof asks
for a separate complete replay when every finished piece has the same length.
Mixed lengths remain outside that replay; a supplied all-pattern dual can
still independently prove acquisition cost while leaving the raw/bar ties
unassessed. The checker never generates a new cutting layout.
Read the JSON verdict, not just the exit status. status: "verified" confirms
complete numerical layout and acquisition arithmetic. Source optimum flags
are displayed separately from independent proofs. A true source flag is not
accepted as proof. A cost proof does not prove the raw/bar ties or a unique
plan. A limited replay is unverified. A supported no_complete_layout result
does not become a feasible plan; its allocated amounts remain null.
Exit 0 means the supported saved numerical result was checked, including a no-plan report; it does not promise a complete layout or an optimum. Exit 2 means input, report, CSV, certificate or the new record path failed. Existing record paths are refused without changing them. Input/report JSON limits are 4 MiB; optional CSV limits are 1 MiB; each decoded input CSV is still 64 KiB. Repeated JSON names, nonfinite values, wrong prices and bad certificates fail.
Open the generated checked-cost.html in a browser to inspect or print all
cut coordinates, part codes, stock amounts and subtotals with independently
assessed proof wording. Keep the original files. Hashes bind their bytes,
not their creator, physical material or any actual purchase/saving. The checker
does not inspect billing. One common cost unit is assumed; no conversion, tax,
labour, offcut valuation or physical suitability is assessed.
Try an included control before your own files, for example:
python -m cost_report examples/mixed-500-costs/input.json examples/mixed-500-costs/report.json --uniform-proof --record my-example.html
This control verifies supplied acquisition amount 262.45, raw length 2998 and 250 bars. Independent cost proof completes; raw/bar ties remain unassessed. The twelve cost example folders are locally generated mathematical controls, not native run receipts, customer work or evidence of earnings.
Have two complete saved cost plans for the identical original job and row prices? Use the two-plan comparison guide to check both and retain their complete coordinates, separate proofs and exact B-minus-A differences.
Finite stock: a separate proof after geometry
A complete checked layout may establish that all positive finite stock is mandatory. Equal total lengths alone are insufficient. Read the argument and four complete local controls.