Commit Graph
1753 Commits
Author SHA1 Message Date
SnapOtter 719457e111 Merge branch 'feat/section-based-tool-urls' into chore/consolidate-v2.0.0 2026-06-21 02:09:14 +08:00
SnapOtter 950534304e Merge branch 'worktree-ci+ai-bundle-verification' into chore/consolidate-v2.0.0 2026-06-21 02:08:50 +08:00
SnapOtter 37841e3369 Merge branch 'security/hardening-audit' into chore/consolidate-v2.0.0 2026-06-21 02:08:50 +08:00
SnapOtter 0ddcc7aef5 test(api): fall back to raw path for unknown tool ids in adversarial negative tests 2026-06-21 00:47:06 +08:00
SnapOtter c1c66efd3f chore: section-prefix remaining tool paths in docs, examples, benchmarks, and multi-input test 2026-06-21 00:30:10 +08:00
SnapOtter 84247fd077 docs: redirect relocated data/pdf tool pages to the files section 2026-06-21 00:22:11 +08:00
SnapOtter 9f0b43271c docs: section-prefix tool API endpoints 2026-06-21 00:12:59 +08:00
SnapOtter b052241c92 docs: split document tools into pdf and files sections 2026-06-21 00:05:15 +08:00
SnapOtter 0051655bbf feat(landing): generate 301 redirects for old tool URLs; fix robots sitemap reference 2026-06-20 23:56:03 +08:00
SnapOtter f158be6aaa feat(landing): section-nested tool routes, section index pages, and section-prefixed links 2026-06-20 23:53:54 +08:00
SnapOtter 5dbbac6c43 test(web): align unit + e2e expectations with section routes 2026-06-20 23:35:37 +08:00
SnapOtter 0689ae554f fix(web): point tool keyboard shortcuts at section routes 2026-06-20 12:53:40 +08:00
SnapOtter 8301676e13 feat(web): group home grid, tabs, and breadcrumb by section 2026-06-20 12:51:41 +08:00
SnapOtter 22b4b5c3c1 feat(web): section-prefix all tool API calls 2026-06-20 12:35:10 +08:00
SnapOtter f80444791b test(api): section-prefix tool URLs across integration, docker, and e2e api specs 2026-06-20 12:24:50 +08:00
SnapOtter fc205c7428 fix(api): section override for backwards-compat alias routes (adjust-colors) 2026-06-20 12:02:00 +08:00
SnapOtter 414f126a33 docs(api): section-prefix OpenAPI tool paths 2026-06-20 11:55:22 +08:00
SnapOtter 10bb73ffc1 feat(api): section-prefix all custom tool route literals 2026-06-20 11:47:59 +08:00
SnapOtter 68dd7dabaa feat(api): section-prefix factory + batch routes via apiToolPath (+section validation) 2026-06-20 11:44:36 +08:00
SnapOtter 0691457f94 feat(scripts): add tool-path codemod CLI 2026-06-20 11:28:55 +08:00
SnapOtter c17a4a4225 feat(scripts): add segment-anchored tool-path rewrite transform 2026-06-20 11:22:33 +08:00
SnapOtter 9ca901f8d5 feat(shared): add apiToolPath() and section-prefixed routes; drop MODALITY_URL_SLUG 2026-06-20 11:05:44 +08:00
SnapOtter 790747188a feat(shared): add Section concept and toolSection() partition 2026-06-20 10:55:56 +08:00
SnapOtter 0acc8ca751 chore: post-2.0 QA hygiene across api hardening and qa metadata 2026-06-20 10:50:20 +08:00
SnapOtter efac88c205 fix(ci): harden smoke tests against set -e and fix parameter issues
- Add || true after inference commands so set -e doesn't kill the
  script before we reach the meaningful error message (exit code 3)
- Fix colorize settings: use "model" not "method" (matching colorize.py)
- Use larger font (size=40) and image (400x100) for OCR test so
  PaddleOCR reliably recognizes the text
- Add || result="" fallback for stdout-capture smoke tests (OCR,
  transcription) to prevent set -e on command substitution failure
