feat: add earned points calculator

This commit is contained in:
nyan404 committed 2026-08-25 13:32:33 +03:00
1 parent 8e4f461e8b
commit 9e3b50c967
7 files changed
+160 -5

No files matched your search

+1
View File
@@ -63,6 +63,7 @@
- 2026-08-25: fixed separator-free bulk parsing around time ranges, scoped web quick input to coaching, changed web inspection resources to `+N name`, corrected Russian inspection-count grammar, enabled VK image mirroring fallback, and added the standalone goal calculator mode/API.
- 2026-08-25: added the goal calculator to the VK menu as `/цель` and `/калькулятор`; the bot now runs the same goal calculation interactively with step prompts, choice buttons, and confirmation without report attachments.
- 2026-08-25: hardened the public goal calculator: point values must be finite, one session is limited to 1–1440 minutes, and one calculation to 1–50 kittens. The same validation is applied by the domain, JSON API, and VK dialogue, with regression tests for `NaN`, infinity, and excessive values.
- 2026-08-25: added the separate `points` calculator mode for earned points. It reuses the domain formulas without report identities or attachments; web and VK cover coaching, training, and inspections, with coaching results split between curator and up to three kittens.
- 2026-08-25: hardened public JSON and screenshot uploads. The web handler caps encoded JSON at 20 MiB before parsing, decodes at most 15 MiB of image bytes, accepts only PNG/JPEG/WebP signatures, rejects MIME mismatches, and strips path components from upload names. The public UI advertises the same supported formats.
- 2026-08-25: removed unused public web-profile endpoints and made `/api/resolve-identity` stateless for submitted pairs. A browser can fill its current inspection form, but cannot overwrite the persistent identity directory shared with VK users.
- 2026-08-25: persistent identity and profile pairs now require a non-empty name up to 100 characters and a positive integer ID. VK input and public identity lookup reject zero, negative, and boolean IDs before lookup or persistence.