Replace default leaves with precipitation and procedural snowdrifts
This commit is contained in:
1 parent
2c17a52b5e
commit
c85876f1db
13 files changed
+329
-83
No files matched your search
@@ -24,7 +24,7 @@
|
||||
- Frontend regression: `node tests/browser/calculator.cjs` against a separately started isolated server at `http://127.0.0.1:8876` (override `BELKI_TEST_URL` only with another loopback URL). Use the remote test zone when exposed; it was unavailable on 2026-11-14. Playwright is test tooling, not a runtime dependency: use the bundled Node/Playwright returned by `load_workspace_dependencies`, setting `NODE_PATH` to its `node_modules` and optionally `CHROMIUM_PATH` to the browser executable. The suite closes its browser/contexts and intercepts weather and admin fixtures; real calculation requests require the normal Python dependencies.
|
||||
- For a local fallback, create a temporary venv and install existing `requirements.txt`, then launch `python -m app.main` with `BELKI_DATABASE_URL=`, `BELKI_HOST=127.0.0.1`, `BELKI_PORT=8876`, and temporary absolute paths for `BELKI_HISTORY_DB` and `BELKI_IDENTITIES_DB`. Never reuse production stores. `BELKI_SCREENSHOT_DIR` optionally saves browser screenshots outside Git. Stop the server and remove the temporary venv, SQLite files, caches and screenshots after review.
|
||||
- Browser coverage includes native radio arrow keys, report invalidation on edits/mode changes, delayed responses/double submissions, clipboard denial, dialog focus/Escape, section URLs/Back, both application entry points, admin filters/default sort and gallery. Keep API/data contracts intact: training points are a number, coaching kitten points are an array. Do not restore stale prepared reports when a calculation response arrives after an edit.
|
||||
- Weather easter egg: `python -m unittest discover -s tests -p test_weather.py -q` and `node --check web/weather-effect.js`; inspect `/belki` and `/admin` with rain/snow/mixed fixtures, mobile widths, reduced motion, and API failure. Prefer the remote test-zone MCP when exposed; otherwise use an isolated local server with temporary SQLite paths and stop it after validation. Keep screenshots outside the repo.
|
||||
- Weather easter egg: `python -m unittest discover -s tests -p test_weather.py -q` and `node --check web/weather-effect.js`; inspect `/belki` and `/admin` with none/rain/snow/mixed fixtures, mobile widths, reduced motion, and API failure. Preview zero/positive/unavailable snow cover and reload to inspect procedural drift variation. Prefer the remote test-zone MCP when exposed; otherwise use an isolated local server with temporary SQLite paths and stop it after validation. Keep screenshots outside the repo.
|
||||
- For CI-only changes, prefer a targeted YAML parse and a diff review.
|
||||
- For image/runtime changes, check the `Dockerfile`, Python entrypoint, static asset serving, and CI job together.
|
||||
- For Nginx upgrades, check `nginx -v` and `nginx -t` on the built gateway release. An isolated syntax check can resolve the Kubernetes hostname with `--network none --add-host belki-bot:127.0.0.1`.
|
||||
@@ -40,7 +40,8 @@
|
||||
- Trainer map ratings 0–7 are independent of verified values and hazard flags; `null` means no rating, `0` means no danger around the cell. Sound mode hides numeric facts and LU hints during play; simplified mode reveals the level of opened cells and the entrance. `audio.js` generates cues locally and starts playback only via an action or replay.
|
||||
- Keep the phone map below the scene on the same scrollable page. The safe start x1 y1 is not a transition; it can be revisited from an adjacent cell but does not count as opened or accept marks/ratings. Only the exit remains an impassable transition. The start has 0–2 neighboring hazards, x1 y2 at most 3 and x1 y3 at most 4. Apply those limits to generated hazards, not displayed values. The start number is visible in simplified mode and after the attempt.
|
||||
- LU checks (prefer remote test-zone MCP when exposed): Node 24 `node --test tests/lu-trainer/engine.test.mjs`; isolated Python `python -m unittest tests.test_lu_trainer tests.test_calculator_web -q`; `node --check web/lu-trainer/ui.js`; `node tests/browser/lu-trainer.cjs` with the same bundled Playwright, loopback server and temporary stores as the calculator suite. No npm install or runtime dependency is needed. Browser coverage includes 1920/1366/768/390 widths, mouse/touch/keyboard, map projection, clear/restart confirmation, result locks, hints/timers, 200% layout and failed images. Inspect screenshots outside Git. Nginx aliases must serve the same HTML and correct asset MIME types; do not deploy to validate a client-only change.
|
||||
- `app/belki/weather.py` reads only the fixed public ULLI raw METAR endpoint (3-second timeout, 64 KiB bound, 5-minute process cache, 1-minute failure cache). `/api/weather/ulli` exposes only decoration settings; shared CSS/JS live at `/api/weather/effect.css` and `/api/weather/effect.js` so the existing gateway `/api/` route handles them. Keep weather independent of reports/storage, skip trend/remark/vicinity groups, reject observations older than 2 hours, and retain leaves on failure. Do not disable TLS verification.
|
||||
- `app/belki/weather.py` reads only the fixed public ULLI raw METAR endpoint (3-second timeout, 64 KiB bound, 5-minute process cache, 1-minute failure cache). `/api/weather/ulli` exposes only decoration settings; shared CSS/JS live at `/api/weather/effect.css` and `/api/weather/effect.js` so the existing gateway `/api/` route handles them. Keep weather independent of reports/storage, skip trend/remark/vicinity groups, reject observations older than 2 hours, and keep the background empty on failure (`mode: none`). Do not disable TLS verification.
|
||||
- `app/belki/snow_cover.py` reads the fixed Climate Energy Saint Petersburg page; `/api/weather/snow-cover` returns `{available, depth_cm, observed_on}` from the newest dated total-depth column, including explicit zero. Cache 30 minutes / failures 5 minutes, timeout 4 seconds, payload cap 3 MiB; reject dates older than 2 Moscow calendar days. The owner selected total depth on 2026-11-24; “Свежевыпавший” changes density on that site, not depth. Footer SVGs generate 2–3 asymmetric wind-sculpted banks once per page load. Keep geometry stable across polling; positive depth scales height up to 144px, zero/unavailable hides drifts. Never execute upstream JavaScript or confuse unavailable with zero.
|
||||
- VK scheduler lives in `app/belki/vk_scheduler.py`; use `BELKI_DATABASE_URL` in production and `BELKI_HISTORY_DB` for local SQLite checks. Keep mailing disabled until an administrator explicitly enables a conversation and schedule.
|
||||
- VK Callback API and dialog durability live across `app/belki/vk_bot.py`, `app/belki/vk_callback.py`, and `app/belki/vk_scheduler.py`. The bot listens on callback port 8081; preserve `vk_dialog_states` and `vk_callback_events` when changing dialog steps, attachments, or event dispatch. Validate with `python -m unittest tests.test_vk_bot tests.test_vk_conversation -q`. Production uses `/api/vk/callback` on the existing public host and routes that exact path to the `belki-bot` Service.
|
||||
- The build job waits for the DinD daemon and runs `docker info` before building.
|
||||
|
||||
Reference in new issue
Block a user