Rebuild printable roast plans and remove machine-based adjustments
Test and deploy / test-and-deploy (push) Successful in 2m28s

This commit is contained in:
snowspeeder committed 2026-09-05 14:56:11 -04:00
1 parent e9f2393c96
commit 824a964f9d
30 files changed
+1721 -908

No files matched your search

+32 -14
View File
@@ -9,7 +9,7 @@ A fillable, live-computing web version of the manual coffee roast plan worksheet
worksheet field IDs using the same reference tables as the paper worksheet. It never
invents a first-crack anchor or a modifier — those only ever come from the reference
tables, keyed off what the page actually states.
- **Reference curve from an Artisan `.alog`** — upload a real roast log (or browse a local
- **Reference curve from an Artisan `.alog`** — upload a real roast log (or browse an administrator-only local
library directory) to overlay its actual milestones/curve on the same SVG grid as your
plan, dashed and in a different color.
- **Finished-roast log with Pi agent review** — upload one or more finished Artisan `.alog`
@@ -23,11 +23,9 @@ A fillable, live-computing web version of the manual coffee roast plan worksheet
percolation / espresso & pressure — 13 methods), recipe fields (dose, water/yield, auto
ratio, grind, temp, times), a 0–10 rating, and tasting notes. Bean remaining weight is
derived from logged brew doses. Green inventory's lot form also prefills from a URL.
- **Plan chat + learned roaster behavior** — an "Ask the LLM" drawer on the planner chats
about the open plan, grounded in the computed ledger, the learned pace profile, and a
roaster-behavior profile (`/api/roaster-profile`) aggregated from every uploaded .alog
(turning-point lag, phase RoR, median milestone temps). The same profile feeds roast
reviews and supplies the planner curve's fallback milestone temps.
- **Plan chat and roast history** — plan chat uses the open plan and computed ledger.
Roasters organize uploads and show descriptive statistics; roaster selection, learned pace,
and historical temperature medians never modify plan timing or temperature suggestions.
- **API + tokens + Swagger** — every capability (including admin) is a JSON endpoint,
documented by a hand-authored OpenAPI 3 spec at `/api/openapi.json` and a self-hosted
Swagger UI at `/api-docs`. Users generate bearer tokens (`rpt_…`) on the Account page;
@@ -43,11 +41,18 @@ A fillable, live-computing web version of the manual coffee roast plan worksheet
`scripts/generate-academy-audio.mjs` (reads `AZURE_VOICE_KEY`/`AZURE_VOICE` from `.env`,
region eastus — run it locally after editing lesson scripts; production never needs the
key). Slides carry display transcripts as captions and phonetic respellings for the voice.
- **Live ledger** — the worksheet's time-ledger math (first crack, yellow, Maillard,
development, drop, and the four sanity-check ratios) recomputes as you type, using the
exact same arithmetic as the paper worksheet (verified against both its worked examples).
- **Print** — bakes typed values into the print layout and reuses the paper worksheet's
print CSS, so `File > Print` produces the same 2-page front/back sheet.
- **Live ledger** — shared timing math with explicit manual corrections, invalid-duration
checks, density-unit warnings, and a direct development override. Light-roast modifier
suggestions have a disclosed 1:15 floor; an explicit override takes precedence.
- **Printable report** — preview, print, or download a standalone HTML file in grams and
Fahrenheit. Includes an annotated smooth SVG curve, phase durations, milestone cues,
separate preheat fields, actuator schedule, and roast/cup record. Blank temperature inputs
use an illustrative reference (not a calibrated prediction); entered readings are preserved.
Local Node development requires Node 22.19 or newer (Docker uses Node 24).
Product-page fetching accepts public HTTPS destinations on port 443, validates every DNS
answer and redirect, pins the socket address, and keeps a deadline through body streaming.
The former Browserless fallback is removed because it could bypass these network protections.
## Run it
@@ -96,9 +101,8 @@ simply as "the LLM".
(served statically at `/shared/`). This is the single source of truth for the ledger math,
time parsing, and reference data tables — never duplicate this logic in `server/` or `public/js/`.
- `server/` — Express routes: `/api/prefill`, `/api/alog`, `/api/alog/library[/:filename]`.
- `public/` — the static frontend: `index.html` (the worksheet as a form), `worksheet.css`
(a verbatim copy of the paper worksheet's print CSS — port changes from there, don't
hand-edit divergently), `app.css` (screen-only chrome + form-control styling), `js/`.
- `public/` — the static frontend: `index.html` (planning form), `app.css` (screen UI), and `js/`.
`shared/report.js` owns the standalone/print report. `worksheet.css` is a legacy asset.
## Where the reference numbers come from
@@ -113,3 +117,17 @@ If those tables change in the paper worksheet, port the change here too.
- Roastetta (roastetta.com) integration is intentionally out of scope — it needs a headed,
Cloudflare-clearing browser and the operator's own credentials. Use the `.alog` file picker,
or point `ALOG_DIR` at wherever the `roastetta` skill already downloaded files.
## Regression checks
`npm test` includes account ownership, authorization, persistence, parsing, planner/report,
URL-fetch security, and Docker startup/migration checks. For the Chromium interaction check:
```sh
npx playwright install chromium
npm run test:browser
```
The browser check covers Fahrenheit/Celsius round trips without deleting inputs, the report
preview, standalone download, and print-only layout. It runs separately from the default test
suite so production CI does not require installing a browser.