# Brewing units workflow storyboard

Open [the 45-screen storyboard](index.html). Images are embedded; no server is required. Original captures are in `screenshots/`, with assertions, capture times and temporary routes in `frame-*.json`.

The checks exercise the local working tree and its single conversion-factor input. Test fixtures are fictional and transactional, using `barcodes_test_agent` and its workers. Development and production customer records were not edited. Captured fixture URLs do not reopen those records on the development server.

## Results

- Refreshed captures and current editor: 111 tests, 905 assertions, all passed. Every capture was retaken; frame 19a adds recorded-use navigation.

- Browser acceptance and related regressions: 41 tests, 579 assertions, all passed.
- Focused models, services, controllers and components: 327 tests, 2,066 assertions, all passed.
- JavaScript controllers: 14 tests, all passed.
- Migration and database constraints: 3 tests, 16 assertions, all passed.
- Post-fix amendment checks: 33 tests, 211 assertions, all passed.
- Gallery verification: all 45 images, chapter filters, enlargement, keyboard controls and responsive layout passed.
- RSpec: 103 examples, no failures, 2 pending.
- Latest raw-material editor/reference-link recheck: 103 tests, 707 assertions, all passed.
- Final full Minitest suite: 5,997 tests, 37,756 assertions, no failures or errors, 36 skips. The initial run had 14 matching baseline failures; these no longer appear after the concurrent working-tree updates. [Initial comparison](logs/baseline-comparison.json), [final output](logs/full-suite.log).

Two edits to the brewing-units partial and raw-material controller tests landed during the original full-suite run. The refresh reran every storyboard scenario and all 103 controller checks against the current application, passing 111 tests and 905 assertions. `tested-source-sha256.json` identifies the version at the start of the full run; changed paths are recorded in `verification.json`.

Runs overlap; their counts should not be added together. Exact commands and output are in [verification.json](verification.json) and `logs/`.

Configuration, explicit legacy-recipe conversion, brewhouse execution, fermenter additions, bright-tank additions, brink execution and inventory amendments are submitted through the browser. Fixture preparation, purchased-yeast knockout, substitutions and undo use the application services; captions identify those transitions. Each stock-moving scenario asserts the resulting database quantities.

QA caught and fixed an inventory-amendment unit error. The screen displayed 625,000 mg as 625,000 mL because it reused the brewing source unit. `InventoryAmendmentItem#input_unit` now retains source units only within the inventory category and otherwise uses the purchasing default. The corrected browser form shows 0.625 kg; submitting 0.5 kg updates the brewing source to 400 mL and leaves 1.5 kg in stock. The new regression failed before the fix. Same-category gram sources still use grams. [Before-fix capture](findings/amendment-before.png), [regression before](logs/amendment-before.log), [post-fix checks](logs/amendment-after.log).

The updated editor's Saved/Reset controls and click-to-select behaviour are covered in frame 03a. Used conversions appear as fixed values. A long decimal can still be clipped horizontally while editing; its exact value is retained and also shown in the saved-value note when changed.

The browser checks declare their desktop viewport and avoid opening the already-selected Details view twice. The movement-filter check clears the prior tab's retained lot selection before expecting both lots. These test-state corrections do not change application behaviour.

## Reproduce

From the BrewKeeper repository, build JavaScript before browser checks:

```sh
mise exec ruby@3.2.8 -- yarn build
mise exec ruby@3.2.8 -- env BK_TEST_DATABASE=agent PARALLEL_WORKERS=1 BK_STORYBOARD_OUTPUT="$PWD/docs/reports/brewing-units-2026-11-08" bin/rails test test/system/production/brewing_units_storyboard_test.rb test/system/production/brewing_units_test.rb test/system/production/raw_material_lot_panel_test.rb test/system/production/japanese_units_test.rb test/system/purchasing/custom_unit_equivalents_test.rb
bin/rails-test-agent test test/migrations/store_brewing_conversion_basis_test.rb
node --test test/javascript/units_component_test.mjs test/javascript/production_brewing_amount_test.mjs test/javascript/product_select_test.mjs
BK_TEST_DATABASE=agent mise exec ruby@3.2.8 -- bundle exec rspec
bin/rails-test-agent test
python3 docs/reports/brewing-units-2026-11-08/build.py
mise exec ruby@3.2.8 -- bundle exec ruby docs/reports/brewing-units-2026-11-08/verify_gallery.rb
```

Without `BK_STORYBOARD_OUTPUT`, the acceptance tests run without writing report artifacts. `build.py` renders the captured frames and recorded verification metadata; it does not run tests or update their recorded results.

Useful development pages are [raw materials](http://localhost:3000/production/raw_materials), [recipes](http://localhost:3000/production/recipes), [scheduling](http://localhost:3000/production/schedules), [brewhouse](http://localhost:3000/production/brewhouse), [cellar](http://localhost:3000/production/cellar), [yeast](http://localhost:3000/production/yeast) and [inventory amendments](http://localhost:3000/production/inventory_amendments).

## Publication

The refreshed site is published under `reports/brewkeeper/brewing-units-2026-11-08/` in `brewkeeper-files`, region `us-west-2`, using `bin/bk-files`. Every uploaded file uses `public=true` and `Cache-Control: no-cache`. Original captures and metadata are also available in `captures.zip`.
