# 自动化执行记录 R250(2026-11-17 03:22~05:xx GMT+8 · 定时闭环轮) ## 触发与档位 - 触发:定时自动化「测试负责人闭环(全部用例通过 + 覆盖 SRS/场景含异常流)+ 浏览器走 /admin 与 /frontend(189/本机每节点单任务)+ langgraph 派 251 + 结果有变提交远程并通知研发」 - 档位:**review(离线白名单)** + 内网浏览器 E2E + 251 pytest + 线上 API 只读点名 - 约束遵守:静默无人值守(未提问);未改 `src/main`;未启停任何服务;未强同步远端节点 ## 分支纪律(全部通过) | 时点 | 命令 | 结果 | |---|---|---| | 启动 | `git rev-parse --abbrev-ref HEAD` | `cfclub` ✅ | | 启动 | `git status --porcelain` | 47 项**仅未跟踪**,无 tracked 改动 ✅ | | 启动 | `git rev-list --left-right --count HEAD...origin/cfclub` | `0 0` ✅ | | 占用 | `git worktree list \| grep cfclub` | 仅主工作区持有 `cfclub` ✅ | | 收尾 | `git fetch` → `merge --ff-only origin/cfclub` | `d745ea898` → `441450150`(5 提交,零 src)→ `0 0` ✅ | | 提交 | 提交前 `rev-parse --abbrev-ref HEAD` | `cfclub` ✅ | ## 执行序列(含耗时) | # | 动作 | 命令/载体 | 结果 | 耗时 | |---|---|---|---|---| | 1 | 探活 7 端点 | curl | `251:9000`=000(lg 服务未起,pytest 不需)、`189:4090`/`204:4091`/`251:4096`=200、`/admin` `/frontend`=302 | 20s | | 2 | 后端全量(主窗口) | `mvn -o -B clean test` @ `.worktrees/test-lead-R250` | 113 类 / 1,009 例后中止(1.7 类/分钟,B-250-2) | 67m | | 3 | 后端 unit 层 + 定向 | `mvn -o -B surefire:test` @ `.worktrees/test-lead-R250-unit` | 290 类 / 2,643 例(含 9 类存量红复验) | ~12m | | 4 | 浏览器 admin(本机) | `node node_modules/@playwright/test/cli.js test -c playwright.config.live.js --project=admin-desktop` | 首跑 3/5(2 例 502 瞬态)→ 复跑 **5/5** | 49s + 1.6m | | 5 | 浏览器 frontend(本机) | 同上 `--project=frontend-mobile` | **6/6** | 1.1m | | 6 | shop + dx | 同上 `--project=shop-api --project=dx-bridge` | 4/4 + 2 跳 | 15s | | 7 | health 契约 | `-c playwright.config.health.js --project=health-api` | **13/13** | 4.5s | | 8 | 189 交叉 admin | opencode `/api/shell` @ `192.168.16.189:4090` | **5/5 EXIT=0**(HEAD `d7a51ecb3`/DIRTY=171) | 1.8m | | 9 | cfc-web Jest | `node node_modules/jest/bin/jest.js --json` | 135 = 125/10 | 49s | | 10 | cfc-frontend Jest | 同上 | 679 = 663/4/12 | 46s | | 11 | langgraph pytest @251 | opencode `/api/shell`(`--ignore=tests/qna --ignore=tests/test_chat.py`) | 51 = **45 过 / 6 红**(全 429) | 118s | | 12 | lg 隔离复跑 @251 | `pytest tests/test_intent.py tests/test_auto_tag.py` | 10 = 8 过 / 2 红(intent 5/5 绿) | 100s | | 13 | 线上 API 10 文件 | `-c playwright.config.api.js`(首次串行 900s 超时 → 后台 2400s 重跑) | 68 = 24 过 / 20 红 / 24 未执行 | 20.2m | | 14 | 匿名探针 8 端点 | `bash .r249/_anon_probe.sh`(复用于本轮) | 3/8 = 200 | 12s | | 15 | 归因用例同步 | 改写 `AttributionStage1FoundationTest` 2 条断言 → `mvn surefire:test` | **7/7 绿**(原 5/2 红) | 4m | ## 关键判据与反例(本轮方法论增量) 1. **`-Dtest='com.etotem.cfc.unit.*'` 在 surefire 2.22.2 下匹配 0 例**(BUILD FAILURE "No tests were executed"),浪费 15 分钟编译;正确写法为**路径风格** `-Dtest='com/etotem/cfc/unit/**/*Test.java'`,或直接用 `surefire:test` 复用已编译产物(免重编)。**教训:先 `-Dtest=单类` 验证 pattern 再投全包。** 2. **「非契约红类」必须当新回归对待**:`AttributionStage1FoundationTest` 不在历史 8 类存量清单内 → 立即取证,定性为 SRS 变更未同步(而非产品回归),并现场闭环,使真实红 19→17。 3. **`did not run` 不是 skip**:API 24 例属 `describe.serial` 组内上游失败后的连带未执行,不能计入通过,也不能计入红 → 单列「不可判定」。 4. **浏览器瞬态 502 的定性手法**:admin 首跑 2 红均卡在 `account-roles` 200 断言;立刻 curl 同端点 → `000`→`404`→`200` 三次变化,复跑 5/5 全绿 → 判环境瞬态(B-218-3 同型),不计回归。 5. **mtime 优先级聚合**:同一类在两个 worktree 都有 XML 时,按 `mtime` 取最新(定向复验结果覆盖首次结果),否则会用到过期的失败记录(本轮归因类差点被旧 XML 判红)。 6. **250 轮的全量策略**:`clean test` 速率劣化时,**保留已完成 XML + 另起 worktree 用 `surefire:test` 补层**,比等全量或整体重跑都省时(67m + 12m 换 401 类)。 ## 未实测 / 不可判定(如实登记) - 后端 **127 类未执行**(service 层为主 + 少量 integration),覆盖 401/528 = **75.9%** - G9 覆盖率未采集(无 jacoco/istanbul) - 性能测试未执行(execute 档未授权联网压测) - 根级 jest 未重跑(历史挂起,B-238-4) - API 24 例 `did not run`(serial 链上游失败) ## 产物 - `docs/tdd/orchestration/report-test-2026-11-17-R250.md`(20 类矩阵 + 5 条五要素 + 4 项缺口 + 门禁 + 附录) - `docs/tdd/test/notice-2026-11-17-R250-研发通知.md`(N-1~N-8) - `docs/tdd/test/blockers.md`(R250 段 12 条) - `docs/tdd/automation-run-2026-11-17-R250.md`(本文件) - `cfc-backend/src/test/java/com/etotem/cfc/config/AttributionStage1FoundationTest.java`(SRS 变更同步,2 条断言)