2026-06-20 10:45:56 +08:00
SnapOtterandGitHub 19d9ed181a fix(audio): low-samplerate ogg encode + post-2.0 QA hygiene
Quality-VBR ogg (libvorbis -q:a) fixes 8 kHz 'encoder setup failed' in both ogg paths; drop empty COOKIE_SECRET ENV (app auto-generates); emit real bundle extractedSize; fix stale image-pad/compress-pdf QA specs.
2026-06-20 10:41:50 +08:00
SnapOtter 7d099274c1 feat(ci): add verify job to ai-bundles workflow
The verify job runs between build and publish, gating HuggingFace
upload on per-bundle smoke tests. Each of the 14 bundle variants
(7 bundles x 2 arches) is verified independently: SHA256 checksum,
tarball extraction, Python import checks, and functional inference.
2026-06-20 10:03:16 +08:00
SnapOtter 4b5b35186d fix(ci): address spec review findings in verify-bundle.sh
- validate models field in bundle.json
- pipe JSON via stdin instead of triple-quote embedding (injection safety)
- add PNG magic byte validation for background-removal output
- add dimension assertion for upscale-enhance output
- add fixture existence guards before smoke tests
- use --no-index for offline fixup wheel install
2026-06-20 10:01:32 +08:00
SnapOtter 5ee948d36a feat(ci): add verify-bundle.sh for AI bundle smoke testing
Verifies bundle tarballs in 4 phases: SHA256 integrity, extraction
and install into the base venv, Python import checks per bundle,
and a functional inference smoke test per bundle.
2026-06-20 09:56:55 +08:00
SnapOtter d61226496b fix(security): harden rate limits, Redis auth, resource caps, and error sanitization
- Lower LOGIN_ATTEMPT_LIMIT default from 30 to 10 (brute-force protection)
- Lower RATE_LIMIT_PER_MIN default from 1000 to 300
- Add Redis authentication (requirepass) with REDIS_PASSWORD env var
- Add Redis maxmemory 512mb cap to prevent unbounded growth
- Add mem_limit: 1g to Postgres and Redis containers
- Strip internal file paths from all error responses (defense-in-depth)
- Add startup warnings for default admin/Postgres/Redis credentials
- Update security test expectations for new defaults
2026-06-20 00:53:11 +08:00
SnapOtterandGitHub b847dcc2ab test(features): align manifest assertions with deepsafe repo and best-effort extractedSize
Fix the Unit Tests CI job: bundleRepo now asserts deepsafe/feature-bundles (intentional, temporary); extractedSize relaxed to >= 0 (best-effort field, build script does not measure uncompressed size). sha256 + compressedSize remain strict. Full unit suite: 4546 passed.
2026-06-19 19:15:32 +08:00
SnapOtterandGitHub 91ac583e87 feat(docs): Two-Doors home, otter-orange brand, Pagefind search, and enterprise SSO/SCIM/roles guides
Docs site redesign: Two-Doors home, otter-orange brand, Pagefind search, enterprise SSO/SCIM/roles guides.
2026-06-19 18:46:59 +08:00
SnapOtterandGitHub 35222249cb chore: remove dead landing components and a stale vitest exclude
Remove 3 unreferenced landing components (HowItWorks, ModalityExplorer, TerminalBlock) and a stale vitest exclude.
2026-06-19 18:46:55 +08:00
SnapOtterandGitHub 2bd3e2302a fix: post-2.0 audit bug fixes (404 route, worker logging, outpaint gate, pandoc path)
Surgical post-2.0 fixes: SPA 404 route, worker logging, outpaint gate, pandoc path resolution.
2026-06-19 18:46:52 +08:00
SnapOtterandGitHub 9b64a96bcd fix(docker): restore Postgres/Redis in GPU compose stack + pause image publishing
Restore Postgres 17 + Redis 8 services in docker-compose-gpu.yml; re-add if:false publish pause on the release.yml docker job (main had lost it).
2026-06-19 18:39:35 +08:00
SnapOtterandGitHub 3b50bcdc5c fix(ai-bundles): repair bundle build + publish pipeline (deepsafe repo, CPU provider, manifest)
Bundle build/publish fixes: CPUExecutionProvider in rembg build, pip/import/arm64 deps, hf-CLI publish to deepsafe/feature-bundles, real manifest sha256+sizes, installer fallback repo.
2026-06-19 18:34:33 +08:00
SnapOtter 7f8f6b5e6b docs: add v2.0.0 release delay banner to README
Let users know the latest Docker image is still v1.x and that v2.0
with all 157 tools is coming soon.
2026-06-19 18:18:36 +08:00
SnapOtterandGitHub 7579634633 test: fix 2.0 integration CI -- 202 async fallback + timeout hardening
Fixes all integration CI failures on the 2.0 branch.

