# Production & Recipe Foundation v45

v45 adds the first production domain while keeping the existing immutable inventory ledger as the stock source of truth.

## Included
- `sale_recipe` and `production_recipe` types.
- Versioned recipes with one active version per recipe.
- Normal catalog variants as ingredients; this also permits a produced/sub-recipe variant to be consumed by another recipe.
- Yield quantity, ingredient waste percentage, effective dates and activation history.
- Production batches linked to one active recipe version and warehouse.
- Immutable `production_out` material movements and `production_in` finished-output movements.
- Material snapshots and output snapshots.
- Direct-material costing using current ingredient WAC at posting time.
- Finished unit cost = total consumed material cost / actual yield.
- Idempotent batch creation and idempotent posted-batch retry behavior.

## API
Under `/api/v1/production`:
- GET `/recipes`
- POST `/recipes`
- POST `/recipes/{recipePublicId}/versions`
- POST `/recipe-versions/{versionPublicId}/ingredients`
- POST `/recipe-versions/{versionPublicId}/activate`
- POST `/batches`
- GET `/batches/{batchPublicId}`
- POST `/batches/{batchPublicId}/post`

## Deferred
Labor/machine/utility overhead, explicit waste ledger posting, actual material overrides, lot inheritance for outputs, serial production, MRP/production orders, recursive BOM explosion, sale-time recipe depletion and modifier recipes remain later production work.
