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
@@ -1,5 +1,6 @@
---
// biome-ignore-all lint/correctness/noUnusedVariables: Astro template consumes frontmatter values.
// biome-ignore-all lint/correctness/noUnusedImports: Astro template consumes frontmatter imports.
import { TOOLS, toolSection } from "@snapotter/shared";
import * as lucideIcons from "lucide";
import { t } from "@/i18n";
@@ -1,5 +1,6 @@
---
// biome-ignore-all lint/correctness/noUnusedVariables: Astro template consumes frontmatter values.
// biome-ignore-all lint/correctness/noUnusedImports: Astro template consumes frontmatter imports.
import { t } from "@/i18n";
import { localizeHref } from "@/lib/i18n-page";
@@ -104,7 +104,7 @@ const aiPillColors = [
<svg class="h-4 w-4 shrink-0 text-danger" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<circle cx="12" cy="12" r="10" /><line x1="4.93" y1="4.93" x2="19.07" y2="19.07" />
</svg>
<span class="text-xs text-danger">{t(locale, "home.features.f1.noExternal")}</span>
<span class="text-xs text-danger-ink">{t(locale, "home.features.f1.noExternal")}</span>
</div>
</div>
</div>
+13 -4
View File
@@ -79,7 +79,8 @@ const columns = [
<!-- Brand column -->
<div class="lg:col-span-1">
<div class="flex items-center gap-2.5">
<img src="/logo.png" alt="SnapOtter" class="h-7 w-7" width="28" height="28" />
<!-- Decorative: the adjacent span already says SnapOtter. -->
<img src="/logo.png" alt="" class="h-7 w-7" width="28" height="28" />
<span class="font-display text-lg font-bold">SnapOtter</span>
</div>
<p class="mt-3 text-sm leading-relaxed text-muted">
@@ -119,7 +120,11 @@ const columns = [
<!-- Link columns -->
{columns.map((col) => (
<div>
<h4 class="text-sm font-semibold text-foreground">{col.title}</h4>
{/* h2, not h4. The footer is a contentinfo landmark and every page has one
h1, so starting its headings at level 2 never skips. As an h4 it skipped
a level on every page in the site: h2 to h4 on the content pages and h1
to h4 on the tool section pages. The size comes from the class either way. */}
<h2 class="text-sm font-semibold text-foreground">{col.title}</h2>
<ul class="mt-4 space-y-2.5">
{col.links.map((link) => (
<li>
@@ -137,7 +142,11 @@ const columns = [
))}
</div>
<!-- Featured-on badges -->
<!-- Featured-on badges. All three images are served from our own origin: a
hot-linked badge would hand the visitor's IP, Referer, and UA to the
badge host on every page view, and PostHog and Sentry are the only
destinations this project talks to. -->
<div class="section-divider mx-auto mt-12 max-w-6xl"></div>
<div class="mx-auto flex max-w-6xl flex-wrap items-center gap-5 pt-8">
<a href="https://twelve.tools" target="_blank" rel="noopener noreferrer" aria-label="Featured on Twelve Tools">
@@ -147,7 +156,7 @@ const columns = [
<img src="/badges/wired-business.svg" alt="Featured on Wired Business" width="200" height="54" class="h-9 w-auto" />
</a>
<a href="https://lift-off.sh/p/snapotter" target="_blank" rel="noopener noreferrer" aria-label="Launched on LiftOff">
<img src="https://lift-off.sh/images/badges/badgeLaunchedLightBAR.webp" alt="Launched on LiftOff" width="360" height="120" class="h-9 w-auto" />
<img src="/badges/lift-off-launched.webp" alt="Launched on LiftOff" width="360" height="120" class="h-9 w-auto" />
</a>
</div>
@@ -1,5 +1,6 @@
---
// biome-ignore-all lint/correctness/noUnusedVariables: Astro template consumes frontmatter values.
// biome-ignore-all lint/correctness/noUnusedImports: Astro template consumes frontmatter imports.
import { t } from "@/i18n";
interface Props {
@@ -117,7 +118,10 @@ const DOCKER_CMD =
document.body.appendChild(ta);
ta.select();
try {
document.execCommand("copy");
const legacyCopy = Reflect.get(document, "execCommand") as
| ((commandId: string) => boolean)
| undefined;
legacyCopy?.call(document, "copy");
} catch {
// Nothing else to try; the icon still flips so the user can copy manually.
}
+8 -1
View File
@@ -4,7 +4,7 @@
import { TOOLS, toolSection } from "@snapotter/shared";
import * as lucideIcons from "lucide";
import { t } from "@/i18n";
import { enOnlyHref, localizeHref } from "@/lib/i18n-page";
import { enOnlyHref } from "@/lib/i18n-page";
import { loadToolStrings } from "@/lib/tool-strings";
interface Props {
@@ -40,9 +40,16 @@ function renderIcon(iconName: string): string {
<div class="hero-search animate-fade-up relative z-30 mx-auto mt-8 max-w-xl" style="animation-delay: 0.18s;">
<div class="relative">
<svg class="pointer-events-none absolute top-1/2 left-5 h-5 w-5 -translate-y-1/2 text-muted" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/></svg>
<!-- role="combobox": aria-expanded and aria-controls are not allowed on a plain
textbox, which axe reports as a critical aria-allowed-attr failure on every
home page. The role is also what this control already is, a text field that
opens a result list below it. -->
<input
type="text"
id="hero-tool-search"
role="combobox"
aria-autocomplete="list"
aria-haspopup="listbox"
autocomplete="off"
placeholder={t(locale, "home.hero.searchPlaceholder")}
class="w-full rounded-2xl border border-border bg-surface py-4 pe-4 ps-12 text-base shadow-sm outline-none transition-all placeholder:text-muted focus:border-primary-ink focus:shadow-md"
+2 -1
View File
@@ -42,7 +42,8 @@ const links: NavItem[] = [
<div class="mx-auto flex h-16 max-w-6xl items-center justify-between px-6">
<!-- Logo -->
<a href={localizeHref(locale, "/")} class="flex shrink-0 items-center gap-2.5">
<img src="/logo.png" alt="SnapOtter" class="h-8 w-8" width="32" height="32" />
<!-- Decorative: the adjacent span already gives the link its accessible name. -->
<img src="/logo.png" alt="" class="h-8 w-8" width="32" height="32" />
<span class="font-display text-lg font-bold tracking-tight">SnapOtter</span>
</a>
@@ -1,5 +1,6 @@
---
// biome-ignore-all lint/correctness/noUnusedImports: Astro template consumes component imports.
// biome-ignore-all lint/correctness/noUnusedVariables: Astro template consumes frontmatter values.
import { t } from "@/i18n";
import SectionHeading from "./SectionHeading.astro";
@@ -79,7 +79,12 @@ const blocks = [
ta.style.left = "-9999px";
document.body.appendChild(ta);
ta.select();
try { document.execCommand("copy"); } catch {}
try {
const legacyCopy = Reflect.get(document, "execCommand") as
| ((commandId: string) => boolean)
| undefined;
legacyCopy?.call(document, "copy");
} catch {}
document.body.removeChild(ta);
}
flip(true);
@@ -14,7 +14,7 @@ const { title, body } = Astro.props;
<line x1="12" y1="9" x2="12" y2="13"/><line x1="12" y1="17" x2="12.01" y2="17"/>
</svg>
<div>
<p class="text-sm font-semibold text-danger">{title}</p>
<p class="text-sm font-semibold text-danger-ink">{title}</p>
<p class="mt-2 text-sm leading-relaxed text-muted">{body}</p>
</div>
</div>
@@ -250,6 +250,7 @@ const safeStringsJson = JSON.stringify(toolGridStrings).replace(/</g, "\\u003c")
<button
type="button"
data-modality={modality.id}
aria-label={`${modality.label} ${t(locale, "home.categoryCards.toolCount", { count: modality.count })}`}
aria-pressed={modality.id === "all" ? "true" : "false"}
class:list={[
"tool-command-modality rounded-md px-3 py-2 text-sm font-semibold transition-colors",