## What was broken

Two independent root causes:

1. **202 assertion failures** -- Under 4-fork CI parallel load, the 30s
   `SYNC_WAIT_MS` sync window can expire before a BullMQ worker finishes a
   heavy encode (avif, heic), returning a legitimate `202 {jobId, async: true}`
   instead of `200`. Tests that hard-asserted `200` were spuriously failing.

2. **Vitest timeout race** -- `SYNC_WAIT_MS` (30s) and the default Vitest
   `testTimeout` (also 30s) fired simultaneously. Vitest won the race,
   reporting "Test timed out in 30000ms" instead of the test receiving the
   202 response.

## Fixes

- Added `isAsyncFallback()` helper to four integration test files; validates
  the `{async: true, jobId}` body shape and returns early so the synchronous
  200 path runs full assertions only when warranted.
- Set `vi.setConfig({ testTimeout: 60_000 })` at module level in
  `image-enhancement.test.ts` and `format-matrix-comprehensive.test.ts`,
  giving a 30s buffer between when `waitForJob()` returns 202 and when
  Vitest gives up.
- Bumped explicit matrix timeouts in `format-matrix.test.ts` and
  `new-formats.test.ts` from 30s to 60s for the same reason.
- Installed missing CI doc-engine binaries (qpdf, pandoc, libreoffice,
  pdfcpu) that were causing unrelated integration failures.
- Fixed E2E smoke specs for 2.0 UI changes (modality selector, tool routes,
  validation behavior).
2026-06-19 18:15:20 +08:00
SnapOtter d39091375a chore: remove temporary HF token check workflow and marker 2026-06-19 18:07:29 +08:00
SnapOtter 818ca8beb4 chore: fix YAML indentation in HF check workflow; re-trigger 2026-06-19 18:06:46 +08:00
SnapOtter 6bd8bf724e chore: run HF token CI check (push-triggered) 2026-06-19 18:05:43 +08:00
SnapOtter 837ce2fe86 chore: HF upload CI check workflow 2026-06-19 18:01:04 +08:00
SnapOtter 1473c7cffd chore: remove stale HF token test workflow 2026-06-19 18:00:52 +08:00
SnapOtter 6c779e8382 chore: temporary HF token CI smoke test (will remove) 2026-06-19 17:55:32 +08:00
SnapOtter 60e3008106 docs: deep-audit the API reference pages against code
rest.md: correct the tool response shape (JSON {jobId, downloadUrl, ...} for fast / 202 {jobId, async} for long, not the raw file), fix the SSE jobId source (body, with X-Job-Id only on batch/pipeline ZIP streams), complete the permissions list to all 17, and add ai-canvas-expand.

ai.md: reconcile ~14 AI tool parameter tables to the real Zod schemas (remove-background, upscale, ocr, enhance-faces, colorize, noise-removal, red-eye-removal, restore-photo, passport-photo, erase-object, smart-crop, content-aware-resize, transparency-fixer, image-enhancement), add the 6 missing AI tools (background-replace, blur-background, ocr-pdf, ai-canvas-expand, transcribe-audio, auto-subtitles), and fix the dispatcher script diagram and feature-bundle table.

