feat: Montar takes Dropstar's dotted codes and reads the size from the file name
Some checks failed
Build and deploy / Validate source (push) Successful in 5s
Build and deploy / Publish images (push) Has been cancelled
Build and deploy / Secret scan and release gate (push) Has been cancelled
Build and deploy / Integration suite on a real stack (push) Has been cancelled

Codes like NX.226 and NX.1003 are allowed in the page, the API and the
stamps table (a dot anywhere but first). A file's own size is a dot and
its letter before .png (Marcus, 2026-11-16): NX.226.C.png is NX.226 in C,
so nobody renames the library. Montar takes the size asked for, else the
code without a size, else another size of it scaled (the closest larger
one, else the largest) and says which file it was made from; the DPI
warning still applies. The <code>-<size>.png form is no longer read.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Cauê Faleiros
2026-11-16 16:14:49 -03:00
parent c799fd9be4
commit 9de9b6abe1
4 changed files with 26 additions and 7 deletions

View File

@@ -0,0 +1,5 @@
-- Dropstar's stamp codes carry dots (NX.226, Marcus 2026-11-16); not as the
-- first character, as in app/api/stamps.py CODE.
ALTER TABLE dtf_local.stamps DROP CONSTRAINT IF EXISTS stamps_code_check;
ALTER TABLE dtf_local.stamps ADD CONSTRAINT stamps_code_check
CHECK (code ~ '^[A-Za-z0-9_-][A-Za-z0-9._-]{0,39}$');