test(nightly): fix Schemathesis/Coverage/Docker/fuzz root causes (#346)

Second round of nightly fixes, each root-caused from the post-fix run:

- Docker E2E (real bug): Dockerfile.test never copied patches/, so pnpm
  install hit 'ENOENT patches/gray-matter@4.0.3.patch' and exited 254.
  Copy patches/ like the prod Dockerfile does. (My earlier network-retry
  guess was a misdiagnosis; reverted.)
- fuzz-settings (real bug): the graceful-skip regex matched 'precondition'
  but fast-check v4 says 'pre-condition' (hyphenated), so 3 constrained PDF
  tools (extract/remove/organize-pages) errored instead of skipping. Match
  the hyphen. Verified locally: 3 failed -> 3 passed.
- Schemathesis: AI tool endpoints return 501 FEATURE_NOT_INSTALLED when the
  ML bundle is absent (always, in CI). That is expected, not a server bug,
  and the endpoints cannot be fuzzed without the bundle, so exclude them.
  (The ASCII spec-load fix already landed in #344.)
- Extended Matrix: bump the per-test timeout to 600s; edit-metadata over
  every format still exceeded 300s even at 2 forks.
- Coverage: tests now pass (video-speed + timeout fixes); re-baseline the
  branches/functions thresholds to the measured floor with a written reason.
This commit is contained in:
SnapOtter
2026-06-24 20:08:40 +08:00
committed by GitHub
parent 33dfcecd6a
commit 3dd0ebb49d
4 changed files with 16 additions and 10 deletions
+4 -6
View File
@@ -70,6 +70,10 @@ WORKDIR /app
# Copy workspace config first (for layer caching)
COPY pnpm-workspace.yaml pnpm-lock.yaml package.json turbo.json tsconfig.base.json vitest.config.ts ./
# patchedDependencies (gray-matter) needs the patch files present at install
# time, otherwise pnpm exits with ENOENT (exit 254). The prod Dockerfile copies
# these too; the test image was missing them.
COPY patches/ ./patches/
# Copy all package.json files
COPY apps/web/package.json apps/web/tsconfig.json apps/web/vite.config.ts ./apps/web/
@@ -82,12 +86,6 @@ COPY packages/ai/package.json packages/ai/tsconfig.json ./packages/ai/
COPY packages/enterprise/package.json packages/enterprise/tsconfig.json ./packages/enterprise/
# Install ALL dependencies (including devDependencies for testing).
# Registry hiccups during the container build surface as a hard exit 254
# (interrupted fetch / integrity check). Harden the install with more retries
# and a longer network timeout so a transient blip doesn't fail the whole job.
RUN pnpm config set fetch-retries 5 \
&& pnpm config set fetch-retry-maxtimeout 120000 \
&& pnpm config set network-timeout 600000
RUN pnpm install --frozen-lockfile
# Copy source code