From cc8a76cdef8efb0c57015426b535311d715f9b56 Mon Sep 17 00:00:00 2001 From: Erik Date: Mon, 6 Jul 2026 11:14:22 +0200 Subject: [PATCH] =?UTF-8?q?docs:=20README=20=E2=80=94=20data=20is=20wired?= =?UTF-8?q?=20to=20live=20MariaDB=20(was=20"currently=20SAMPLE")?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The overview API reads live MariaDB since 2026-07-02; sample:true is only the standalone dev fallback. Replaced the "wire it (TODO)" section with the live column sources + resolved the notVerladen open question. Co-Authored-By: Claude Opus 4.8 (1M context) --- README.md | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index feaea0f..dd1ad3c 100644 --- a/README.md +++ b/README.md @@ -99,23 +99,18 @@ figures — presses / on-the-way / oven are always real-time. } ``` -### Wiring the REAL data (currently SAMPLE) +### Live data wiring -`api/routes.py` returns sample data today. To make it live (see the big `TODO` there -and `.claude/memory/temper-line-overview.md` in the gateway): - -- Import the kernel proxy: `from .._db import run_select_query` (read-only). -- Reuse the temper status-derivation in `modules/fastpress/press/temper.py` - (`_temper_aggregates_all` derives on-way / in-oven / finished from planned - timestamps vs `NOW()`), un-scoped across **all** presses. Read - `production.temper_tracking` (carts grouped by `ttCartId`, keyed by origin press - `ttPress`) + `production.active_orders`/`finished_orders`. -- `notVerladen` = produced good parts (cycles) − parts logged to temper. **Open - question:** per-press or plant-wide? -- Scope `finished` by `range` on `ttOutOfOvenAt`. Never echo customer/price fields. - -Alternatively, add a public `GET /press/temper/overview` in fastpress and have the -frontend call that — decide before wiring; keep the payload shape above either way. +`api/routes.py` reads live MariaDB (`sample:true` only appears in the standalone +dev fallback with no backend). Details + the exact column sources are in the gateway +memory `.claude/memory/temper-line-overview.md`. In short: it uses the kernel proxy +`from .._db import run_select_query` (read-only), un-scoped across **all** presses for +plant `PLANT_NAME` — press list from `press_settings.presses`; good/chips from +`active_orders`+`rejects`; run/stop/idle from `cycles_new` recency; carts + +`notVerladen` from `production.temper_tracking` with position derived in SQL from the +planned timestamps vs `NOW()` (reprints excluded). `finished` is scoped by `range` on +`ttOutOfOvenAt`. Oven temperature is omitted (no sensor). Never echo customer/price +fields. ---