| event_payload |
{"ref":"refs/heads/main","befo {"ref":"refs/heads/main","before":"8ae98649e077fa188f8e9c1b0a11b78a2377c836","after":"125c54d328d3da221b5d91c0a2dd0475712c6e96","compare_url":"https://gitea.g-hi.com/luoanwu/juhai-quotation-system/compare/8ae98649e077fa188f8e9c1b0a11b78a2377c836...125c54d328d3da221b5d91c0a2dd0475712c6e96","commits":[{"id":"125c54d328d3da221b5d91c0a2dd0475712c6e96","message":"Merge pull request #12 from laoluojuhai/fix/vm-dockerfile-build-path\n\nfix(vm): 打通容器构建路径——保住 slim 运行镜像,不靠放宽红线换构建成功","url":"https://gitea.g-hi.com/luoanwu/juhai-quotation-system/commit/125c54d328d3da221b5d91c0a2dd0475712c6e96","author":{"name":"laoluojuhai","email":"158980461+laoluojuhai@users.noreply.github.com","username":""},"committer":{"name":"GitHub","email":"noreply@github.com","username":""},"verification":null,"timestamp":"2026-08-17T07:09:44-07:00","added":[],"removed":[],"modified":[".dockerignore","deploy/vm/.env.example","deploy/vm/Dockerfile","reports/api-route-contract.latest.json","reports/approval-payload-contract.latest.json","reports/component-size.latest.json","reports/contract-consumers.latest.json","reports/design-tokens.latest.json","reports/docs-truth.latest.json","reports/dual-backend-parity.latest.json","reports/gate-selftest.latest.json","reports/governance-docs.latest.json","reports/governance.latest.json","reports/migrations.latest.json","reports/module-integration.latest.json","reports/naming.latest.json","reports/order-concurrency-guard.latest.json","reports/queue-isolation.latest.json","reports/role-permissions.latest.json","reports/runtime-governance.latest.json","reports/schema-sync.latest.json","reports/sites-governance.latest.json","reports/validation-source.latest.json","reports/vm-deploy.latest.json","reports/workspace-hygiene.latest.json","scripts/vm-deploy.sh"]},{"id":"6f13a78de9c02ae6a36fcebfb4bde63fbd092158","message":"fix(vm): 打通容器构建路径——保住 slim 运行镜像,不靠放宽红线换构建成功\n\n`deploy/vm/Dockerfile` 的构建路径从未真正跑通过(并发治理会话只用 pnpm/turbo 跑门禁,\n从不 docker build)。而 check:vm-deploy 一直是绿的——它查 Dockerfile 的**结构**\n(每个 stage 用哪个 FROM、有没有 fat runtime),不查它**能不能构建出来**。\n于是棘轮报告写着「镜像瘦身非 root、可回滚、备份可恢复」✅,而那个镜像根本产不出来。\n\n5 处构建 bug:\n1. contracts 的 `prepare`(tsc) 在只有 manifest 的依赖层里跑,找不到 tsconfig/src → TS5058。\n 先 COPY contracts 的 tsconfig + src 给它当输入。\n2. 新 workspace 包 @repo/password-auth(两后端 runtime 依赖)未进 manifest COPY、\n 也没被显式 build。\n3. `pnpm deploy --prod --legacy`:pnpm 9.15.9 不认 `--legacy`(Unknown option)。\n 旧注释称「未开启 inject-workspace-packages 时需要 --legacy」——实测在本仓版本上\n 不成立,去掉即可正常打平 workspace 包(sharp 这类 lockfile 原生依赖也照常带出)。\n4. `pnpm deploy` 只按 lockfile 物化依赖,而 .prisma/client(含平台相关 query engine)\n 是 `prisma generate` **生成**的、不在任何 lockfile 里,永远不会被带出去 →\n 新增一步从 build 树复制。路径由 @prisma/client 的解析结果反推,不硬编码 pnpm store\n 的哈希目录名;且必须从 app 目录解析(workspace 根 node_modules 里没有它)。\n5. web stage `COPY apps/web/public` 失败——git 未跟踪任何 public 资产。\n ⚠️ 本机可能有个空的 public/(git 不跟踪空目录),docker build 读本地上下文因而能过,\n CI 与全新 clone 上必挂,注释已写明这个陷阱。\n\n**刻意不采用**此前 `dockerfile-vm-deploy-fixes-ec411c0.patch` 的策略(放弃 slim、\n运行镜像改 FROM build):那会撞 4 条门禁红线(runtime-from-base-* / no-fat-runtime-*),\n而实测 slim 路径的两个阻塞点(3、4)都可解,「镜像瘦身作为后续项不阻塞」的前提不成立。\n体积实测:api-nestjs 741MB / api-fastify 695MB / web 546MB,\n对照 fat 方案 8.46GB、2026-08-06 实际部署的 2.69GB。非 root 由镜像层 USER node 保证,\n而非仅靠 compose 的 user: 覆盖。\n\n顺带两处断链(均为 MinIO 进 compose 后没人跟上):\n- .env.example 与 vm:init 都不认识 S3_*,而它们是 compose 的必填变量 → 新机器\n `vm:init` 后 `vm:up` 必然卡在变量插值。已补占位符 + 随机生成 + 存量 .env 自愈。\n- .dockerignore 只写 `**/.next`,匹配不到本仓工具链自建的 distDir\n (.next-ui-* / .next-dev-* / .next-manual-*),也没排除 sites/(G26 那套独立\n Cloudflare 系统,其 .sites-runtime 本机 1.0GB)→ COPY . . 层 3.79GB → 270MB。\n\n证据(作用域=本地工作区):\n- docker build 四个 target 全部 EXIT=0(api-nestjs / api-fastify / web / migrate)\n- 镜像内实测 @prisma/client 与原生模块 sharp 均可加载、dist 入口就位、uid=1000 非 root\n- Dockerfile 里那条「Prisma Client 缺失即构建失败」的断言**首次真正执行并通过**\n- pnpm vm:config EXIT=0(7 个服务解析通过)\n- pnpm check 22 项全绿 exit=0\n\n未验证:未跑 vm:up / vm:smoke(整栈起停与真实写链冒烟),故不得宣称「可部署」。\n\nCo-Authored-By: Claude Opus 5 \u003cnoreply@anthropic.com\u003e\n","url":"https://gitea.g-hi.com/luoanwu/juhai-quotation-system/commit/6f13a78de9c02ae6a36fcebfb4bde63fbd092158","author":{"name":"luoguoguo","email":"luoguoguo@gmail.com","username":""},"committer":{"name":"luoguoguo","email":"luoguoguo@gmail.com","username":""},"verification":null,"timestamp":"2026-08-17T06:57:55-07:00","added":[],"removed":[],"modified":[".dockerignore","deploy/vm/.env.example","deploy/vm/Dockerfile","reports/api-route-contract.latest.json","reports/approval-payload-contract.latest.json","reports/component-size.latest.json","reports/contract-consumers.latest.json","reports/design-tokens.latest.json","reports/docs-truth.latest.json","reports/dual-backend-parity.latest.json","reports/gate-selftest.latest.json","reports/governance-docs.latest.json","reports/governance.latest.json","reports/migrations.latest.json","reports/module-integration.latest.json","reports/naming.latest.json","reports/order-concurrency-guard.latest.json","reports/queue-isolation.latest.json","reports/role-permissions.latest.json","reports/runtime-governance.latest.json","reports/schema-sync.latest.json","reports/sites-governance.latest.json","reports/validation-source.latest.json","reports/vm-deploy.latest.json","reports/workspace-hygiene.latest.json","scripts/vm-deploy.sh"]}],"total_commits":0,"head_commit":{"id":"125c54d328d3da221b5d91c0a2dd0475712c6e96","message":"Merge pull request #12 from laoluojuhai/fix/vm-dockerfile-build-path\n\nfix(vm): 打通容器构建路径——保住 slim 运行镜像,不靠放宽红线换构建成功","url":"https://gitea.g-hi.com/luoanwu/juhai-quotation-system/commit/125c54d328d3da221b5d91c0a2dd0475712c6e96","author":{"name":"laoluojuhai","email":"158980461+laoluojuhai@users.noreply.github.com","username":""},"committer":{"name":"GitHub","email":"noreply@github.com","username":""},"verification":null,"timestamp":"2026-08-17T07:09:44-07:00","added":[],"removed":[],"modified":[".dockerignore","deploy/vm/.env.example","deploy/vm/Dockerfile","reports/api-route-contract.latest.json","reports/approval-payload-contract.latest.json","reports/component-size.latest.json","reports/contract-consumers.latest.json","reports/design-tokens.latest.json","reports/docs-truth.latest.json","reports/dual-backend-parity.latest.json","reports/gate-selftest.latest.json","reports/governance-docs.latest.json","reports/governance.latest.json","reports/migrations.latest.json","reports/module-integration.latest.json","reports/naming.latest.json","reports/order-concurrency-guard.latest.json","reports/queue-isolation.latest.json","reports/role-permissions.latest.json","reports/runtime-governance.latest.json","reports/schema-sync.latest.json","reports/sites-governance.latest.json","reports/validation-source.latest.json","reports/vm-deploy.latest.json","reports/workspace-hygiene.latest.json","scripts/vm-deploy.sh"]},"repository":{"id":72,"owner":{"id":5,"login":"luoanwu","login_name":"","source_id":0,"full_name":"","email":"law@g-hi.com","avatar_url":"https://gitea.g-hi.com/avatar/627574a890388a2aadc80ab38d22f3a0","html_url":"https://gitea.g-hi.com/luoanwu","language":"","is_admin":false,"last_login":"0001-01-01T00:00:00Z","created":"2026-01-30T16:28:30+08:00","restricted":false,"active":false,"prohibit_login":false,"location":"","website":"","description":"","visibility":"public","followers_count":0,"following_count":0,"starred_repos_count":0,"username":"luoanwu"},"name":"juhai-quotation-system","full_name":"luoanwu/juhai-quotation-system","description":"巨嗨报价系统:Next.js + NestJS/Fastify 双后端治理型报价业务底座","empty":false,"private":false,"fork":false,"template":false,"mirror":false,"size":33684,"language":"","languages_url":"https://gitea.g-hi.com/api/v1/repos/luoanwu/juhai-quotation-system/languages","html_url":"https://gitea.g-hi.com/luoanwu/juhai-quotation-system","url":"https://gitea.g-hi.com/api/v1/repos/luoanwu/juhai-quotation-system","link":"","ssh_url":"git@gitea.g-hi.com:luoanwu/juhai-quotation-system.git","clone_url":"https://gitea.g-hi.com/luoanwu/juhai-quotation-system.git","original_url":"","website":"","stars_count":0,"forks_count":0,"watchers_count":1,"branch_count":9,"open_issues_count":0,"open_pr_counter":0,"release_counter":0,"default_branch":"main","archived":false,"created_at":"2026-07-31T03:51:09+08:00","updated_at":"2026-08-17T19:18:19+08:00","archived_at":"1970-01-01T08:00:00+08:00","permissions":{"admin":true,"push":true,"pull":true},"has_code":true,"has_issues":true,"internal_tracker":{"enable_time_tracker":true,"allow_only_contributors_to_track_time":true,"enable_issue_dependencies":true},"has_wiki":true,"has_pull_requests":true,"has_projects":true,"projects_mode":"all","has_releases":true,"has_packages":true,"has_actions":true,"ignore_whitespace_conflicts":false,"allow_merge_commits":true,"allow_rebase":true,"allow_rebase_explicit":true,"allow_squash_merge":true,"allow_fast_forward_only_merge":true,"allow_rebase_update":true,"allow_manual_merge":false,"autodetect_manual_merge":false,"default_delete_branch_after_merge":false,"default_merge_style":"merge","default_allow_maintainer_edit":true,"avatar_url":"","internal":false,"mirror_interval":"","object_format_name":"sha1","mirror_updated":"0001-01-01T00:00:00Z","topics":[],"licenses":[]},"pusher":{"id":5,"login":"luoanwu","login_name":"","source_id":0,"full_name":"","email":"5+luoanwu@noreply.localhost","avatar_url":"https://gitea.g-hi.com/avatar/627574a890388a2aadc80ab38d22f3a0","html_url":"https://gitea.g-hi.com/luoanwu","language":"","is_admin":false,"last_login":"0001-01-01T00:00:00Z","created":"2026-01-30T16:28:30+08:00","restricted":false,"active":false,"prohibit_login":false,"location":"","website":"","description":"","visibility":"public","followers_count":0,"following_count":0,"starred_repos_count":0,"username":"luoanwu"},"sender":{"id":5,"login":"luoanwu","login_name":"","source_id":0,"full_name":"","email":"5+luoanwu@noreply.localhost","avatar_url":"https://gitea.g-hi.com/avatar/627574a890388a2aadc80ab38d22f3a0","html_url":"https://gitea.g-hi.com/luoanwu","language":"","is_admin":false,"last_login":"0001-01-01T00:00:00Z","created":"2026-01-30T16:28:30+08:00","restricted":false,"active":false,"prohibit_login":false,"location":"","website":"","description":"","visibility":"public","followers_count":0,"following_count":0,"starred_repos_count":0,"username":"luoanwu"}}... |