refactor: 应用 Oracle round-4 复核,硬化 migrator 与默认安全值

- migrate: 校验已应用 migration 的 SHA-256,拒绝 schema drift;
  split 后 trim + skip empty,避免空 statement 触发 SQL 错误
- todo.contract: update 拒绝空 patch
- env: DATABASE_URL 限定 postgres(ql):// scheme,配置错误更早失败
- compile: autoloadDotenv: false,二进制部署不再吞 cwd 的 .env
- Error.tsx: 生产环境隐藏 error.message,避免内部错误泄露
- AGENTS: 同步 generatedFieldKeys / migrator 行为新描述
This commit is contained in:
2026-04-25 14:38:44 +08:00
parent 695e826dcf
commit ed257fe4e6
6 changed files with 33 additions and 14 deletions
+2 -1
View File
@@ -49,7 +49,8 @@ const main = async () => {
const result = await Bun.build({
entrypoints: [ENTRYPOINT],
outdir: OUTDIR,
compile: { outfile, target },
// autoloadDotenv: false — produce a deterministic binary; it must not silently consume a .env from cwd.
compile: { outfile, target, autoloadDotenv: false },
minify: true,
bytecode: true,
sourcemap: 'inline',