8a437d0c4b
CI / check (push) Failing after 56s
Cancel a misprinted/test/wrong-vehicle ticket via a SIGNED `void` event — the
vehicle_entry is never edited/deleted (append-only). VoidFlow appends void{
voidedEntryRef, voidReason, operator, reasonCode:"void.ticketCancelled" }; route
POST /api/tickets/void gated event:void + open shift; reason REQUIRED. Refuses a
subscription / already-exited / already-voided / paid ticket (refund out of scope).
The void folds the session CLOSED everywhere it's counted — occupancy (count +
reserved spots), pay-station (lookup/activeSessions), exit-flow (#sessionFor), and
reports (excluded from entries) — so a voided car stops occupying a spot, can't be
paid/exited, and doesn't inflate "cars entered". No barrier action. Booth UI: a
"Cancel ticket" action in the pay/exit lookup modal (transient + unpaid + open;
gated on event:void) with a preset-or-free reason prompt.
Reclassify the Live feed: refused-action events (exitRefused/entryRefused/
permitRefused — e.g. a double card-scan, at-capacity subscriber, exit on a closed
session) are benign warnings, not red anomalies. event-detail.tsx now shows them as
amber REFUZUAR/REFUSED, reserving red ANOMALI for genuine red-flags. Display-only —
no ledger change, so historical events reclassify too.
CI: install uv + sync vision deps before the Turbo run. @parking/vision's lint/
typecheck/test shell to `uv run …`, but CI set up only Node+pnpm, so `uv run ruff`
failed ("uv not found") and broke the whole Turbo run. The Python checks pass once
uv provisions the toolchain.
- new: void-flow.ts (+ tests, 8) ; occupancy void-fold test
- shared: reason code void.ticketCancelled ; both web catalogs (sq/en parity)
- wiki: parking-session (ticket-void folds + guards, refused/anomaly split), log
Claude-Session: https://claude.ai/code/session_01Xcm6ikLgGoCxxHrxtjkk5V
55 lines
1.9 KiB
YAML
55 lines
1.9 KiB
YAML
name: CI
|
|
|
|
# Lint/typecheck/test the whole Turborepo on every push/PR to dev. Mirrors the
|
|
# house pattern (cf. trm/processor): setup-node + corepack pnpm + frozen install.
|
|
# No Docker, no signing — pure checks. The desktop bundle is a separate, tag-only
|
|
# pipeline (see release.yml).
|
|
|
|
on:
|
|
push:
|
|
branches: [dev]
|
|
pull_request:
|
|
branches: [dev, main]
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
check:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Node 22
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 22
|
|
|
|
- name: Enable pnpm
|
|
# Pin to the repo's packageManager version (pnpm 10), not latest.
|
|
run: corepack enable && corepack prepare pnpm@10.24.0 --activate
|
|
|
|
- name: Install dependencies
|
|
run: pnpm install --frozen-lockfile
|
|
|
|
- name: Set up uv (Python toolchain for @parking/vision)
|
|
# The vision service is a Python package wired into the Turbo graph via a
|
|
# package.json shim; its lint/typecheck/test scripts shell to `uv run …`. CI
|
|
# has no Python by default, so `uv run` would fail with "uv: not found" and
|
|
# break the whole Turbo run. uv provisions the pinned Python (.python-version)
|
|
# itself. See wiki/decisions/vision-service-packaging.md.
|
|
uses: astral-sh/setup-uv@v5
|
|
|
|
- name: Sync vision deps
|
|
# Light deps + the dev group (ruff/mypy/pytest) only — NOT the optional `alpr`
|
|
# extra (heavy onnx/model stack), which isn't needed to lint/typecheck/test.
|
|
working-directory: apps/vision
|
|
run: uv sync --frozen
|
|
|
|
- name: Build + lint (Turbo)
|
|
# Covers tsc typecheck, vite build, i18n catalog type-parity (a missing sq/en
|
|
# key fails the build), AND the vision service's ruff lint via uv.
|
|
run: pnpm turbo run build lint
|
|
|
|
- name: Test
|
|
run: pnpm turbo run test
|