|
806
|
121
|
4
|
5
|
|
0
|
untracked files on codex/resource-health-axis: 5ef untracked files on codex/resource-health-axis: 5ef0d78 feat(integration): prepare trusted external SalesOrder fact inbox...
|
|
0
|
0
|
0
|
1
|
0
|
|
0
|
1790675336
|
1790675336
|
0
|
0
|
0
|
0
|
Edit
Delete
|
|
807
|
124
|
1
|
5
|
|
0
|
feat: add store manager cockpit prototype (tasks, feat: add store manager cockpit prototype (tasks, board, leaderboard)...
|
|
0
|
0
|
1
|
1
|
0
|
|
0
|
1791453499
|
1791453507
|
1791453507
|
0
|
0
|
0
|
Edit
Delete
|
|
808
|
124
|
2
|
5
|
|
0
|
feat: add review invitation guardrail to manager c feat: add review invitation guardrail to manager cockpit (SCO11)...
|
## 内容
- **SCO11 评价邀请话术护栏**:五类演示规则(诱导好评、利益换评价、删改差评 ## 内容
- **SCO11 评价邀请话术护栏**:五类演示规则(诱导好评、利益换评价、删改差评、截图回传、施压),先规整全角、空格、符号再匹配防绕过;总部独立审核,审核时复查;邀请任务只能用已审核版本完成
- **CLN04 遗失物品**(远程运营台 → 事件与售后)
- 保洁只能从本人进行中的保洁单登记,范围限清洁可见区域
- 运营确认保管,贵重物品入加锁柜,保管链留痕
- 凭同包厢订单或人工依据认领,只存打码电话
- 移交本人、代领(证件除外)、警方或平台;到期处置不能由登记人操作
- **MKT01 活动计划**:客群、门店、责任人、周期、停止条件在批准前必填(草稿可不完整,兼容持久化服务的创建调用);周期外或非适用门店拒绝预约与投放
- **测试证据**:11 项只有模块、没有测试的需求补 45 条测试;GRP06 拼团无代码,改判为未实现;各项"已证明 / 仍缺"见 `docs/acceptance-unimplemented.md`
- **任务包状态**:新增 `ops/sync-package-status.mjs`,从验收矩阵算出状态,写入开发计划追踪和任务包矩阵(文档 22),带 `--check`
## 验证
- 原型测试 255/256:唯一失败是缺 `dist` 构建产物的打包测试
- 服务端可独立运行的测试 363/366:3 个失败是本工作区未编译框架 `dist`,与本改动无关
- `node ops/check-acceptance.mjs --check`、`node ops/sync-package-status.mjs --check`、`python3 scripts/verify-development-plan.py` 均通过
- 矩阵:127 项部分实现、2 项未实现(GAM05、GRP06)、83 项外部依赖、0 签认
- 浏览器验证:话术拦截与审核、遗失物品全流程、活动计划缺项拦截与批准
## 注意
- 话术规则、保管期 30 天、停止条件均为演示参数,待 D35 和门店政策确认
- 合并后如果再改源文件或测试:先运行 `node ops/sync-package-status.mjs`,再运行 `node ops/check-acceptance.mjs` 重新生成矩阵
🤖 Generated with [Claude Code](https://claude.com/claude-code)...
|
0
|
0
|
1
|
1
|
0
|
|
0
|
1791470731
|
1791510657
|
1791510657
|
0
|
0
|
0
|
Edit
Delete
|
|
809
|
124
|
3
|
5
|
|
0
|
feat: 补齐 9 项需求的原型规则与证据(HQR04 REV04 MKT05 LEA04 INS feat: 补齐 9 项需求的原型规则与证据(HQR04 REV04 MKT05 LEA04 INS05 SUP06 STO05 ALI05 DAT03)...
|
基于 PR #2(`claude/sco11-invite`)。PR #2 合并后请将目标分支改为 基于 PR #2(`claude/sco11-invite`)。PR #2 合并后请将目标分支改为 `main`。
## 内容
- **HQR04 视频墙**:筛选、排序、分页、轮巡规则抽到 `hq-wall-domain.mjs`,页面行为不变
- **REV04 评价统计**:按周趋势并注明覆盖范围、处理时长中位数和 P90、整改后复发、是否能宣称口碑提升
- **MKT05 活动复盘**:继续、调整、扩大、暂停、停止建议,标注为关联观察,不计算增量;复盘决定会联动门店活动执行
- **LEA04 线索分析**:去重、只计可靠关联的转化、跟进及时性、渠道费用核对后才算获客成本、观察期满才计流失
- **INS05 巡检分析**:计划完成、整改耗时(算到独立核实)、复发、交接;每个指标可追溯到来源记录;只看关闭数量时给出提醒
- **SUP06 辅助答复**:知识只管措辞且有版本;状态句只取自已查询的业务事实;事实无法确认时转人工;发送须客服确认
- **STO05 跨店替代**:冻结原承诺快照;顾客明确选择;补差须单独同意;目标店独立接收后责任才转移
- **ALI05 合作素材**:素材授权核验,缺授权、渠道不符或过期则拒绝验收;合作费用单列;合作复盘只计明确关联
- **DAT03 品牌指标**:曝光、态度、消费、复购四项并列;复购须整组观察期满才给比率;缺来源显示空值而不是 0
## 验证
- 原型测试 303/304:唯一失败是缺 `dist` 构建产物的打包测试
- 服务端可独立运行的测试 363/366:3 个失败是本工作区未编译框架 `dist`,与本改动无关
- `node ops/check-acceptance.mjs --check`、`node ops/sync-package-status.mjs --check`、`python3 scripts/verify-development-plan.py` 均通过
- 每项都在浏览器中走通主流程,控制台无报错
## 注意
- 改动到共享代码的地方:
- `services/ktv/application.mjs`:活动状态联动改用共享函数 `linkedActivityStatus`
- 合作验收新增素材授权检查:种子素材已补授权,原有流程测试不受影响
- 所有阈值和演示数据都标为演示参数,待 D19、D25 等决策确认;真实渠道和数据源仍依赖 DEP09、DEP15
🤖 Generated with [Claude Code](https://claude.com/claude-code)...
|
0
|
0
|
1
|
1
|
0
|
|
0
|
1791508977
|
1791508987
|
1791508987
|
0
|
0
|
0
|
Edit
Delete
|
|
810
|
124
|
4
|
5
|
|
0
|
test: add clause-level evidence for 14 thinly cove test: add clause-level evidence for 14 thinly covered P0 requirements...
|
|
0
|
0
|
1
|
1
|
0
|
|
0
|
1791510359
|
1791510367
|
1791510367
|
0
|
0
|
0
|
Edit
Delete
|
|
811
|
124
|
5
|
5
|
|
0
|
feat: add review invitation guardrail to manager c feat: add review invitation guardrail to manager cockpit (SCO11)...
|
基于 PR #2(`claude/sco11-invite`,已包含 PR #3)。PR #2 合并 基于 PR #2(`claude/sco11-invite`,已包含 PR #3)。PR #2 合并后,请把本 PR 的目标改为 `main`。
## 内容
- **14 项 P0 逐条证据**:为 CON03、SELF04/05/08/09/12、JRN01/03–06、CLN03、INS03、OPN02 补 58 条测试,不改源码。查到的缺口写入 `docs/acceptance-unimplemented.md`,例如:上一场私人欢迎和素材的清除逻辑缺失、限制名单没有批准生效动作、经营指标是固定样例、没有节假日价格日历
- **GRP06 拼团**(活动执行页)
- 规则须经 D29 批准才能开团
- 参与时校验团版本,防止并发超额
- 成团只产生"已成团待预约",预约另查容量,且不等于入场
- 未成团时逐人生成"待退款核对",不自动退款
- **GAM05 奖品额度**(活动执行页)
- 额度负责人、成本负责人、单价没登记就不能发奖
- 多个活动共用一个奖品池,数量和预算都不超
- 参与授权与音视频宣传授权分开
- **外部对接推进清单** `docs/integration-readiness.md`:按卡住的 P0 数量排序,列出每项依赖要业务方提供什么、接通前怎么降级、由哪个工程包承接
- 验收矩阵:未实现 2 项 → 0 项;有命名证据的需求 165 → 179
## 验证
- 原型测试 369/370:唯一失败是缺 `dist` 构建产物的打包测试
- `node ops/check-acceptance.mjs --check`、`node ops/sync-package-status.mjs --check`、`python3 scripts/verify-development-plan.py` 均通过
- 拼团与奖品两条流程已在浏览器中走通,控制台无报错
## 注意
- 所有拼团规则与奖品参数都是演示值,要等 D29 和 GAM05 的负责人确定后才能正式使用
- 签认仍为 0;30 项 P0 需等外部对接
🤖 Generated with [Claude Code](https://claude.com/claude-code)...
|
0
|
0
|
1
|
1
|
0
|
|
0
|
1791510471
|
1791510481
|
1791510481
|
0
|
0
|
0
|
Edit
Delete
|
|
812
|
124
|
6
|
5
|
|
0
|
feat(SUP01): public FAQ and pre-booking customer h feat(SUP01): public FAQ and pre-booking customer help on current main...
|
Port the public FAQ, pre-booking general help and Port the public FAQ, pre-booking general help and original help-record
targeting from codex/ktv-delivery-integration (5d56fcc) onto main's
consumer workspace reader (f295ce8), instead of the older readSerial guard.
- Signed-out and no-booking customers can open the FAQ; it exposes no
customer, store, price or device facts.
- Signed-in customers without a booking can save a store-level general
help request; payment/redeem/door topics still require the original
booking. Results reuse independent review and customer confirmation.
- Receipts locate the exact original help record; help drafts and result
notes are cleared only within the same identity and help scope.
- SUP01 gets named test mappings (consumer-help, prototype-enhancement,
persistence).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>...
|
0
|
0
|
1
|
1
|
0
|
|
0
|
1791558540
|
1791558556
|
1791558556
|
0
|
0
|
0
|
Edit
Delete
|
|
813
|
124
|
7
|
5
|
|
0
|
test: prepare CON01 sandbox sign-off for booking s test: prepare CON01 sandbox sign-off for booking slots...
|
|
0
|
0
|
1
|
1
|
0
|
|
0
|
1791558679
|
1791558684
|
1791558684
|
0
|
0
|
0
|
Edit
Delete
|
|
814
|
124
|
8
|
5
|
|
0
|
fix(AUD-EXIT): keep fulfilling original obligation fix(AUD-EXIT): keep fulfilling original obligations after cooperation exit...
|
Exit used to freeze an exiting cooperation: delive Exit used to freeze an exiting cooperation: deliveries were rejected, so
open promises had no continued-handling path (ALI01, AC30).
- deliver accepts active or exiting cooperations, still capped by each
original obligation; after-exit entries are tagged phase:'after-exit'
with the acting principal.
- exit records which obligations were open at that moment; there is still
no action that adds new obligations, and approve stays draft-only.
- new completeExit moves exiting -> exited only when every original
obligation is delivered (OBLIGATIONS_OPEN otherwise); exited rejects
further deliveries. Finance reconcile is unaffected and funds remain
unverified.
- store workbench mirrors the rules and adds a 完成退出 action.
- ALI01/AC30 named test mapping for the new rule test.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>...
|
0
|
0
|
1
|
1
|
0
|
|
0
|
1791559039
|
1791559044
|
1791559044
|
0
|
0
|
0
|
Edit
Delete
|
|
815
|
124
|
9
|
5
|
|
0
|
test: move remaining hardcoded booking fixtures on test: move remaining hardcoded booking fixtures onto future dates...
|
The CRM04/BRD04 20:30 failures were already fixed The CRM04/BRD04 20:30 failures were already fixed on main (3e41516,
4941806). Running the self-contained suites under a shifted clock found
two more booking fixtures that would start failing once their date passed:
- composition-fixtures.mjs booked 2026-10-20, so all seven PER07 tests
fail from 20:30 Asia/Shanghai that day.
- prototype-enhancement.persistence.test.mjs defaulted to 2026-10-12 and
used 10-13/14/15 for its other bookings.
Both now go through futureBookingDate(), which keeps weekdays and distinct
dates while staying ahead of the server day.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>...
|
0
|
0
|
1
|
1
|
0
|
|
0
|
1791559271
|
1791559275
|
1791559275
|
0
|
0
|
0
|
Edit
Delete
|
|
816
|
124
|
10
|
5
|
|
0
|
test: dedicated evidence for 14 P1/P2 requirements test: dedicated evidence for 14 P1/P2 requirements and strict licence dates...
|
|
0
|
0
|
1
|
1
|
0
|
|
0
|
1791559454
|
1791559459
|
1791559459
|
0
|
0
|
0
|
Edit
Delete
|
|
817
|
124
|
11
|
5
|
|
0
|
test: dedicated evidence for 14 P1/P2 requirements test: dedicated evidence for 14 P1/P2 requirements and strict licence dates...
|
|
0
|
0
|
0
|
1
|
0
|
|
0
|
1791559480
|
1791559480
|
0
|
0
|
0
|
0
|
Edit
Delete
|
|
818
|
124
|
12
|
5
|
|
0
|
feat(GOV01): renew development test registration w feat(GOV01): renew development test registration without rotating identities...
|
The registered development scope had no renewal pa The registered development scope had no renewal path: rerunning the script
only re-validated the file, and bindings expire 30 days after generation.
- renewDevelopmentRegistration() keeps tenant, store, registration, binding
and person UUIDs; only active bindings get expiresAt = now + days
(1-30, default 30). Revoked/suspended people are never revived. Each
renewal records time, authorization and previous expiry in `renewals`.
- ops/register-development-test-scope.mjs --renew "<authorization>".
- Renewed the fixture once: 2026-11-07T02:15Z -> 2026-11-08T15:33Z.
- Running registered gateways read their release copy and need a redeploy.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>...
|
0
|
0
|
1
|
1
|
0
|
|
0
|
1791560333
|
1791560339
|
1791560339
|
0
|
0
|
0
|
Edit
Delete
|
|
819
|
124
|
13
|
5
|
|
0
|
feat(GOV01): allow 90-day development registration feat(GOV01): allow 90-day development registration renewals and renew again...
|
At the user's request the renewal cap and defa At the user's request the renewal cap and default go from 30 to 90 days
(DEVELOPMENT_RENEWAL_MAX_DAYS); first-time generation still issues 30 days.
Renewed the fixture again with the same identities: bindings now expire
2027-01-07T15:38:57Z. Both renewals are recorded in `renewals`.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>...
|
0
|
0
|
1
|
1
|
0
|
|
0
|
1791560579
|
1791560584
|
1791560584
|
0
|
0
|
0
|
Edit
Delete
|
|
820
|
124
|
14
|
5
|
|
0
|
Merge remote-tracking branch 'origin/main' Merge remote-tracking branch 'origin/main' into claude/vid01-adv03...
|
|
0
|
0
|
1
|
1
|
0
|
|
0
|
1791560682
|
1791560687
|
1791560687
|
0
|
0
|
0
|
Edit
Delete
|
|
821
|
124
|
15
|
5
|
|
0
|
docs: record verbal confirmation of development de docs: record verbal confirmation of development defaults (2026-10-09)...
|
|
0
|
0
|
1
|
1
|
0
|
|
0
|
1791561736
|
1791561742
|
1791561742
|
0
|
0
|
0
|
Edit
Delete
|
|
822
|
124
|
16
|
5
|
|
0
|
docs: 开发默认值口头确认,并刷新验收矩阵
|
- required-business-decisions.md:开发默认值表标为“2026-10- - required-business-decisions.md:开发默认值表标为“2026-10-09 已口头确认,待正式审批记录”,包括秒杀迟到支付转人工退款核对、转写中断片段不能校对两条补充规则;仍待定的部分(门店地址随 BD01、暂锁到期是否通知、可校对岗位、真实开票能力)单独写明。
- 这只是口头确认:代码里的策略仍是 approved:false,要等正式批准记录到位后再改;没有启用任何真实支付、设备、平台、开票或语音识别能力。
- 重新生成验收矩阵:#12/#13 合并后 main 上的矩阵已过期,重跑 903/903 通过,--check 恢复为 0。
🤖 Generated with [Claude Code](https://claude.com/claude-code)...
|
0
|
0
|
0
|
1
|
0
|
|
0
|
1791588968
|
1791588968
|
0
|
0
|
0
|
0
|
Edit
Delete
|
|
823
|
124
|
17
|
5
|
|
0
|
feat(AC79): move video wall layout controls into t feat(AC79): move video wall layout controls into the domain and add evidence...
|
AC79 (HQR04) was the only non-external acceptance AC79 (HQR04) was the only non-external acceptance case without named
evidence: group/flat, 4/9/16, paging, sorting and rotation switches must
keep the scope, and mobile focus/return must stay reachable.
- hq-wall-domain: wallControl() owns slots/sort/pin/mode/page/tour changes
and never touches store, region, type or point scope; wallSections()
derives group/flat sections for the current page.
- HeadquartersConsole/VideoWall use them instead of inline setters; the
behavior is unchanged (layout, risk-first, manual paging, focus and talk
stop rotation; group/flat keeps the page; sort/pin/layout reset to page 1).
- New AC79 test walks every switch over three scopes and checks each page
covers the scope exactly once; AC79 maps to it.
- Browser (store dev server, demo data): 北区 scope stayed 12 cameras/3
stores through 4->flat->risk->16; next-page stopped rotation; at 375px,
focus moved to the detail panel and return restored scroll and the
original focus button.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>...
|
0
|
0
|
1
|
1
|
0
|
|
0
|
1791589290
|
1791589300
|
1791589300
|
0
|
0
|
0
|
Edit
Delete
|
|
824
|
18
|
230
|
1
|
|
0
|
登录和验证密码增加次数限制。
|
|
0
|
0
|
1
|
1
|
0
|
|
0
|
1791868121
|
1791868133
|
1791868133
|
0
|
0
|
0
|
Edit
Delete
|
|
825
|
18
|
231
|
1
|
|
0
|
登录和验证密码增加次数限制。
|
|
0
|
0
|
1
|
1
|
0
|
|
0
|
1791868153
|
1791868177
|
1791868177
|
0
|
0
|
0
|
Edit
Delete
|
|
826
|
22
|
114
|
1
|
|
0
|
激活判断其他门店的错误提示语
|
|
0
|
0
|
1
|
1
|
0
|
|
0
|
1791868409
|
1791868415
|
1791868415
|
0
|
0
|
0
|
Edit
Delete
|
|
827
|
22
|
115
|
1
|
|
0
|
激活判断其他门店的错误提示语
|
|
0
|
0
|
1
|
1
|
0
|
|
0
|
1791868428
|
1791868433
|
1791868433
|
0
|
0
|
0
|
Edit
Delete
|
|
828
|
23
|
63
|
1
|
|
0
|
1111
|
|
0
|
0
|
1
|
1
|
0
|
|
0
|
1791868451
|
1791868458
|
1791868458
|
0
|
0
|
0
|
Edit
Delete
|
|
829
|
23
|
64
|
1
|
|
0
|
1111
|
|
0
|
0
|
1
|
1
|
0
|
|
0
|
1791868475
|
1791868484
|
1791868484
|
0
|
0
|
0
|
Edit
Delete
|
|
830
|
23
|
65
|
1
|
|
0
|
1111
|
|
0
|
0
|
1
|
1
|
0
|
|
0
|
1791868652
|
1791868657
|
1791868657
|
0
|
0
|
0
|
Edit
Delete
|
|
831
|
21
|
342
|
1
|
|
0
|
包厢安全信息二维码
|
|
0
|
0
|
1
|
1
|
0
|
|
0
|
1791883266
|
1791883284
|
1791883284
|
0
|
0
|
0
|
Edit
Delete
|
|
832
|
21
|
343
|
1
|
|
0
|
包厢安全信息二维码
|
|
0
|
0
|
1
|
1
|
0
|
|
0
|
1791883297
|
1791883305
|
1791883305
|
0
|
0
|
0
|
Edit
Delete
|
|
833
|
21
|
344
|
1
|
|
0
|
营业时间盘点单
|
|
0
|
0
|
1
|
1
|
0
|
|
0
|
1792057288
|
1792057294
|
1792057294
|
0
|
0
|
0
|
Edit
Delete
|
|
834
|
21
|
345
|
1
|
|
0
|
包厢安全信息二维码
|
|
0
|
0
|
1
|
1
|
0
|
|
0
|
1792057321
|
1792057332
|
1792057332
|
0
|
0
|
0
|
Edit
Delete
|
|
835
|
18
|
232
|
1
|
|
0
|
需求 pc小程序设置 16881
|
|
0
|
0
|
1
|
1
|
0
|
|
0
|
1792376943
|
1792377006
|
1792377006
|
0
|
0
|
0
|
Edit
Delete
|
|
836
|
18
|
233
|
1
|
|
0
|
需求 pc小程序设置 16881
|
|
0
|
0
|
1
|
1
|
0
|
|
0
|
1792377026
|
1792377034
|
1792377034
|
0
|
0
|
0
|
Edit
Delete
|
|
837
|
21
|
346
|
1
|
|
0
|
其他 兼容方法变更
|
|
0
|
0
|
1
|
1
|
0
|
|
0
|
1792377221
|
1792377227
|
1792377227
|
0
|
0
|
0
|
Edit
Delete
|
|
838
|
21
|
347
|
1
|
|
0
|
其他 兼容方法变更
|
|
0
|
0
|
1
|
1
|
0
|
|
0
|
1792377236
|
1792377247
|
1792377247
|
0
|
0
|
0
|
Edit
Delete
|
|
839
|
21
|
348
|
1
|
|
0
|
修复美团预订核销bug
|
|
0
|
0
|
1
|
1
|
0
|
|
0
|
1792393336
|
1792393342
|
1792393342
|
0
|
0
|
0
|
Edit
Delete
|
|
840
|
21
|
349
|
1
|
|
0
|
修复美团预订核销bug
|
|
0
|
0
|
1
|
1
|
0
|
|
0
|
1792393351
|
1792393357
|
1792393357
|
0
|
0
|
0
|
Edit
Delete
|
|
841
|
116
|
2
|
5
|
|
0
|
fix(credential-sdk): harden bounded responses and fix(credential-sdk): harden bounded responses and redirect cleanup...
|
|
0
|
0
|
0
|
1
|
0
|
|
0
|
1792411245
|
1792411245
|
0
|
0
|
0
|
0
|
Edit
Delete
|
|
842
|
116
|
3
|
5
|
|
0
|
fix(channel-sdk): bound response bodies and reject fix(channel-sdk): bound response bodies and reject redirected results...
|
|
0
|
0
|
0
|
1
|
0
|
|
0
|
1792411267
|
1792411267
|
0
|
0
|
0
|
0
|
Edit
Delete
|
|
843
|
146
|
1
|
1
|
|
0
|
php8.3
|
|
0
|
0
|
1
|
1
|
0
|
|
0
|
1793066913
|
1793066921
|
1793066921
|
0
|
0
|
0
|
Edit
Delete
|
|
844
|
83
|
1
|
5
|
|
0
|
docs(governance): sync dynamic baseline with curre docs(governance): sync dynamic baseline with current D3 reports...
|
Refresh the GOVERNANCE-BASELINE section of CLAUDE. Refresh the GOVERNANCE-BASELINE section of CLAUDE.md from
reports/governance.latest.json, reports/baseline-d3.json and the
2026-10-25 runtime/UI/RLS reports plus the 2026-09-23 OS audits:
static governance now passes, runtime 452, UI 46, RLS 116 tables,
own tests 69/471, single-host outbox/health scenarios, OS product
0.19.4 upgrade ready and release blocked only by remote CI and
target sign-off. Retire the native Fastify UI row and keep earlier
dual-host figures labelled as history.
Verified with check:governance-docs, check:docs-truth and
check:dual-backend (all exit 0); regenerated gate reports were not
committed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
<!--
PR 治理模板。提交前请逐项确认,确保符合 docs/standards 下的工程规范。
CI 会执行:pnpm check(命名 + 单源漂移 + 治理棘轮 + lint + typecheck);
有测试 DB 的流水线另执行 DATABASE_URL=... pnpm check:runtime。
-->
## 变更内容
<!-- 简述这次改了什么、为什么改(聚焦 why) -->
-
## 涉及业务概念
<!-- 列出涉及的业务词典英文名,例如 store / order / verification。参见 docs/domain-glossary.md -->
-
## 检查清单
### 命名一致性
- [ ] 业务概念使用了词典中的标准英文名(未出现 shop/branch/seller/voucher/writeOff 等禁用词)
- [ ] 数据库 snake_case + 复数表名;API/JSON 字段 camelCase;类型 PascalCase;常量 SCREAMING_SNAKE_CASE
- [ ] `pnpm check:naming` 通过
- [ ] `pnpm check:schema` 通过,未新增第二份状态/契约真源
### API / 契约
- [ ] 不涉及 API 变更
- [ ] 新增/修改了 API,路由符合当前生命周期规范:既有 Personnel Core 保持 `/api/personnel/*`,HR v2 领域使用 `/api/v2/{domain}/*`,身份协议使用标准 OIDC 端点
- [ ] 已更新 `packages/contracts` 中的 Zod schema / DTO / 类型(前后端共用同一份)
- [ ] 无破坏前端兼容的字段删除/重命名(如有,已在描述中说明迁移方案)
### 数据库
- [ ] 不涉及数据库变更
- [ ] 新增/修改了表或字段,已通过 migration review(表名复数、字段 snake_case、外键 xxx_id、时间 _at、状态 status)
- [ ] 高增长表已考虑分区;涉及多租户的表带 tenant_id
- [ ] 写链显式带 tenant_id;跨租户读写按 404/隔离口径处理
### 数据库迁移(迁移即代码:版本/顺序/内容/环境/发布/回滚一致)
- [ ] 改 schema.prisma 的同时**已生成并提交 migration**(`pnpm db:migrate:dev --name <change>`),未只改 schema 不落迁移
- [ ] **未修改已发布过的历史 migration 文件**(内容一致:历史不可变,新变更走新迁移)
- [ ] `pnpm check:migrations` 通过(迁移历史在位 / 无未豁免高危 DDL / schema 表、enum、`@map` 列均已落迁移)
- [ ] 破坏性变更(删表/删列/改名/改类型/加 NOT NULL/加唯一约束)走 **expand→migrate→contract** 三阶段,不一次切
- [ ] 大表加索引用 `CREATE INDEX CONCURRENTLY`;大批量回填走 BullMQ 分批任务,不塞进 migration
- [ ] 高危但确需的 DDL 已加 `-- migration-allow:<原因>` 留痕,并在下方回滚方案说明
- [ ] 非开发环境只用 `migrate deploy`(禁止 `db push` / 线上手动 ALTER);发布前 `pnpm db:migrate:status` 无 drift
### 实时 / 队列
- [ ] 不涉及
- [ ] 关键业务事件进入 BullMQ 或持久化事件表(未仅依赖 Redis Pub/Sub)
- [ ] 写库事件与真实写操作在同一 tx 写入 outbox,未在 commit 后旁路 publish
- [ ] 实时通道选型符合规范(订单/看板/通知用 SSE;设备在线/包间控制/IM 用 WebSocket)
### 质量与发布
- [ ] 通过 `pnpm lint` 与 `pnpm typecheck`
- [ ] 通过 `pnpm check:governance`,`reports/*.latest.json` 已刷新且无棘轮回退
- [ ] 涉及写链 / DB / 租户 / 状态机时,通过 `DATABASE_URL=... pnpm check:runtime`,`reports/runtime-acceptance.latest.json` 已刷新
- [ ] 涉及页面或浏览器行为时,`pnpm check:ui` 与 `pnpm check:ui:fastify` 均通过,未只验证一个后端
- [ ] 已补充/更新必要的测试
- [ ] 不需要回滚方案
- [ ] 需要回滚方案,已在下方说明
## 回滚方案 / 其他说明
-
...
|
0
|
0
|
1
|
1
|
0
|
|
0
|
1793092331
|
1793092337
|
1793092337
|
0
|
0
|
0
|
Edit
Delete
|
|
845
|
83
|
2
|
5
|
|
0
|
fix(ci): re-hash O18 OS Web sources from an explic fix(ci): re-hash O18 OS Web sources from an explicit locked OS checkout...
|
O18 re-hashed OS Web sources through the osRoot re O18 re-hashed OS Web sources through the osRoot recorded inside the
host UI report, an ephemeral /tmp clone that never exists on a CI
runner and disappears locally after cleanup. governance.yml therefore
failed on every Gitea run and the runtime/UI job never executed.
- O18 now only trusts --os-root / DIGITAL_EMPLOYEE_OS_ROOT and fails
closed with an explicit message when neither is given; new negative
probe product-host-ui-without-explicit-os-root (258 probes).
- The static CI job resolves compatibilityLock.osGitSha from
readiness.json, checks out luoanwu/digital-employee-os at that SHA
with secret OS_REPO_READ_TOKEN, moves it to RUNNER_TEMP, builds the
compat packages and asserts a clean tree; Node 22 to satisfy the OS
engine-strict requirement.
- Docs: CLAUDE.md commands/G9/G14/ci-gate, README, acceptance-runner
and business-module-intake now state the OS checkout requirement.
Local evidence (dirty worktree): clean OS clone at e12d0f2 makes
check:os-product pass; missing root and a tampered OS Web file both
fail O18. Full pnpm check still fails check:governance on runtime/UI
report fingerprints, which predates this change and needs a rerun of
check:runtime and check:ui on the final tree.
🤖 Generated with [Claude Code](https://claude.com/claude-code)...
|
0
|
0
|
1
|
1
|
0
|
|
0
|
1793094537
|
1793095912
|
1793095912
|
0
|
0
|
0
|
Edit
Delete
|
|
846
|
83
|
3
|
5
|
|
0
|
fix(ci): fetch locked OS with a Gitea token header fix(ci): fetch locked OS with a Gitea token header and probe access first...
|
actions/checkout presented OS_REPO_READ_TOKEN as B actions/checkout presented OS_REPO_READ_TOKEN as Basic credentials and
Gitea answered 401 (git fell back to a username prompt) for two
different correctly scoped tokens. Fetch the locked SHA with plain git
and an "Authorization: token" header into RUNNER_TEMP instead, after a
Gitea API probe that prints only the HTTP status, so a missing secret,
unusable token or missing repository access fails with a clear reason.
This step also no longer downloads an action from github.com.
🤖 Generated with [Claude Code](https://claude.com/claude-code)...
|
0
|
0
|
1
|
1
|
0
|
|
0
|
1793096204
|
1793096226
|
1793096226
|
0
|
0
|
0
|
Edit
Delete
|
|
847
|
83
|
4
|
5
|
|
0
|
ci: stop pulling actions from github.com on the Gi ci: stop pulling actions from github.com on the Gitea runner...
|
The Gitea runner repeatedly timed out cloning acti The Gitea runner repeatedly timed out cloning actions/checkout from
github.com (once hanging Set up job for over 10 minutes), so jobs failed
or blocked the single runner before any repository code ran.
- Checkout: plain git with the Gitea task token as Basic credentials,
all branches and tags fetched (F5 provenance needs history), detached
at github.sha, workspace cleaned.
- Node: scripts/ci-setup-node.sh downloads an exact version from
npmmirror and verifies it against the mirror's SHASUMS256.txt; both
governance jobs and the platform job use 22.23.2.
- platform-governance: upload-artifact replaced by printing the gate
reports into the run log. This file now diverges from the
@juhai/governance consumer template.
Verified locally: the checkout snippet against a file:// copy of this
repository (detached at the requested SHA, stale files removed); the
Node script in a linux/arm64 container with a test-only curl stand-in
(install, cache reuse, tampered archive rejected, unknown version
rejected).
🤖 Generated with [Claude Code](https://claude.com/claude-code)...
|
0
|
0
|
1
|
1
|
0
|
|
0
|
1793096895
|
1793096902
|
1793096902
|
0
|
0
|
0
|
Edit
Delete
|
|
848
|
83
|
5
|
5
|
|
0
|
docs(governance): record first remote run past O18 docs(governance): record first remote run past O18 and the stale acceptance provenance...
|
<!--
PR 治理模板。提交前请逐项确认,确保符合 docs/standards 下的 <!--
PR 治理模板。提交前请逐项确认,确保符合 docs/standards 下的工程规范。
CI 会执行:pnpm check(命名 + 单源漂移 + 治理棘轮 + lint + typecheck);
有测试 DB 的流水线另执行 DATABASE_URL=... pnpm check:runtime。
-->
## 变更内容
<!-- 简述这次改了什么、为什么改(聚焦 why) -->
-
## 涉及业务概念
<!-- 列出涉及的业务词典英文名,例如 store / order / verification。参见 docs/domain-glossary.md -->
-
## 检查清单
### 命名一致性
- [ ] 业务概念使用了词典中的标准英文名(未出现 shop/branch/seller/voucher/writeOff 等禁用词)
- [ ] 数据库 snake_case + 复数表名;API/JSON 字段 camelCase;类型 PascalCase;常量 SCREAMING_SNAKE_CASE
- [ ] `pnpm check:naming` 通过
- [ ] `pnpm check:schema` 通过,未新增第二份状态/契约真源
### API / 契约
- [ ] 不涉及 API 变更
- [ ] 新增/修改了 API,路由符合当前生命周期规范:既有 Personnel Core 保持 `/api/personnel/*`,HR v2 领域使用 `/api/v2/{domain}/*`,身份协议使用标准 OIDC 端点
- [ ] 已更新 `packages/contracts` 中的 Zod schema / DTO / 类型(前后端共用同一份)
- [ ] 无破坏前端兼容的字段删除/重命名(如有,已在描述中说明迁移方案)
### 数据库
- [ ] 不涉及数据库变更
- [ ] 新增/修改了表或字段,已通过 migration review(表名复数、字段 snake_case、外键 xxx_id、时间 _at、状态 status)
- [ ] 高增长表已考虑分区;涉及多租户的表带 tenant_id
- [ ] 写链显式带 tenant_id;跨租户读写按 404/隔离口径处理
### 数据库迁移(迁移即代码:版本/顺序/内容/环境/发布/回滚一致)
- [ ] 改 schema.prisma 的同时**已生成并提交 migration**(`pnpm db:migrate:dev --name <change>`),未只改 schema 不落迁移
- [ ] **未修改已发布过的历史 migration 文件**(内容一致:历史不可变,新变更走新迁移)
- [ ] `pnpm check:migrations` 通过(迁移历史在位 / 无未豁免高危 DDL / schema 表、enum、`@map` 列均已落迁移)
- [ ] 破坏性变更(删表/删列/改名/改类型/加 NOT NULL/加唯一约束)走 **expand→migrate→contract** 三阶段,不一次切
- [ ] 大表加索引用 `CREATE INDEX CONCURRENTLY`;大批量回填走 BullMQ 分批任务,不塞进 migration
- [ ] 高危但确需的 DDL 已加 `-- migration-allow:<原因>` 留痕,并在下方回滚方案说明
- [ ] 非开发环境只用 `migrate deploy`(禁止 `db push` / 线上手动 ALTER);发布前 `pnpm db:migrate:status` 无 drift
### 实时 / 队列
- [ ] 不涉及
- [ ] 关键业务事件进入 BullMQ 或持久化事件表(未仅依赖 Redis Pub/Sub)
- [ ] 写库事件与真实写操作在同一 tx 写入 outbox,未在 commit 后旁路 publish
- [ ] 实时通道选型符合规范(订单/看板/通知用 SSE;设备在线/包间控制/IM 用 WebSocket)
### 质量与发布
- [ ] 通过 `pnpm lint` 与 `pnpm typecheck`
- [ ] 通过 `pnpm check:governance`,`reports/*.latest.json` 已刷新且无棘轮回退
- [ ] 涉及写链 / DB / 租户 / 状态机时,通过 `DATABASE_URL=... pnpm check:runtime`,`reports/runtime-acceptance.latest.json` 已刷新
- [ ] 涉及页面或浏览器行为时,`pnpm check:ui` 与 `pnpm check:ui:fastify` 均通过,未只验证一个后端
- [ ] 已补充/更新必要的测试
- [ ] 不需要回滚方案
- [ ] 需要回滚方案,已在下方说明
## 回滚方案 / 其他说明
-
...
|
0
|
0
|
1
|
1
|
0
|
|
0
|
1793099401
|
1793099408
|
1793099408
|
0
|
0
|
0
|
Edit
Delete
|
|
849
|
83
|
6
|
5
|
|
0
|
feat(integration): AI 人事系统与企业智能OS各层对接——0.19.6、OS D feat(integration): AI 人事系统与企业智能OS各层对接——0.19.6、OS D3 单宿主验收链、OS 装载器注册证据与各层对接材料...
|
## 概要
把 AI 人事系统(`juhai.hr`)与企业智能OS各层(02 业务中台 / ## 概要
把 AI 人事系统(`juhai.hr`)与企业智能OS各层(02 业务中台 / 03 数字员工 OS / 04 技术中台 / 00 工程框架)的对接推进到「HR 侧能独立完成的都已完成」,其余项给出材料并列为待裁。完整记录见 `docs/domain/enterprise-control-plane-integration-blueprint-2026-10-27.md` §4–§5(取代 09-26 版)。
## 主要改动
- **产品真源收回 HR 仓,发布 0.19.6**:回灌 OS 已登记的 0.19.5;逐字节收录 OS 已执行的整表授权迁移 `20261010000000`,并以 `20261027000000` 前向收窄回 relay 两张表的精确列授权。产品迁移治理按全序列模拟最终授权,缺少或绕过收窄都会判红。
- **D3 受控升级台账**:`docs/post-d3-product-updates.json` 让 D3 冻结的产品字节和 `readiness.json` 只能按链放行(readiness 自干净复验值起链),C4 历史锁不变。
- **验收链跟进 OS D3(单 NestJS)**:宿主范围以目标 OS `backend-profile.json` 为唯一来源(`scripts/lib/os-host-backends.mjs`),拒绝加载残留的 Fastify 构建物;兼容锁对齐 OS `1b8ae0d7`(contracts 3.0.0);D-6 按锚定换算表把 12 项按后端累加的宿主证据地板换算为单后端。
- **注册证据改接 OS 装载器(D-5)**:lock v2 目标的 O20/O24/O26 只认 `pnpm audit:os-product:loader` 的只读证据(plan / apply 预演 / reconcile、4 个负向探针、目标提交回滚测试、目标写入 0);HR v1 写入器只留给 lock v1 目标。
- **O27 与发布证据**:按锁定后端数与注册路径取证;O27 转绿。
- **各层对接材料(草案,未改他层仓)**:人域对照表、事实登记 CHG 草案、应用清单镜像同步材料、权限决策答复草稿、框架同步差额评估、给 OS Owner 的交接说明。
- **仓内不一致修正**:app-manifest 仓库路径用工作区别名 `企业领域应用层/AI人事系统`;`authoritativeEntities` 去掉 IdentityLink(enterprise-idp 拥有);补 `ees.domain.thing` 依赖;`governance/framework-consumer.json` 地板改为 D3 换算后的 471/452。
- 已合并当前 `main`(含 CI 与 O18 显式 OS 根目录改动),冲突处两边规则都保留。
## 验证(本地工作区)
- 静态子门禁、`check:d3`、`check:app-manifest`、lint、typecheck 通过。
- HR 全量验收在合并后 HEAD 上通过:`check:runtime` 452/452、`check:ui` 46/46(一次性 PostgreSQL/Redis,跑完已删)。
- OS 产品层证据在 OS `1b8ae0d7` 快照上:产品迁移 17/17、ProductSqlRuntime、宿主运行 1/1 后端、浏览器 1/1 后端、升级审计 READY、装载器审计 passed。真实 OS 仓 0 处改动。
- 远端 CI 结果以本 PR 的运行为准,本地结果不外推。
## 剩余两项回退(`check:governance`)
1. **`osProductLayerViolations` 0 → 1(O22)**:OS main 尚不含 0.19.6。需显式授权(`OS_PRODUCT_REGISTRATION_APPLY=1`)用 OS `product:apply` 写入并进入 OS main,再复跑装载器 / 升级 / 发布审计。
2. **`osProductReleaseTargetRemotes` 2 → 1**:快照只有一个本机 remote(09-23 的证据跑在带 Gitea/GitHub 两个远端的真实 OS 上)。
本地不带 `DIGITAL_EMPLOYEE_OS_ROOT` 跑时,O18 也会按 main 上的新规则提示需要显式 OS 根目录;CI 已传入该变量。
## 待裁决
| 编号 | 问题 | 建议 |
| --- | --- | --- |
| D-2 | Scope→HR 来源授权是否续期 | 续期是 01 BA-01 首片(HR→Scope→OS 组织视图复验)的前提 |
| D-3 | 如何答复 04「HR 先接权限决策」 | 维持 F1 权限自治;可做不切真源的只读决策对照实验(草稿见 `docs/domain/reply-draft-04-permission-decision-2026-10-27.md`) |
| D-4 | F2(平台模式试点)是否重议 | 前置条件不成立:OS 未用叠加仓、未接 platform 端口模式;暂不重议 |
| D-7 | O27「拒绝 4 个目标敏感投影」的历史语义 | 定性为历史决定,审计区分观测命中与待拒绝面 |
| D-8 | O22 写入前是否区分「目标落后、准备发布」 | 维持现规则,不放宽;随写入授权一起解 |
| D-9 | `osProductReleaseTargetRemotes` 2→1 | 发布审计改为只读读取真实 OS 的远端,不设为不计棘轮 |
| D-10 | HR API 默认监听 `0.0.0.0` | 默认改为 `127.0.0.1`、需暴露时显式设 `HOST`,同步 00 框架;改前实测 04 容器可达 |
| D-11 | 框架 0.27.0 安全基线差额 | 单独一片升级 next / vitest / Capacitor 与平台 rc 包;按框架 `COMPATIBILITY.md:36` 登记 Zod 3 残余风险 |
另有新登记缺口:H20 relay 写死事实类型(扩事实前须先改)、H21 04 Scope 消费端写死组织事实来源(需 04 改)。
🤖 Generated with [Claude Code](https://claude.com/claude-code)...
|
0
|
0
|
1
|
1
|
0
|
|
0
|
1793102425
|
1793111425
|
1793103977
|
0
|
0
|
0
|
Edit
Delete
|
|
850
|
83
|
7
|
5
|
|
0
|
ci: per-run docker PostgreSQL/Redis for acceptance ci: per-run docker PostgreSQL/Redis for acceptance, with reports rebound to e8591c7...
|
Two commits:
- e8591c7 ci: the runtime job no l Two commits:
- e8591c7 ci: the runtime job no longer uses `services:` (never started on this host-mode runner; 127.0.0.1:5432 reached an unrelated PostgreSQL on the runner host in run 26519). scripts/ci-acceptance-services.sh fails without docker; otherwise it starts per-run PostgreSQL/Redis containers on docker-assigned high ports with a random masked password and removes them in an if: always() step. G14 updated.
- 8cf50a6 chore(reports): runtime, UI and static reports rerun on the clean final source e8591c7.
Local evidence (isolated containers, recreated database):
- check:runtime 452/452 (floor 452), frozen oracle 12, outbox 1 scenario / 0 duplicates, outage health 2.
- check:ui 46/46.
- pnpm check with DIGITAL_EMPLOYEE_OS_ROOT at e12d0f2: exit 0, provenance violations 0.
- Script checks: start/connect/stop with no leftovers, repeated stop, and failures for missing docker, a non-prefixed database name and an invalid run id.
Not yet verified: docker on the runner host and its ability to pull postgres:16 / redis:7 (override with CI_POSTGRES_IMAGE / CI_REDIS_IMAGE repository variables).
🤖 Generated with [Claude Code](https://claude.com/claude-code)...
|
0
|
0
|
0
|
1
|
0
|
|
0
|
1793102531
|
1793190011
|
0
|
0
|
0
|
0
|
Edit
Delete
|
|
851
|
83
|
8
|
5
|
|
0
|
feat(integration): Web/开发基座只绑回环、D-12 packages/* 受控 feat(integration): Web/开发基座只绑回环、D-12 packages/* 受控通道与 H20 出站事实注册表...
|
## 改了什么
本 PR 有三部分;已合入 main 的 PR #9(D-10 API 回环)与 ## 改了什么
本 PR 有三部分;已合入 main 的 PR #9(D-10 API 回环)与 PR #10(H23 根与 apps/* 依赖)均已并入本分支。
### 1. Web / 开发基座只绑回环(蓝图 §4.9)
- Web `next dev` / `next start` 与 UI 验收的 `next start` 加 `-H 127.0.0.1`;开发基座 `apps/api-nestjs/docker-compose.yml` 的 PostgreSQL / Redis 端口只发布到回环(此前发布到全部网卡,PG 口令 `app`、Redis 无口令)。已在运行的基座容器须 `docker compose up -d` 重建才生效。
- 在 #9 的 `scripts/lib/listen-host-guard.mjs` 内新增 `exposureViolations`(同一守卫),接入 `check:dual-backend`;单测 9/9。
- 文档:owner-matrix 去掉 D3 前「双后端 / Fastify」措辞;Scope 来源接入文档改正 IdentityLink 归属(enterprise-idp 拥有)。
### 2. D-12:`packages/*` 受控升级通道(关 H24,蓝图 §4.10)
- D3 保护此前逐字节冻结全部 `packages/*`(215 个受保护文件),台账只放行产品目录。现在同一台账 `docs/post-d3-product-updates.json` 增加 `packageUpdates`:编号 `PKG-NNN` 递增,须写来源与理由,仅限 D3 冻结清单内的 `packages/*` 文件,逐文件从冻结 hash 链式放行;任一条目不合规即整体不放行。
- `check:d3` 30/30:新增登记后放行、未登记 / 台账缺失判红,以及断链、前后相同、非 hash、缺理由、缺来源、编号格式错、编号不递增、空文件、包外路径、非冻结文件、字段类型错均判红。变异探针:删掉「理由与来源」或「链式校验」规则,测试各判红 1 项,已还原。
### 3. H20:出站事实注册表(蓝图 §4.10)
- contracts 新增 `ENTERPRISE_FACT_ENVELOPE_SCHEMAS`(`factType@schemaVersion` → 信封 Schema,当前只有 `EmploymentTransferred@1`)与 `EnterpriseFactTypeUnregisteredError`;`buildEnterpriseFactEnvelope` 按注册表分派。EmploymentTransferred v1 的 Schema 不变。
- relay 去掉全部类型强转;未登记类型或版本记 `FACT_TYPE_UNREGISTERED`,立即进死信、不调用 Publisher(部署补登记后可经既有重放恢复)。
- contracts 两个文件经台账 **PKG-001** 放行(登记前 `check:d3` 对这两个文件判红)。
- `check:app-manifest` M6 新增注册表与 `facts.owns` 双向一致检查(3 个负例)。
- 测试:contracts 新增 4 例;新文件 `apps/api-nestjs/test/enterprise-fact-relay-registry.test.ts` 真实 DB 3 例。原 `enterprise-fact-relay.test.ts` 受 D3 冻结未改,12 例仍全绿。
## 验证(本地,2026-10-27,干净提交 `effed90`)
- `check:runtime` 462/462、`check:ui` 46/46(一次性 PostgreSQL / Redis,跑完删除)
- typecheck、lint、`check:d3`、`check:dual-backend`、`check:app-manifest`、`check:docs-truth`、`check:governance-docs`、`check:migrations`、`check:database-rls` 等静态门禁通过
- `check:governance` 剩 2 项,与 main 相同:O22(D-8,等 OS 写入授权)、`osProductReleaseTargetRemotes` 2→1(D-9)
## 未覆盖
- 远端 CI 未查验(本机无 Gitea API 令牌)
- 新事实(`OrganizationUnitMoved` 等)仍待 Catalog 登记;H21(Scope 消费端写死来源应用)仍开放
- `packages/*` 内的 vitest 2.1.9 与 `client-fact` rc.3 现可经台账升级,本 PR 未做
- 00 框架同一监听默认值(他层仓);README 第 3 步提到的 `.env.example` 不存在(既有不一致)
🤖 Generated with [Claude Code](https://claude.com/claude-code)...
|
0
|
0
|
0
|
1
|
0
|
|
0
|
1793111425
|
1793124194
|
0
|
0
|
3
|
0
|
Edit
Delete
|
|
852
|
83
|
9
|
5
|
|
0
|
fix(api): D-10 默认只监听 127.0.0.1,对外暴露须显式设 HOST
|
> 状态说明:本 PR 已于 2026-10-27 合入 `main`(合并提交 `7835e > 状态说明:本 PR 已于 2026-10-27 合入 `main`(合并提交 `7835e3b`),合并时 CI 检查尚未运行;远端 CI 结果以本 PR 的检查为准。
## 概要
执行蓝图 D-10(关闭 H22):HR API 默认只监听 `127.0.0.1`,需要容器或局域网访问时必须显式设 `HOST`(如 `0.0.0.0`,双栈用 `::`)。改动前后都实测了 04 runtime 容器的可达性。记录见 `docs/domain/enterprise-control-plane-integration-blueprint-2026-10-27.md` §4.7。
## 改动
- **监听地址单源** `apps/api-nestjs/src/listen-host.ts`:未设或空 `HOST` → `127.0.0.1`,否则用显式值。`main.ts` 只经 `resolveListenHost()` 取值,启动日志写明是否只在回环上监听。
- **Web 默认目标**:`next.config.ts` 代理与 `useRealtime` 的 WS 默认值从 `localhost:3001` 改为 `127.0.0.1:3001`,避免 `localhost` 先解析到 `::1` 时连不上只听 IPv4 回环的 API;`.claude/launch.json` 同步。
- **防回潮**:`check:dual-backend` 新增 `scripts/lib/listen-host-guard.mjs`(默认值必须是回环,`main.ts` 不得绕过解析函数),node 单测 9 个负例;把默认值改回 `0.0.0.0` 的变异探针判红 2 处。行为单测 `apps/api-nestjs/test/listen-host.test.ts` 3 例。
- **文档同步**:CLAUDE.md(常用命令、运行时拓扑、G23 中 H22 移为已关闭)、README、后端规范、Scope 来源接入、蓝图 §4.7 / H22 / D-10、给 04 的答复草稿、框架同步评估 F-7。
## 实测证据
证据文件:`docs/evidence/d10-listen-host-2026-10-27.json`(本机 Docker Desktop;对 04 容器只做只读 GET,未改 04 的容器或配置)。
**改动前**,用宿主上的最小 HTTP 探针:
| 绑定 | 宿主回环 | 本机局域网 IP | 04 容器经 `host.docker.internal` |
| --- | --- | --- | --- |
| `0.0.0.0` | 可达 | 可达 | 可达 |
| `127.0.0.1` | 可达 | 不可达 | 可达(宿主看到来源 `127.0.0.1`) |
结论:改为回环默认后,04 的 Scope 来源探针(`SCOPE_HR_SOURCE_URL` 指向 `host.docker.internal:65281`)仍可达。
**改动后**,用真实构建的 HR API 配本仓一次性 PostgreSQL/Redis(跑完已删除):
| `HOST` | lsof | 局域网 `/api/health` | 04 容器 `/api/health` |
| --- | --- | --- | --- |
| 未设 | `127.0.0.1` | 不可达 | 200,database/redis up |
| 空串 | `127.0.0.1` | 不可达 | 200,database/redis up |
| `0.0.0.0` | `*` | 200 | 200,database/redis up |
另外,Web 不设 `API_PROXY_TARGET` 时,经 Next 代理访问 `/api/health` 返回 200。
**全量验收**(本地,clean `9c53371`,一次性库,跑完已删,报告无口令命中):
- `check:runtime` 455/455:比 452 多出的是新增的 3 例;冻结行为、多实例 Outbox、依赖故障三项均通过。
- `check:ui` 46/46。
- `check:governance` 仅剩已知两项回退:O22(OS main 不含 0.19.6)、`osProductReleaseTargetRemotes` 2→1;来源指纹违规 0。
- 远端 CI 以本 PR 的运行为准。
**未覆盖**:
- 未用 Scope 来源真实凭据调用签名查询,只证明网络可达。
- Linux 原生 Docker 经 `host-gateway` 连不到宿主回环,这类部署必须显式设 `HOST`。
- 仓外 65281 实例当前无进程;它的源码 `326ae3e` 不读 `HOST`,恢复前须换到含本改动的提交。
- `apps/web` 的 `next dev` / `next start` 仍按 Next 默认监听全部网卡,不在本 PR 范围。
## 待裁:00 框架 F-7
00 框架 `apps/api-nestjs/src/main.ts:8` 仍是 `process.env.HOST ?? "0.0.0.0"`;`backend-standard.md:7`、`COMPATIBILITY.md:45`、ADR-0010 与迁移手册都把 `0.0.0.0` 写成默认,理由是容器内可达。HR 因此有意与框架不同。本 PR 未改框架仓,请框架 Owner 二选一:
- **(a)** 框架也改为回环默认,容器部署在 Dockerfile / compose 里显式设 `HOST=0.0.0.0`。
- **(b)** 维持 `0.0.0.0`,在 `COMPATIBILITY.md` 登记「消费者可偏离为回环」。
无论选哪个,下一次框架同步或叠加仓 `replace: true`(F-5)都不得把 HR 的回环默认冲回去。详见 `docs/framework-sync-assessment-2026-10-27.md` F-7。
## 另外发现(不在本 PR 范围)
- `apps/api-nestjs/docker-compose.yml` 的开发 PostgreSQL(口令为 `app`)与 Redis 映射到 `0.0.0.0`,属同类暴露。
- `CLAUDE.md` 基线表 runtime 行仍是 10-25 的读数 452:报告指纹包含文档,验收后改文档会使报告失效,留待下次改文档时一并更新。
🤖 Generated with [Claude Code](https://claude.com/claude-code)...
|
0
|
0
|
1
|
1
|
0
|
|
0
|
1793111729
|
1793114019
|
1793111736
|
0
|
1
|
0
|
Edit
Delete
|
|
853
|
83
|
10
|
5
|
|
0
|
chore(deps): H23 根与 apps/* 对齐框架 0.27.0 安全基线
|
<!--
PR 治理模板。提交前请逐项确认,确保符合 docs/standards 下的 <!--
PR 治理模板。提交前请逐项确认,确保符合 docs/standards 下的工程规范。
CI 会执行:pnpm check(命名 + 单源漂移 + 治理棘轮 + lint + typecheck);
有测试 DB 的流水线另执行 DATABASE_URL=... pnpm check:runtime。
-->
## 变更内容
<!-- 简述这次改了什么、为什么改(聚焦 why) -->
-
## 涉及业务概念
<!-- 列出涉及的业务词典英文名,例如 store / order / verification。参见 docs/domain-glossary.md -->
-
## 检查清单
### 命名一致性
- [ ] 业务概念使用了词典中的标准英文名(未出现 shop/branch/seller/voucher/writeOff 等禁用词)
- [ ] 数据库 snake_case + 复数表名;API/JSON 字段 camelCase;类型 PascalCase;常量 SCREAMING_SNAKE_CASE
- [ ] `pnpm check:naming` 通过
- [ ] `pnpm check:schema` 通过,未新增第二份状态/契约真源
### API / 契约
- [ ] 不涉及 API 变更
- [ ] 新增/修改了 API,路由符合当前生命周期规范:既有 Personnel Core 保持 `/api/personnel/*`,HR v2 领域使用 `/api/v2/{domain}/*`,身份协议使用标准 OIDC 端点
- [ ] 已更新 `packages/contracts` 中的 Zod schema / DTO / 类型(前后端共用同一份)
- [ ] 无破坏前端兼容的字段删除/重命名(如有,已在描述中说明迁移方案)
### 数据库
- [ ] 不涉及数据库变更
- [ ] 新增/修改了表或字段,已通过 migration review(表名复数、字段 snake_case、外键 xxx_id、时间 _at、状态 status)
- [ ] 高增长表已考虑分区;涉及多租户的表带 tenant_id
- [ ] 写链显式带 tenant_id;跨租户读写按 404/隔离口径处理
### 数据库迁移(迁移即代码:版本/顺序/内容/环境/发布/回滚一致)
- [ ] 改 schema.prisma 的同时**已生成并提交 migration**(`pnpm db:migrate:dev --name <change>`),未只改 schema 不落迁移
- [ ] **未修改已发布过的历史 migration 文件**(内容一致:历史不可变,新变更走新迁移)
- [ ] `pnpm check:migrations` 通过(迁移历史在位 / 无未豁免高危 DDL / schema 表、enum、`@map` 列均已落迁移)
- [ ] 破坏性变更(删表/删列/改名/改类型/加 NOT NULL/加唯一约束)走 **expand→migrate→contract** 三阶段,不一次切
- [ ] 大表加索引用 `CREATE INDEX CONCURRENTLY`;大批量回填走 BullMQ 分批任务,不塞进 migration
- [ ] 高危但确需的 DDL 已加 `-- migration-allow:<原因>` 留痕,并在下方回滚方案说明
- [ ] 非开发环境只用 `migrate deploy`(禁止 `db push` / 线上手动 ALTER);发布前 `pnpm db:migrate:status` 无 drift
### 实时 / 队列
- [ ] 不涉及
- [ ] 关键业务事件进入 BullMQ 或持久化事件表(未仅依赖 Redis Pub/Sub)
- [ ] 写库事件与真实写操作在同一 tx 写入 outbox,未在 commit 后旁路 publish
- [ ] 实时通道选型符合规范(订单/看板/通知用 SSE;设备在线/包间控制/IM 用 WebSocket)
### 质量与发布
- [ ] 通过 `pnpm lint` 与 `pnpm typecheck`
- [ ] 通过 `pnpm check:governance`,`reports/*.latest.json` 已刷新且无棘轮回退
- [ ] 涉及写链 / DB / 租户 / 状态机时,通过 `DATABASE_URL=... pnpm check:runtime`,`reports/runtime-acceptance.latest.json` 已刷新
- [ ] 涉及页面或浏览器行为时,`pnpm check:ui` 与 `pnpm check:ui:fastify` 均通过,未只验证一个后端
- [ ] 已补充/更新必要的测试
- [ ] 不需要回滚方案
- [ ] 需要回滚方案,已在下方说明
## 回滚方案 / 其他说明
-
...
|
0
|
0
|
1
|
1
|
0
|
|
0
|
1793114286
|
1793115451
|
1793114295
|
0
|
0
|
0
|
Edit
Delete
|
|
854
|
83
|
11
|
5
|
|
0
|
docs(os-product): 回灌 OS 侧 0.19.6 导入结果与 relay 整表授权放 docs(os-product): 回灌 OS 侧 0.19.6 导入结果与 relay 整表授权放宽原因(H11)...
|
<!--
PR 治理模板。提交前请逐项确认,确保符合 docs/standards 下的 <!--
PR 治理模板。提交前请逐项确认,确保符合 docs/standards 下的工程规范。
CI 会执行:pnpm check(命名 + 单源漂移 + 治理棘轮 + lint + typecheck);
有测试 DB 的流水线另执行 DATABASE_URL=... pnpm check:runtime。
-->
## 变更内容
<!-- 简述这次改了什么、为什么改(聚焦 why) -->
-
## 涉及业务概念
<!-- 列出涉及的业务词典英文名,例如 store / order / verification。参见 docs/domain-glossary.md -->
-
## 检查清单
### 命名一致性
- [ ] 业务概念使用了词典中的标准英文名(未出现 shop/branch/seller/voucher/writeOff 等禁用词)
- [ ] 数据库 snake_case + 复数表名;API/JSON 字段 camelCase;类型 PascalCase;常量 SCREAMING_SNAKE_CASE
- [ ] `pnpm check:naming` 通过
- [ ] `pnpm check:schema` 通过,未新增第二份状态/契约真源
### API / 契约
- [ ] 不涉及 API 变更
- [ ] 新增/修改了 API,路由符合当前生命周期规范:既有 Personnel Core 保持 `/api/personnel/*`,HR v2 领域使用 `/api/v2/{domain}/*`,身份协议使用标准 OIDC 端点
- [ ] 已更新 `packages/contracts` 中的 Zod schema / DTO / 类型(前后端共用同一份)
- [ ] 无破坏前端兼容的字段删除/重命名(如有,已在描述中说明迁移方案)
### 数据库
- [ ] 不涉及数据库变更
- [ ] 新增/修改了表或字段,已通过 migration review(表名复数、字段 snake_case、外键 xxx_id、时间 _at、状态 status)
- [ ] 高增长表已考虑分区;涉及多租户的表带 tenant_id
- [ ] 写链显式带 tenant_id;跨租户读写按 404/隔离口径处理
### 数据库迁移(迁移即代码:版本/顺序/内容/环境/发布/回滚一致)
- [ ] 改 schema.prisma 的同时**已生成并提交 migration**(`pnpm db:migrate:dev --name <change>`),未只改 schema 不落迁移
- [ ] **未修改已发布过的历史 migration 文件**(内容一致:历史不可变,新变更走新迁移)
- [ ] `pnpm check:migrations` 通过(迁移历史在位 / 无未豁免高危 DDL / schema 表、enum、`@map` 列均已落迁移)
- [ ] 破坏性变更(删表/删列/改名/改类型/加 NOT NULL/加唯一约束)走 **expand→migrate→contract** 三阶段,不一次切
- [ ] 大表加索引用 `CREATE INDEX CONCURRENTLY`;大批量回填走 BullMQ 分批任务,不塞进 migration
- [ ] 高危但确需的 DDL 已加 `-- migration-allow:<原因>` 留痕,并在下方回滚方案说明
- [ ] 非开发环境只用 `migrate deploy`(禁止 `db push` / 线上手动 ALTER);发布前 `pnpm db:migrate:status` 无 drift
### 实时 / 队列
- [ ] 不涉及
- [ ] 关键业务事件进入 BullMQ 或持久化事件表(未仅依赖 Redis Pub/Sub)
- [ ] 写库事件与真实写操作在同一 tx 写入 outbox,未在 commit 后旁路 publish
- [ ] 实时通道选型符合规范(订单/看板/通知用 SSE;设备在线/包间控制/IM 用 WebSocket)
### 质量与发布
- [ ] 通过 `pnpm lint` 与 `pnpm typecheck`
- [ ] 通过 `pnpm check:governance`,`reports/*.latest.json` 已刷新且无棘轮回退
- [ ] 涉及写链 / DB / 租户 / 状态机时,通过 `DATABASE_URL=... pnpm check:runtime`,`reports/runtime-acceptance.latest.json` 已刷新
- [ ] 涉及页面或浏览器行为时,`pnpm check:ui` 与 `pnpm check:ui:fastify` 均通过,未只验证一个后端
- [ ] 已补充/更新必要的测试
- [ ] 不需要回滚方案
- [ ] 需要回滚方案,已在下方说明
## 回滚方案 / 其他说明
-
...
|
0
|
0
|
1
|
1
|
0
|
|
0
|
1793143165
|
1793143171
|
1793143171
|
0
|
0
|
0
|
Edit
Delete
|
|
855
|
83
|
12
|
5
|
|
0
|
fix(os-product): D-9 发布审计沿快照本机远端解析到真实 OS 仓,只读 ls-r fix(os-product): D-9 发布审计沿快照本机远端解析到真实 OS 仓,只读 ls-remote 其发布远端...
|
<!--
PR 治理模板。提交前请逐项确认,确保符合 docs/standards 下的 <!--
PR 治理模板。提交前请逐项确认,确保符合 docs/standards 下的工程规范。
CI 会执行:pnpm check(命名 + 单源漂移 + 治理棘轮 + lint + typecheck);
有测试 DB 的流水线另执行 DATABASE_URL=... pnpm check:runtime。
-->
## 变更内容
<!-- 简述这次改了什么、为什么改(聚焦 why) -->
-
## 涉及业务概念
<!-- 列出涉及的业务词典英文名,例如 store / order / verification。参见 docs/domain-glossary.md -->
-
## 检查清单
### 命名一致性
- [ ] 业务概念使用了词典中的标准英文名(未出现 shop/branch/seller/voucher/writeOff 等禁用词)
- [ ] 数据库 snake_case + 复数表名;API/JSON 字段 camelCase;类型 PascalCase;常量 SCREAMING_SNAKE_CASE
- [ ] `pnpm check:naming` 通过
- [ ] `pnpm check:schema` 通过,未新增第二份状态/契约真源
### API / 契约
- [ ] 不涉及 API 变更
- [ ] 新增/修改了 API,路由符合当前生命周期规范:既有 Personnel Core 保持 `/api/personnel/*`,HR v2 领域使用 `/api/v2/{domain}/*`,身份协议使用标准 OIDC 端点
- [ ] 已更新 `packages/contracts` 中的 Zod schema / DTO / 类型(前后端共用同一份)
- [ ] 无破坏前端兼容的字段删除/重命名(如有,已在描述中说明迁移方案)
### 数据库
- [ ] 不涉及数据库变更
- [ ] 新增/修改了表或字段,已通过 migration review(表名复数、字段 snake_case、外键 xxx_id、时间 _at、状态 status)
- [ ] 高增长表已考虑分区;涉及多租户的表带 tenant_id
- [ ] 写链显式带 tenant_id;跨租户读写按 404/隔离口径处理
### 数据库迁移(迁移即代码:版本/顺序/内容/环境/发布/回滚一致)
- [ ] 改 schema.prisma 的同时**已生成并提交 migration**(`pnpm db:migrate:dev --name <change>`),未只改 schema 不落迁移
- [ ] **未修改已发布过的历史 migration 文件**(内容一致:历史不可变,新变更走新迁移)
- [ ] `pnpm check:migrations` 通过(迁移历史在位 / 无未豁免高危 DDL / schema 表、enum、`@map` 列均已落迁移)
- [ ] 破坏性变更(删表/删列/改名/改类型/加 NOT NULL/加唯一约束)走 **expand→migrate→contract** 三阶段,不一次切
- [ ] 大表加索引用 `CREATE INDEX CONCURRENTLY`;大批量回填走 BullMQ 分批任务,不塞进 migration
- [ ] 高危但确需的 DDL 已加 `-- migration-allow:<原因>` 留痕,并在下方回滚方案说明
- [ ] 非开发环境只用 `migrate deploy`(禁止 `db push` / 线上手动 ALTER);发布前 `pnpm db:migrate:status` 无 drift
### 实时 / 队列
- [ ] 不涉及
- [ ] 关键业务事件进入 BullMQ 或持久化事件表(未仅依赖 Redis Pub/Sub)
- [ ] 写库事件与真实写操作在同一 tx 写入 outbox,未在 commit 后旁路 publish
- [ ] 实时通道选型符合规范(订单/看板/通知用 SSE;设备在线/包间控制/IM 用 WebSocket)
### 质量与发布
- [ ] 通过 `pnpm lint` 与 `pnpm typecheck`
- [ ] 通过 `pnpm check:governance`,`reports/*.latest.json` 已刷新且无棘轮回退
- [ ] 涉及写链 / DB / 租户 / 状态机时,通过 `DATABASE_URL=... pnpm check:runtime`,`reports/runtime-acceptance.latest.json` 已刷新
- [ ] 涉及页面或浏览器行为时,`pnpm check:ui` 与 `pnpm check:ui:fastify` 均通过,未只验证一个后端
- [ ] 已补充/更新必要的测试
- [ ] 不需要回滚方案
- [ ] 需要回滚方案,已在下方说明
## 回滚方案 / 其他说明
-
...
|
0
|
0
|
1
|
1
|
0
|
|
0
|
1793145336
|
1793145343
|
1793145343
|
0
|
0
|
0
|
Edit
Delete
|