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:
SnapOtter
2026-07-27 15:37:30 +08:00
committed by GitHub
parent bc32f86a07
commit d10d0f544f
855 changed files with 54564 additions and 13092 deletions
+18 -6
View File
@@ -1,8 +1,9 @@
---
description: "ローカル開発環境のセットアップ、コマンド、コード規約、そして SnapOtter に新しいツールを追加する方法。"
i18n_source_hash: cb03724d2829
i18n_provenance: human
i18n_output_hash: 8034bc92f69d
i18n_source_hash: 56acc1bf9a9b
i18n_provenance: machine
i18n_output_hash: 097bdc7a0a9e
i18n_hash_version: 2
---
# 開発者ガイド {#developer-guide}
@@ -11,7 +12,7 @@ i18n_output_hash: 8034bc92f69d
## 前提条件 {#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/)(ローカルの Postgres + Redis、コンテナビルド、AI 機能に必要)
- Git
@@ -32,10 +33,10 @@ pnpm dev
| サービス | URL | 備考 |
|----------|--------------------------|------------------------------------|
| フロントエンド | http://localhost:1349 | Vite 開発サーバー、/api をプロキシ |
| フロントエンド | http://localhost:1351 | Vite 開発サーバー、/api をプロキシ |
| バックエンド | http://localhost:13490 | Fastify API(プロキシ経由でアクセス) |
ブラウザで http://localhost:1349 を開きます。`admin` / `admin` でログインします。初回ログイン時にパスワードの変更を求められます。
ブラウザで http://localhost:1351 を開きます。`admin` / `admin` でログインします。初回ログイン時にパスワードの変更を求められます。
## プロジェクト構成 {#project-structure}
@@ -220,6 +221,17 @@ docker build -f docker/Dockerfile -t snapotter:latest .
DOCKER_BUILDKIT=1 docker build -f docker/Dockerfile -t snapotter:latest .
```
## リリースバージョンのドメイン {#release-version-domains}
SnapOtter には意図的に 3 つのバージョン ドメインがあります。リリース中に、あるドメインを別のドメインにコピーしないでください。
- アプリケーションのリリース バージョンには、ルート マニフェスト、すべてのプライベート ワークスペース パッケージ、および `APP_VERSION` が含まれます。 Semantic-release はこの値を提供し、`pnpm version:sync <version>` はアプリケーションのリリース前にすべてのワークスペースを更新します。
- OpenAPI `info.version` は、安定したパブリック API メジャー コントラクトです。すべてのローカライズされた仕様は、互換性のあるアプリケーション リリースでは `<major>.0.0` に残り、API 契約が新しいメジャー バージョンに移行する場合にのみ変更されます。
- `docker/feature-manifest.json` は、`imageVersion: 2.0.0` を不変のレガシー機能バンドル ストレージ エポックとして保持します。これらの v2 アーカイブ パスは、アプリケーション パッケージのバージョンではありません。正確な OCR はランタイム形式 v3 を使用し、アプリケーションのリリースの出所を個別に記録します。
`tests/unit/infra/release-version-policy.test.ts` はこれらの境界を強制します。新しいバージョンのドメインまたは移行では、その契約と関連するアーティファクトの移行設計を一緒に更新する必要があります。
独立した API およびレガシーバンドルの値は `config/release-version-policy.json` に存在します。アプリケーションのバージョン同期では、そのポリシー ファイルを暗黙的に書き換えてはなりません。
## 環境変数 {#environment-variables}
完全な一覧については [設定ガイド](/ja/guide/configuration) を参照してください。開発で重要なものは次のとおりです。