mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
fix: release QA hardening across processing, media, security, and CI gates (#649)
A release-readiness QA pass over the whole product. The commits split into defects a user would hit and gates that were reporting green while measuring nothing. ## Fixes that change behaviour Rate limiting was bypassable on every install: TRUST_PROXY defaulted to true, so request.ip came from a client-set header and a forged X-Forwarded-For got past the login limiter. The default is now a private-network trust list. A transient Postgres outage stranded in-flight jobs, leaving finished output on disk with no row pointing at it. A reconciler now resolves those rows and adopts the bytes rather than dropping the work. A Redis connection that moved to a new address wedged every read-blocked consumer, so completions stopped signalling while health still answered 200. Socket timeouts plus subscriber pings recover it. Installing more than one AI bundle left the shared venv multi-versioned and silently broke three tools. The installer now reconciles distributions to one version each. Converting an image to JXL at quality 1 through 4 returned a 500, because libjxl 0.7 rejects the distance those values compute. The quality is floored at what the encoder honours. A missing ffmpeg was also reported to the user as a corrupt upload; it now says the engine is unavailable. RAW uploads reached an unpatched LibRaw on arm64, so it is built from source at 0.22.2, and the release scan was split so it can fail on an unfixed critical instead of hiding it behind ignore-unfixed. ## Gates that could not fail Two mutation lanes ran zero mutants because Stryker crawled the gitignored docs build; coverage discarded its whole report on any failing test; the lint gate skipped root tests, scripts, and two workspaces; and several generated matrices counted a host missing ffmpeg as a passing tool. Each now measures what it claims. Full evidence and the outstanding release items are tracked locally and are not part of this branch.
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
---
|
||||
description: "Lokalna konfiguracja środowiska developerskiego, komendy, konwencje kodu oraz jak dodać nowe narzędzie do SnapOtter."
|
||||
i18n_source_hash: cb03724d2829
|
||||
i18n_provenance: human
|
||||
i18n_output_hash: ed42eca006b5
|
||||
i18n_source_hash: 56acc1bf9a9b
|
||||
i18n_provenance: machine
|
||||
i18n_output_hash: 648dca93f9db
|
||||
i18n_hash_version: 2
|
||||
---
|
||||
|
||||
# Przewodnik dla programistów {#developer-guide}
|
||||
@@ -11,12 +12,12 @@ Jak skonfigurować lokalne środowisko developerskie i wnieść wkład w kod Sna
|
||||
|
||||
## Wymagania wstępne {#prerequisites}
|
||||
|
||||
- [Node.js](https://nodejs.org/) 22+
|
||||
- [Node.js](https://nodejs.org/) 22.22+
|
||||
- [pnpm](https://pnpm.io/) 9+ (`corepack enable && corepack prepare pnpm@latest --activate`)
|
||||
- [Docker](https://www.docker.com/) (wymagany dla lokalnego Postgresa + Redisa, budowania kontenerów i funkcji AI)
|
||||
- Git
|
||||
|
||||
Python 3.10+ jest potrzebny tylko wtedy, gdy pracujesz nad sidecarem AI/ML (usuwanie tła, skalowanie w górę, OCR).
|
||||
Python 3.11+ jest potrzebny tylko wtedy, gdy pracujesz nad sidecarem AI/ML (usuwanie tła, skalowanie w górę, OCR).
|
||||
|
||||
## Konfiguracja {#setup}
|
||||
|
||||
@@ -32,10 +33,10 @@ Uruchamia to dwa serwery developerskie:
|
||||
|
||||
| Usługa | URL | Uwagi |
|
||||
|----------|--------------------------|------------------------------------|
|
||||
| Frontend | http://localhost:1349 | Serwer dev Vite, przekazuje /api |
|
||||
| Frontend | http://localhost:1351 | Serwer dev Vite, przekazuje /api |
|
||||
| Backend | http://localhost:13490 | API Fastify (dostępne przez proxy) |
|
||||
|
||||
Otwórz http://localhost:1349 w przeglądarce. Zaloguj się przez `admin` / `admin`. Przy pierwszym logowaniu zostaniesz poproszony o zmianę hasła.
|
||||
Otwórz http://localhost:1351 w przeglądarce. Zaloguj się przez `admin` / `admin`. Przy pierwszym logowaniu zostaniesz poproszony o zmianę hasła.
|
||||
|
||||
## Struktura projektu {#project-structure}
|
||||
|
||||
@@ -220,6 +221,17 @@ Użyj montowań cache BuildKit dla szybszych przebudów:
|
||||
DOCKER_BUILDKIT=1 docker build -f docker/Dockerfile -t snapotter:latest .
|
||||
```
|
||||
|
||||
## Wydaj domeny wersji {#release-version-domains}
|
||||
|
||||
SnapOtter celowo ma trzy domeny wersji. Nie kopiuj jednej domeny do drugiej podczas wydania:
|
||||
|
||||
- Wersja aplikacji obejmuje manifest główny, wszystkie pakiety prywatnego obszaru roboczego i `APP_VERSION`. Semantic-release dostarcza tę wartość, a `pnpm version:sync <version>` aktualizuje każdy obszar roboczy przed wydaniem aplikacji.
|
||||
- OpenAPI `info.version` to stabilny publiczny kontrakt główny API. Wszystkie zlokalizowane specyfikacje pozostają w `<major>.0.0` dla zgodnych wydań aplikacji i zmieniają się tylko wtedy, gdy umowa API zostanie przeniesiona do nowej głównej wersji.
|
||||
- `docker/feature-manifest.json` utrzymuje `imageVersion: 2.0.0` jako niezmienną epokę przechowywania starszych pakietów funkcji. Te ścieżki archiwów v2 nie są wersjami pakietów aplikacji. Accurate OCR korzysta z formatu wykonawczego v3 i oddzielnie rejestruje pochodzenie wydania aplikacji.
|
||||
|
||||
`tests/unit/infra/release-version-policy.test.ts` wymusza te granice. Domena nowej wersji lub migracja muszą jednocześnie aktualizować tę umowę i odpowiedni projekt migracji artefaktów.
|
||||
Niezależne wartości API i starsze pakiety znajdują się w `config/release-version-policy.json`; synchronizacja wersji aplikacji nie może nigdy pośrednio przepisać tego pliku zasad.
|
||||
|
||||
## Zmienne środowiskowe {#environment-variables}
|
||||
|
||||
Pełną listę znajdziesz w [Przewodniku po konfiguracji](/pl/guide/configuration). Kluczowe dla developmentu:
|
||||
|
||||
Reference in New Issue
Block a user