fix: QA sweep fixes across migration, security, lint, and e2e tests

- fix(db): migration 0012 column order mismatch causing NOT NULL
  constraint failure on existing databases; use explicit column
  mapping instead of SELECT *
- fix(db): disable FK checks during migrations to allow SQLite
  table-recreation pattern (DROP + RENAME)
- fix(security): filter cookie_secret and instance_id from settings
  API response for non-admin users
- fix(lint): resolve all 7 API lint warnings (noParameterAssign,
  noImplicitAnyLet) in compose, image-enhancement, and workspace
- fix(docs): correct permission count from 16 to 14 in CLAUDE.md
- fix(e2e): resolve 44 Playwright test failures across 8 spec files
  including locator specificity, compress mode defaults, format count,
  restore-photo UI drift, stitch image count, GIF animated fixtures,
  submit button timing, and processing timeouts
This commit is contained in:
SnapOtter
2026-05-15 22:41:22 +08:00
parent 3b181dd1ac
commit 51bc2d5732
15 changed files with 248 additions and 244 deletions
+6 -6
View File
@@ -11,13 +11,13 @@ import { env } from "../config.js";
async function checkWorkspaceCapacity(workspaceRoot: string): Promise<void> {
if (!existsSync(workspaceRoot)) return;
let stats;
let fsStats: Awaited<ReturnType<typeof statfs>>;
try {
stats = await statfs(workspaceRoot);
fsStats = await statfs(workspaceRoot);
} catch {
return;
}
const freeBytes = stats.bavail * stats.bsize;
const freeBytes = fsStats.bavail * fsStats.bsize;
const freeGB = freeBytes / 1024 ** 3;
if (freeGB < 1) {
@@ -39,13 +39,13 @@ async function checkWorkspaceCapacity(workspaceRoot: string): Promise<void> {
}
// Recheck after cleanup
let stats2;
let recheckStats: Awaited<ReturnType<typeof statfs>>;
try {
stats2 = await statfs(workspaceRoot);
recheckStats = await statfs(workspaceRoot);
} catch {
return;
}
const freeGB2 = (stats2.bavail * stats2.bsize) / 1024 ** 3;
const freeGB2 = (recheckStats.bavail * recheckStats.bsize) / 1024 ** 3;
if (freeGB2 < 0.5) {
const error = new Error("Insufficient disk space for processing");
(error as Error & { statusCode: number }).statusCode = 503;