Commit Graph
1 Commits
Author SHA1 Message Date
Ubuntu b1b3f9c455 test(独立进货): 隔离性回归 —— 钉死"不影响正常客户下单流程"
CI / server typecheck + tests (push) Canceled after 0s
CI / web typecheck + tests + miniprogram syntax (push) Canceled after 0s
CI / eslint (观察项,C7 骨架) (push) Canceled after 0s
CI / npm audit (critical 硬拦) (push) Canceled after 0s
开发者 2026-10-12:「可以这样,但是不能影响选择了正常客户的下单流程」。

真库冒烟对照(BR003,正常客户 MAIN_BR002,可乐 4 瓶 × 销售价 2.5 / 成本价 12):
  price 2.50 / amount 10.00 / 订单头 total_amount 10.00 / unit_cost 12 / needs_customer_price=false
  ⇒ 与改动前一致,**没有被"独立进货锁 0"污染**(冒烟单用后即移入垃圾桶)。

新增 server/tests/independentInboundIsolation.test.ts(10 例)逐条钉住"正常分支表达式未变":
  · 录单:售价/金额、订单头金额、needs_customer_price/price_source、零价提交闸门、信用校验、
    客户×商品映射学习 —— 全部是 `哨兵 ? ... : 原表达式` 形态;
  · 分配/结案零价守卫:正常单仍由 `options.allowUnpriced` 决定;
  · 结案状态白名单:普通单仍只允许 30/50(40 只对哨兵开);
  · 完成推进:哨兵分支提前 return,正常链路顺序与调用未改;
  · 销售谓词用 IS DISTINCT FROM(NULL 安全)⇒ 只有哨兵单被排除,
    明确禁止写成 `<>`(否则 customer_code IS NULL 的历史单会被三值逻辑漏掉)。
2026-10-12 19:18:32 +08:00