image-engine.md: add 4 undocumented operations (sharpen, sharpen-advanced, color-blindness, edit-metadata) and fix flip/crop/rotate/convert/compress/strip-metadata/color-channels params, output-format count (13), and the info JSON example. supported-formats.md: output count 14 -> 13. Verified with a clean docs build.
2026-06-18 14:12:28 +08:00
SnapOtter 8532f3227b docs: audit all 157 tool pages against live schemas
Reconcile every tool page's parameters, defaults, and response shape against the tool's Zod settings schema and executionHint in code. Notable fixes: color-palette (add count + format params, hex output, median-cut algorithm), favicon (add 5 params, was documented as having none), qr-generate (add logoDataUri), convert (add ppm/eps/tga formats), video-loudnorm (-16 LUFS not -14), smart-crop (async 202 not sync 200), images-to-video (1080x1080 square), and several output-filename and behavior-note corrections.

Also normalize API endpoint paths to /api/v1/tools/<id> (no modality segment) and standardize curl examples on the Docker API port 1349. Verified with a clean docs build.
2026-06-18 14:12:28 +08:00
SnapOtter d24e244af4 docs: organize tool pages by modality under /tools/<modality>/
Move all 157 tool pages into image/video/audio/pdf/data subfolders so URLs read /tools/<modality>/<id> (e.g. /tools/image/crop). Nest the image sub-categories under an Image group in the sidebar so the nav reads by modality. Add public/_redirects (301, clean + .html forms) mapping every old flat /tools/<id> URL to its new path so inbound links keep working. Rewrite all internal /tools links. Verified with a clean docs build (no dead links).
2026-06-18 14:12:28 +08:00
SnapOtter 03c1a5e36f fix(ci): grant ai-bundles reusable call its required token scopes
The Release workflow failed at startup ("workflow file issue", no jobs
created) whenever dispatched. Root cause: release.yml sets top-level
`permissions: {}`, so the ai-bundles reusable-workflow call inherited an
empty scope set. ai-bundles.yml's jobs declare `contents: read` /
`packages: read`, and GitHub rejects a called workflow requesting scopes
the caller never granted -- validated at startup, before any job runs, so
the whole run fails immediately regardless of the job's `if:`.

Grant the two scopes on the call job. Confirmed on a throwaway branch: a
neutralized dispatch went from startup_failure to a clean run with
ai-bundles correctly skipped.

This unblocks every real release; main's release.yml could not start.
2026-06-17 18:22:15 +08:00
SnapOtter de8bd79b04 test: update pre-existing stale specs for 2.0 multimodal + validation behavior
Fixes a backlog of integration/unit specs that asserted pre-2.0 behavior and
were failing CI (not caused by recent feature work):
- modality-aware empty-input error is 'No file(s) provided', not /no image/i
  (rotate, border, crop, resize, smart-crop, edge-cases, adversarial-extended,
  api, tool-factory-route)
- input validation rejects pre-enqueue with a clean 400 in 'error' (was a worker
  422 in 'details'): create-zip, extract-zip, merge-csvs
- resolveToolPool defaults unknown tools to the system pool (pool-routing)
- /upload and fetch-urls accept non-image content, validated per-tool at process
  time (api, fetch-urls)
- color-adjust legacy aliases were consolidated into adjust-colors: drop the
  removed-alias tests; retarget the format-preservation tests
- xml-to-csv gracefully converts a single non-repeating record to a 1-row CSV
- dropzone is multimodal; image-only filtering is opt-in via fileFilter
- factory-multi-input: register the synthetic test tools in the catalog so they
  route correctly (file modality for concat; image for the validation-prefix test)

Verified locally: unit 4546 passed, integration 8332 passed, typecheck + lint green.
2026-06-17 15:54:48 +08:00
SnapOtter 3726335063 fix(ai): pin rembg to 2.0.69 to keep numpy<2 compatibility
rembg 2.0.70+ requires numpy>=2.3.0, but the AI bundle pins numpy==1.26.4
(mediapipe, realesrgan/basicsr, codeformer, paddle all need numpy<2). The
unresolvable rembg==2.0.75 + numpy==1.26.4 combination broke pip-audit's
dependency resolution (CI red) and the background-removal bundle build. 2.0.69
is the newest rembg with an unconstrained numpy requirement. Verified: pip-audit
resolves with no unignored vulnerabilities on Python 3.11.
2026-06-17 15:54:35 +08:00