Files
eip4-platform/platform-metadata
zhengwr ce544fa65e feat(主子表): 派生字段(金额=数量×单价) compute-on-save + tpl 实时预览
零引擎改动:UI 派生列只读 tpl ${公式} 实时预览(quickEdit:false),服务端权威
经写流 ?__derive= 用安全算术求值器逐行 compute-on-save 落库(复用 ?__egtpl=
同款轨道,绕开 amis input-table 前端竞态)。

- RecipeArithmeticEvaluator: 纯算术递归下降/BigDecimal,无任意代码执行;含递归
  深度(64)+表达式长度(512)护栏,防深嵌套 StackOverflowError(Error 逃兜底)DoS
- RecipeDerivedFieldComputer: 子表数组逐行求值写回,逐格错误隔离不阻断保存
- PageBlueprintChild.derived + 编译器派生列(tpl + quickEdit:false + 表单 api
  URL 编码 __derive);RecipePageComposer/DesignFeatureController 贯通 childDerived
  (Object 容错避免 Jackson 400;公式字符白名单拒 |/=/; 防静默写错值)
- FlowController.executePost 接 __derive(9 参 @Autowired + 反射回归测试)

对抗评审(36 agent)揪修 3 真 bug:amis needConfirm:false 强注 quickEdit 需显式
false 才保留 tpl 预览;求值器深嵌套 Error 逃逐行兜底;公式 | 破坏 spec 切分。
+9 单测,curl live e2e 含负控 PASS,Playwright 3/3。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-20 17:32:13 +08:00
..
2026-06-18 11:18:40 +08:00