Browse Source

chore(deploy): 部署回执 364b87eb -> testing(S-cfc-459 butler.oneOnOne.coach 契约,精确 commit 部署成功,线上 state/JAR md5/javap/健康 401-200-200 全证据)

zxyj-langgraph 7 hours ago
parent
commit
efdb1956d4
1 changed files with 59 additions and 0 deletions
  1. 59 0
      docs/tdd/orchestration/report-deploy-2026-11-27-364b87eb.md

+ 59 - 0
docs/tdd/orchestration/report-deploy-2026-11-27-364b87eb.md

@@ -0,0 +1,59 @@
+# 部署回执:364b87eb → testing(2026-11-27)
+
+## 结论
+
+**目标提交 `364b87eb45ee61a6d5d361dffe3b00887b4f2316`(S-cfc-459:`butler.oneOnOne.coach` 契约 TDD-GREEN —— ButlerOneOnOneCoachService + entity/mapper/table + family & admin 一对一陪跑接口)已真实部署 RUNNING 于 testing(251)环境,部署成功。**
+
+| 项 | 值 |
+|----|----|
+| 部署方式 | 精确 commit 部署链路 `/tmp/opencode/cfc-deploy-precise-364b87eb.sh`(基于项目 `cfc-deploy-precise.sh`:指定 commit → 纯净 worktree 快照构建 → JAR 校验 → 停旧进程 → 装新 JAR → 启动健康检查 → 前端/H5 产物部署 → 最终验证 → 写部署 state) |
+| 实际部署成功的 commit hash | `364b87eb45ee61a6d5d361dffe3b00887b4f2316`(目标 = 构建源 = 线上 state 三者一致) |
+| 构建快照 | `/tmp/opencode/cfc-build-precise-364b87eb` @ `364b87eb4`(detached HEAD,`.git_sha` = 目标全 hash) |
+| 线上 JAR md5 | `18bfb9c29d5f8165bb1ee5a6c993788b`(与 state `backend_jar_md5` 一致) |
+| 运行进程 | PID `2839277`,`java -Xms512m -Xmx1024m -jar /sc-data/springboot/cfc/cfc-backend-1.0.0.jar`(00:39:28 启动),与 `/sc-data/springboot/cfc/cfc.pid` 一致 |
+
+## 部署链执行(本会话)
+
+- 版本纪律:主工作树 `/sc-data/cfc` 当时被其它会话的 rebase 占用,本会话**未触碰主工作树 git 状态**;改在独立 worktree(`/tmp/opencode/cfc-report-364b87eb`,分支 `deploy/364b87eb-testing-report`)执行 `git pull --rebase origin cfclub` → Fast-forward,无冲突。
+- 精确部署脚本在共享互斥锁 `/home/iwt/.cfc-deploy.lock` 上等待前一会话部署(918109ee)释放后,于 2026-11-27 00:32:37 开始,00:40:02 完成,退出码 0。日志证据(`/home/iwt/cfc-deploy.log`):
+
+```
+00:32:37 [deploy-precise] ========== CFC 精确部署:commit=364b87eb45ee61a6d5d361dffe3b00887b4f2316 ==========
+00:32:37 [deploy-precise] 创建纯净构建快照(worktree @ 364b87eb45ee61a6d5d361dffe3b00887b4f2316)
+00:34:31 [deploy-precise] 后端构建成功(纯净快照 /tmp/opencode/cfc-build-precise-364b87eb)
+00:36:46 [deploy-precise] 前端构建成功 1.0.2761
+00:39:18 [deploy-precise] 待部署 JAR md5=18bfb9c29d5f8165bb1ee5a6c993788b
+00:39:23 [deploy-precise] 已备份当前 JAR 为回滚源
+00:39:28 [deploy-precise] 已安装新 JAR(commit=364b87eb45ee61a6d5d361dffe3b00887b4f2316)
+00:39:28 [deploy-precise] 启动 PID=2839277(jar=/sc-data/springboot/cfc/cfc-backend-1.0.0.jar)
+00:40:01 [deploy-precise] 后端健康检查通过(HTTP 401/200,PID=2839277)
+00:40:02 [deploy-precise] 前端已部署: dist/ => /sc-data/cfc-admin/dist
+00:40:02 [deploy-precise] H5 无新产物(构建失败),保持现有产物
+00:40:02 [deploy-precise] 已记录部署状态: commit=364b87eb45ee61a6d5d361dffe3b00887b4f2316
+00:40:02 [deploy-precise] 精确部署完成: commit=364b87eb45ee61a6d5d361dffe3b00887b4f2316 \ 后端: 401 \ 前端: 200 \ H5: 200
+```
+
+## 目标代码在运行 JAR 中的证据(javap 独立复核)
+
+从线上 JAR 抽出 `BOOT-INF/classes/...` 并用 `javap -p` 反编译:
+
+| 目标变更 | 证据 |
+|---------|------|
+| `ButlerOneOnOneCoachService.class` | ✓ 存在;`public` 方法含 `createProfile` / `recordFollowUp` / `startConsultation` / `respondConsultation` / `checkServiceEntitlement` / `pauseFollowUp` / `sanitizeProfileSensitive` / `mergeConcurrentConsultations` / `configureSla` / `canAccessProfile` / `listRecords` / `listMessages` 等 ✓ |
+| `ButlerController.class` | ✓ 含字段 `private ButlerOneOnOneCoachService butlerOneOnOneCoachService`;`oneOnOneProfileCreate` / `oneOnOneFollowUp` / `oneOnOneConsultStart` / `oneOnOneConsultRespond` / `oneOnOneMessages` 五个接口方法 ✓ |
+| `AdminButlerController.class` / `ButlerOneOnOneCoachRecord.class` / `ButlerOneOnOneCoachRecordMapper.class` | ✓ 均存在 |
+| 目标 DDL | `schema.sql` 新增 `butler_one_on_one_coach_records` 表(经 `DatabaseInitializer` 迁移,启动健康检查通过) |
+
+## 健康回执(本会话直连探测)
+
+| 目标 | 探测 | 结果 |
+|------|------|------|
+| 后端基线 | `POST /api/admin/foods/list` | 401(无 token 预期)✓ |
+| 管理端 | `http://localhost/admin/`(Host: cfc.iwintrue.com) | 200 ✓ |
+| 小程序 H5 | `http://localhost/frontend/`(Host: cfc.iwintrue.com) | 200 ✓ |
+
+## 说明
+
+- 按编排要求,本次**未创建/修改/写入** `.workbuddy/tasks.json`,未写 `last_deployed`(该文件为编排侧本地事实源,不随项目内容同步)。
+- **实际部署成功的 commit hash(供编排侧 `--deploy-done testing --commit` 落盘):`364b87eb45ee61a6d5d361dffe3b00887b4f2316`**(线上 state `last_commit` 同值,JAR md5 一致,javap 证实目标代码在运行 JAR 中,PID 2839277)。
+- 小程序 H5 因已知 sass 环境问题本轮构建失败,沿用现有产物;后端与管理端产物均按目标 commit 重新构建部署。