okami.mom/strata

git clone https://git.nkp.pet/okami.mom/strata

albedocmake: strata_kernels links strata_kernels_cpu (iq_kernels.cu reads the latent colscale table from expert_layout.cpp; strata-q36ref failed to link)a4af4df61

main
4 files

files

AGENTS.md451 B
README.md916 B
acceptance.test.ts2.3 KiB
orders.ts1017 B

Refactor the working summarizeOrders implementation without changing its public exports, behavior, error type, or input immutability. Extract validateOrders into validation.ts and aggregateOrders into aggregation.ts. Keep exported Order and Summary types in orders.ts. orders.ts must import and call both helpers; avoid copying their implementations back into summarizeOrders. validateOrders returns new records with trimmed customer names and rejects invalid records (including cancelled records) with RangeError. aggregateOrders accepts validated records, ignores cancelled ones, groups by customer, sums priceCents*quantity and quantities, and returns summaries sorted by customer using code-point order. Both helpers must be exported and must not mutate input. Only orders.ts, validation.ts and aggregation.ts may be changed/created. No packages needed. Run node --test acceptance.test.ts; do not change tests.