@stalfh233/omc-cli 0.6.63 → 0.6.65

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -82,6 +82,9 @@ const SURFACES = [
82
82
  description: "表单发布链:draft-first 布局、发布、publishedHtmlJson 绑定读回。",
83
83
  operations: ["get", "draft", "publish"],
84
84
  intent: { level: "partial", note: "draft/publish 已声明式;get 为读回面。" },
85
+ // 券商 issue 1.1(cpdocs 2026-10-27):子表控件的条件不在字段面——能力面
86
+ // 说清走法,agents 从 capabilities 进入(而非 next)时也能拿到同一条路由。
87
+ notes: "子表控件(type 201)的显示/只读条件(displayFormula/readonlyFormula)不在字段面(field.update 必拒,只管子表列):form.get(controls:true) 读 draftAttributesJson 定位控件 → form.draft 改 → form.publish。",
85
88
  },
86
89
  {
87
90
  id: "listview",
@@ -174,7 +174,13 @@ export function prepareFieldUpdate(input) {
174
174
  blocker: "child-table-update-unsupported",
175
175
  schemaCode: input.schemaCode,
176
176
  propertyCode: input.code,
177
- message: `子表字段 ${input.schemaCode}.${input.code} 不接受 options/choices/subFields。子表列就是 schemaCode=${input.code} 上的普通字段:增列用 field.create --args '{"schemaCode":"${input.code}","code":"<子列>",...}',改列/删列用 field.update/field.delete(同 schemaCode),改完对父模型 field.publish 即发布`,
177
+ // 券商 issue 1.1(cpdocs 2026-10-27):拒收文案此前只讲「子表**列**怎么改」,
178
+ // 没讲「子表**控件**(type 201)的显示/只读条件怎么改」——可行路径是表单
179
+ // attributes(form.draft 的 draftAttributesJson),不是字段面。调用方传的
180
+ // options 正是条件键时,第一句就指对路,别让他再撞一次。
181
+ message: `子表字段 ${input.schemaCode}.${input.code} 不接受 options/choices/subFields。子表列就是 schemaCode=${input.code} 上的普通字段:增列用 field.create --args '{"schemaCode":"${input.code}","code":"<子列>",...}',改列/删列用 field.update/field.delete(同 schemaCode),改完对父模型 field.publish 即发布。${input.options !== undefined && ["displayFormula", "readonlyFormula", "requiredFormula"].some((key) => key in input.options)
182
+ ? `你传的 options 是子表控件(type 201)的显示/只读条件——它不在字段面(此处必拒):form.get(controls:true) 读 draftAttributesJson 定位控件 → form.draft 改该控件条件 → form.publish(cpdocs issue 2026-10-27 §1.1)`
183
+ : `改子表控件(type 201)的显示/只读条件(displayFormula/readonlyFormula)也不在字段面:form.get(controls:true) → form.draft(draftAttributesJson)→ form.publish(cpdocs issue 2026-10-27 §1.1)`}`,
178
184
  });
179
185
  const currentOptions = decodeJsonObjectColumn(input.base.options, { invalid: "throw", array: "accept", object: "accept" }) ?? {};
180
186
  const rebuiltOptions = isChildTable
@@ -784,7 +784,25 @@ function goalRouteInner(registry, goal) {
784
784
  // 聚合/计数问句的正确答案:data 能力**没有 group-by 工具**,诚实指路
785
785
  // data.list 拉全量 + `--jq` 投影自行计数;跨模型/大结果集才涉及报表章节。
786
786
  // 放在能力打分前,聚合词不再落进任何写阶梯(cue「分组」已从 app 移除)。
787
- if (readish && /(统计|分组|汇总|聚合|计数|条数|多少条|有几条|数一下)/.test(goal) && !WRITE_DESTINATION.test(goal)) {
787
+ // r70 探针02-F11:前提曾依赖 readish(mode 已判 read)——「把客户模型的数据按
788
+ // **创建**人统计条数」被 formula 字段 cue 抢判 build/composer(问公式字段=写面),
789
+ // 聚合专项不触发。聚合/计数词本身就是强读信号,直达不依赖 mode 前判
790
+ // (WRITE_DESTINATION 否决保留)。
791
+ // r70 门红教训:「条数(?!据)」——「保存并启用一条数据事件规则」的「一条数」
792
+ // 含子串「条数」,裸「条数」会把数据事件规则的写问句劫进聚合读路径。
793
+ const AGGREGATE_ASK = /(统计|分组|汇总|聚合|计数|条数(?!据)|多少条|有几条|数一下)/;
794
+ // r70 门红(ticket04 G3 + r66 c-F4 两案):「设备模型**要**汇总…」(formula 写意图)
795
+ // 和「**建**报表…汇总图」(report 写链)都带聚合词——直达分支劫走了它们的 recipe
796
+ // 首答。写意图否决(助动词 + BUILD/MODIFY 显式写动词任一命中即否决直达);
797
+ // 「把客户模型的数据按创建人统计」无任何写词,直达仍生效。readish 原语义不变。
798
+ const WRITE_INTENT_AUX = /(要|想|帮我|需要)/;
799
+ // 「按创建人统计」的「创建」是子串误触(创建人/创建时间/创建日期都是常见聚合维度)
800
+ // ——「按 X 统计/分组」结构本身就是读聚合的强信号,绕过写词子串否决。
801
+ const aggregateByDimension = /按.{1,12}(统计|分组|汇总|聚合)/.test(goal);
802
+ const directAggregate = AGGREGATE_ASK.test(goal) && !WRITE_INTENT_AUX.test(goal) &&
803
+ (aggregateByDimension || (!BUILD_CUES.some((cue) => goal.includes(cue)) && !MODIFY_CUES.some((cue) => goal.includes(cue)))) &&
804
+ !WRITE_DESTINATION.test(goal);
805
+ if ((readish || directAggregate) && AGGREGATE_ASK.test(goal) && !WRITE_DESTINATION.test(goal)) {
788
806
  const dataRoute = routeById.get("data");
789
807
  if (dataRoute !== undefined) {
790
808
  const readTools = readToolsInLane(registry, dataRoute.lane);
@@ -1372,7 +1390,12 @@ function goalRouteInner(registry, goal) {
1372
1390
  : readish
1373
1391
  ? capabilityId === "model"
1374
1392
  ? { firstAnswer: { state: "ready", action: LIST_MODELS_ACTION, why: "问的就是模型清单本身:model.list 一次调用直接回答" } }
1375
- : { firstAnswer: { state: "needs-input", question: "要查看哪个对象?给我 schemaCode(或业务名,我列清单核对)", action: LIST_MODELS_ACTION, why: `读路径命中能力 ${capabilityId}:readTools 已内联,只差目标对象 code` } }
1393
+ : goal.match(/(失败|报错|执行过|执行记录|什么时候跑|触发了吗)/) && ["businessrule", "datarule", "rule-lifecycle"].includes(capabilityId)
1394
+ // r70 探针02-F2:「查最近哪些规则执行失败」的 firstAnswer 索要 schemaCode 之外
1395
+ // 只给 model.list——排查类问句的起手工具是 rulelog.search(探针自行改判多 1 轮)。
1396
+ // 「规则」cue 可能打到 datarule/businessrule/rule-lifecycle 任一,全族收口。
1397
+ ? { firstAnswer: { state: "needs-input", question: "查哪个模型的规则日志?给我 schemaCode(或业务名)", action: `omc call rulelog.search --args '{"schemaCode":"<模型code>"}'`, why: "排查/失败/执行记录类问句:rulelog.search 是起手工具(带 includeNodes:true 拿节点级根因;全局跨模型失败扫描暂无专工具,逐模型查)" } }
1398
+ : { firstAnswer: { state: "needs-input", question: "要查看哪个对象?给我 schemaCode(或业务名,我列清单核对)", action: LIST_MODELS_ACTION, why: `读路径命中能力 ${capabilityId}:readTools 已内联,只差目标对象 code` } }
1376
1399
  : recipeCommand !== undefined
1377
1400
  ? { firstAnswer: { state: "ready", action: recipeCommand, why: `命中配方 ${recipe.recipe}:describe 首答自带 firstCall 形状,代入你的 schemaCode/字段 code 即可执行` } }
1378
1401
  : { firstAnswer: { state: "needs-input", question: "要操作哪个对象?给我 schemaCode(或模型业务名,我列清单核对)", action: LIST_MODELS_ACTION, why: "未命中配方:需要目标对象 code 才能给出一步可跑的写命令" } }),
@@ -74,7 +74,14 @@ const recordSchema = z.object({
74
74
  sortKey: z.number().int().default(0),
75
75
  initialUsed: z.boolean().optional(),
76
76
  }).passthrough();
77
- const recordsArg = z.array(recordSchema.extend({ children: z.array(recordSchema).optional() })).optional();
77
+ // cpdocs issue 2026-10-30(pwsh-ergonomics)附带项:平台 save 是**增量 upsert**,
78
+ // records 只新增/更新提交的条目——`records:[]` 是空操作、不会清空既有记录
79
+ // (平台无字典/字典项删除端点;清空意图走 dictionary.status 逐条停用)。
80
+ // 写进参数 describe,别让「ok:true」被读成「已清空」。
81
+ const recordsArg = z
82
+ .array(recordSchema.extend({ children: z.array(recordSchema).optional() }))
83
+ .optional()
84
+ .describe("增量 upsert:只写提交的条目;records:[] 不清空既有记录(无字典删除端点,停用用 dictionary.status)");
78
85
  function normalizeRecord(record, dictionaryId, parentId) {
79
86
  const children = Array.isArray(record.children) ? record.children.map((child) => normalizeRecord(child, dictionaryId, String(record.id ?? parentId ?? "") || null)) : undefined;
80
87
  return {
@@ -339,6 +339,10 @@ export function registerFieldLane(tools) {
339
339
  // 不必再跑 published:true 交叉核对。
340
340
  const publishedCodes = new Set(wireRows((await wireCall(session, { path: ENDPOINTS.fieldList, query: { schemaCode: args.schemaCode, isPublish: "true" } })).data)
341
341
  .map((row) => String(row.code ?? row.propertyCode)));
342
+ // 券商 issue 1.4(cpdocs 2026-10-27)补充:双面比对已经拉过发布面,
343
+ // 空清单时顺手数出「发布面有几个业务字段」——把 hint 从「三种可能」
344
+ // 收敛成一句可执行的判定(有 N 个 → 加 published:true 就能看到)。
345
+ const publishedBusinessCount = [...publishedCodes].filter((code) => !isSystemFieldCode(code)).length;
342
346
  const mapped = rows.map((row) => {
343
347
  const type = Number(row.type ?? row.propertyType);
344
348
  const typeLabel = fieldTypeLabel(row.type ?? row.propertyType);
@@ -453,13 +457,18 @@ export function registerFieldLane(tools) {
453
457
  ...(args.all !== true ? { businessOnly: true } : {}),
454
458
  fields: projected,
455
459
  // 券商 issue 1.4(2026-10-27):默认面空清单曾被误读成「模型没有字段」。
456
- // 空清单要自己解释三种可能,别让 agent 二次试错。
460
+ // 空清单要自己解释三种可能,别让 agent 二次试错;发布面(published:true)
461
+ // 查空时文案要换——再说「字段可能都在 published 面」就是在指一条已走过的路。
457
462
  ...(detailed
458
463
  ? {}
459
464
  : {
460
465
  inventory: true,
461
466
  hint: projected.length === 0
462
- ? "字段详情(options/subSchema)用 code/fields 选择器或 full:true。当前 draft 面没有业务字段——字段可能都在 published 面(published:true)、尚未创建,或只有系统字段(all:true 核对)"
467
+ ? args.published === true
468
+ ? "发布面没有业务字段——可能尚未发布(先 published:false 看草稿面)、尚未创建,或只有系统字段(all:true 核对)。字段详情(options/subSchema)用 code/fields 选择器或 full:true"
469
+ : publishedBusinessCount > 0
470
+ ? `字段详情(options/subSchema)用 code/fields 选择器或 full:true。当前 draft 面没有业务字段,但发布面有 ${publishedBusinessCount} 个业务字段——加 published:true 查看`
471
+ : "字段详情(options/subSchema)用 code/fields 选择器或 full:true。当前 draft 面没有业务字段——字段可能都在 published 面(published:true)、尚未创建,或只有系统字段(all:true 核对)"
463
472
  : "字段详情(options/subSchema)用 code/fields 选择器或 full:true",
464
473
  }),
465
474
  };
@@ -15,7 +15,7 @@ export const PROGRAMMING_WIRE = Object.freeze({
15
15
  sourceIdentity: "源码主键 code = schemaCode + ruleCode + \"Handler\"(SourceUtil.getBusinessRuleSourceCode)。未保存草稿时 get_source 仍返回内存骨架:按规则类型选模板(Create/Update/Delete/Load/Cancel/Available/GetList → <ruleCode>HandlerTemplate,其余 → CustomizedHandlerTemplate),version=null 即未落库草稿。",
16
16
  storage: "单表 h_source_code:草稿行固定 version=0(published=false),保存是**无条件覆盖 content**,平台无乐观锁/CAS(originalVersion 无比较逻辑);publish 另插 published=true、version=maxPublished+1 的新行,草稿行不动。运行时正式执行读 published 最新版(BusinessLauncher.buildReleaseRequest → getLatestPublishedSourceByCode),调试读草稿(version=0)。publish 内容没有 wire 读取端点。",
17
17
  publishFlow: "publish 服务端内部:saveDraftSource → 强制 compile(失败 → PROGRAMMING_COMPILE_FAILED)→ facade.publish 插新版本行 → 若 codeType=BUSINESS_RULE 则把规则置 DevelopmentMode.CODING(=1)、enabled=true 并发布规则(ProgrammingController.publishBusinessRule)。因此 publish 载荷**必须携带 businessRule 整模型**(工具内用 businessrule/list_by_schemacode 按 code 补齐)。",
18
- compile: "POST /compile body {code, content};服务端 convertSourceCode → 编辑器租户缓存 updateSourceCode(内存副作用)→ compileFile → CompileFileResult{success, errors[]}。编译是规则可运行的最低门槛:运行时每次执行都重新编译,坏源码会让该规则的每次业务执行失败。",
18
+ compile: "POST /compile body {code, content};服务端 convertSourceCode → 编辑器租户缓存 updateSourceCode(内存副作用)→ compileFile → CompileFileResult{success, errors[]}。编译是规则可运行的最低门槛:运行时每次执行都重新编译,坏源码会让该规则的每次业务执行失败。已知分歧(线上 GitLab #34,2026-11-13 双复现):compile 面绿 ≠ 运行可用——catch(Throwable) 与 try 块内赋值的局部变量在 compile 面通过、运行期 AppBox javac(lombok processor)失败(rule.run 50000「在线编码执行异常」);compile/save 回执带 precompileWarnings 增量警告与 divergenceCaveat,闭环验证 = publish 后 rule.run 一次。",
19
19
  templateGuard: "平台预置代码模板,包路径/类名/继承关系不得修改(改了规则无法运行)。工具 preflight:content 若声明 class 名必须等于 code 主键;若声明 package 必须是平台模板包——8.6.26 为 com.authine.cloudpivot.engine.service.bizrule.handler,live 8.7(AI-Platform 1.1.25) 为 com.authine.cloudpivot.engine.sourcecode.handler(真机冒烟实证),两者都接受,其它拒绝。",
20
20
  boundary: "startDebugging/debug/complete/go_definition 是 WEB-IDE 专用(调试为 attach 式:DebugVo 无合成载荷,debugId 只是随机 UUID,断点靠真实业务事件触发),不包裹。SPI/SERVICE 两类源码的写入面在 8.6.26 未开放(get_source 直接拒绝非 BUSINESS_RULE),v1 只做业务规则。",
21
21
  authority: "权限:ProgrammingController 无 @RequireAdmin / isAdmin 判断(AdminPermissionInterceptor 只看类级注解),普通已登录用户即可调用;CLI 标准会话无需额外管理员前置。",
@@ -76,7 +76,7 @@ export const PROGRAMMING_LANE_CONTRACT = Object.freeze({
76
76
  }),
77
77
  "programming.compile": Object.freeze({
78
78
  scope: PROGRAMMING_SCOPE,
79
- description: "远程编译检查(POST compile,body {code,content}):返回 CompileFileResult{success, errors}。编译是规则可运行的最低门槛(运行时每次执行都重新编译)。只读(唯一副作用是平台编辑器租户内存缓存)。",
79
+ description: "远程编译检查(POST compile)——compile 通过≠运行可用:compile 检查器与运行期 AppBox javac(lombok processor)规则有已知差异(catch Throwable/局部变量初始化,线上 #34),命中回 precompileWarnings/divergenceCaveat,闭环验证 = publish 后 rule.run 一次。body {code,content} 回 CompileFileResult{success, errors};编译是运行门槛(运行时每次执行都重新编译)。只读(唯一副作用是编辑器租户内存缓存)。",
80
80
  }),
81
81
  "programming.save": Object.freeze({
82
82
  scope: PROGRAMMING_SCOPE,
@@ -105,6 +105,10 @@ export function assertProgrammingContract() {
105
105
  if (!PROGRAMMING_WIRE.templateGuard.includes("com.authine.cloudpivot.engine.sourcecode.handler"))
106
106
  throw new Error("programming contract must pin the live 8.7 template package");
107
107
  assertDescriptionCarries(PROGRAMMING_LANE_CONTRACT, "programming.get", ["get_source", "Handler", "模板"]);
108
+ // 线上 #34:compile 教学(「≠运行可用」+ 闭环路径)钉在描述里,防回归静默丢失。
109
+ assertDescriptionCarries(PROGRAMMING_LANE_CONTRACT, "programming.compile", ["≠运行可用", "rule.run"]);
110
+ if (!PROGRAMMING_WIRE.compile.includes("#34"))
111
+ throw new Error("programming contract must pin the compile/runtime javac divergence (线上 #34)");
108
112
  assertDescriptionCarries(PROGRAMMING_LANE_CONTRACT, "programming.save", ["saveSourceCode", "com.authine.cloudpivot.engine.service.bizrule.handler", "sourcecode.handler", "Handler"]);
109
113
  assertDescriptionCarries(PROGRAMMING_LANE_CONTRACT, "programming.publish", ["compile", "businessRule", "CODING"]);
110
114
  assertDescriptionCarries(PROGRAMMING_LANE_CONTRACT, "programming.schemas", ["list_schemas_by_appcode"]);
@@ -180,6 +180,42 @@ export function presentCompileErrors(raw) {
180
180
  },
181
181
  };
182
182
  }
183
+ /**
184
+ * 线上 GitLab #34(2026-11-13 真机双复现,AI-Platform v1.1.25 / OMC 0.6.39):
185
+ * `programming.compile` 回 `{success:true, userErrors:[]}`,但运行期 javac
186
+ * (AppBoxFactory.precompile,带 lombok processor)编译失败——rule.run 回 50000
187
+ * 「在线编码执行异常」,真错只在容器 log_error.log。两类**普通写法**已复现:
188
+ * 1. catch(Throwable) —— 运行期「incompatible types: java.lang.Throwable cannot
189
+ * be converted to java.lang.Exception」(运行期要求 catch(Exception));
190
+ * 2. try 块内赋值的局部变量(`String x; try { x="a"; ... }`)—— 运行期
191
+ * 「变量x没有进行初始化」(definite-assignment 判定分歧;静态检测太贵不做,
192
+ * 靠 compile 成功回执的 divergenceCaveat 教学)。
193
+ * 本函数是**增量警告**(正则 lint,不引 javac 依赖):不改 success 透传——compile
194
+ * 面真实结果保真,警告只标注「compile 绿 ≠ 运行可用」的已知模式。
195
+ */
196
+ const CATCH_THROWABLE_RE = /\bcatch\s*\(\s*Throwable\b/;
197
+ /** 已知「compile 面绿、运行期 AppBox javac 红」的源码模式(线上 #34)。 */
198
+ export function precompileWarningsOf(content) {
199
+ const warnings = [];
200
+ const lines = content.split(/\r?\n/);
201
+ for (let index = 0; index < lines.length; index += 1) {
202
+ const text = lines[index];
203
+ const trimmed = text.trimStart();
204
+ // 注释行(//、/*、* 开头)不告警——lint 是建议性警告,误报会稀释信噪比。
205
+ if (trimmed.startsWith("//") || trimmed.startsWith("/*") || trimmed.startsWith("*"))
206
+ continue;
207
+ if (CATCH_THROWABLE_RE.test(text)) {
208
+ warnings.push({
209
+ pattern: "catch-throwable",
210
+ line: index + 1,
211
+ message: "运行期 AppBox javac 要求 catch(Exception):catch(Throwable) 会在 compile 面通过但运行期编译失败(incompatible types: java.lang.Throwable cannot be converted to java.lang.Exception;线上 #34 复现1)",
212
+ });
213
+ }
214
+ }
215
+ return warnings;
216
+ }
217
+ /** compile 成功回执的分歧 caveat(线上 #34):compile 绿不等于运行可用。 */
218
+ const COMPILE_RUNTIME_DIVERGENCE_NOTE = "compile 通过≠运行可用:compile 检查器与运行期 AppBox javac(lombok processor)规则有已知差异(catch Throwable / try 块内赋值的局部变量初始化判定,线上 #34);闭环验证 = publish 后 rule.run 一次。";
183
219
  async function compileSource(session, code, content) {
184
220
  const response = await wireCall(session, { path: ENDPOINTS.programmingCompile, method: "POST", body: { code, content } });
185
221
  const result = asRecord(response.data) ?? {};
@@ -397,6 +433,9 @@ export function registerProgrammingLane(tools) {
397
433
  return { status: "refused", blocker: "programming-content-required", message: "没有可编译的源码:传 content,或先 programming.save 落库草稿。" };
398
434
  const result = await compileSource(session, code, content);
399
435
  const presented = result.presented;
436
+ // 线上 #34:compile 面绿 ≠ 运行可用。源码静态预检(已知分歧模式)在回执
437
+ // 组装前跑一遍,命中即给增量警告;success 照实透传(保真)。
438
+ const warnings = precompileWarningsOf(content);
400
439
  return {
401
440
  schemaCode: args.schemaCode,
402
441
  businessRuleCode: args.businessRuleCode,
@@ -409,7 +448,11 @@ export function registerProgrammingLane(tools) {
409
448
  : presented.errors,
410
449
  platformErrors: presented.platformErrors,
411
450
  userErrors: presented.userErrors,
451
+ ...(warnings.length > 0 ? { precompileWarnings: warnings } : {}),
412
452
  evidenceHint: "compile 回执只在本命令 stdout,不落 journal/artifact;对照实验需留证请重定向到文件(> file.json)",
453
+ // 线上 #34:成功回执必须教学「compile 通过 ≠ 运行可用」——真错只在
454
+ // 运行期 javac(rule.run 50000)与容器 log_error.log 里才显形。
455
+ ...(result.success ? { divergenceCaveat: COMPILE_RUNTIME_DIVERGENCE_NOTE } : {}),
413
456
  ...(result.diagnostics.platformCompilerDegraded ? { platformCompilerDegraded: true, platformCompilerNote: result.diagnostics.platformCompilerNote } : {}),
414
457
  ...(result.success
415
458
  ? {}
@@ -474,6 +517,9 @@ export function registerProgrammingLane(tools) {
474
517
  const saved = asRecord(response.data);
475
518
  const readback = await readSource(session, { schemaCode: args.schemaCode, businessRuleCode: args.businessRuleCode, code });
476
519
  const readbackContent = typeof readback.model?.content === "string" ? readback.model.content : null;
520
+ // 线上 #34:save 面同样拿得到源码 content——同一份静态预检在保存回执里给
521
+ // 增量警告(不改 performed 结果;草稿照常落库)。
522
+ const warnings = precompileWarningsOf(args.content);
477
523
  return {
478
524
  performed: { errcode: 0, code, version: saved?.version ?? null, contentSha256: sha256(args.content), contentBytes: Buffer.byteLength(args.content, "utf8") },
479
525
  readback: {
@@ -483,6 +529,7 @@ export function registerProgrammingLane(tools) {
483
529
  contentMatches: readbackContent === args.content,
484
530
  contentSha256: readbackContent === null ? null : sha256(readbackContent),
485
531
  published: readback.model?.published === true,
532
+ ...(warnings.length > 0 ? { precompileWarnings: warnings } : {}),
486
533
  note: "草稿保存不改变运行时——生效需 programming.publish。",
487
534
  },
488
535
  };
@@ -1650,7 +1650,11 @@ export function registerRuntimeDataLane(tools) {
1650
1650
  inputSchema: {
1651
1651
  schemaCode: z.string().min(1),
1652
1652
  sheetCode: z.string().optional(),
1653
- formData: runtimeFormDataArg.describe('business-object data keyed by field code(关联/人员形状同默认描述)。mappings 仅门户回填;字典-backed 不校验取值(不存在/已停用码也会落库,要拦请配数据规则)。'),
1653
+ formData: runtimeFormDataArg.describe(
1654
+ // 券商 issue 1.3(cpdocs 2026-10-27):更新既有记录的主键契约——平台
1655
+ // BizObjectModel.getId() 只读 bizObject.data.id;顶层 bizObject.bizObjectId
1656
+ // 被保存逻辑忽略,errcode:0 但 objectId 是新 id(静默新建孤儿行)。
1657
+ 'business-object data keyed by field code(关联/人员形状同默认描述)。mappings 仅门户回填;字典-backed 不校验取值(不存在/已停用码也会落库,要拦请配数据规则)。既有记录更新:主键必须放 formData.id(顶层 bizObject.bizObjectId 被平台忽略会静默新建孤儿行——直调 REST 同理,cpdocs issue 2026-10-27 §1.3);id 无对应行会被拒(save-update-target-absent),新建请省略 id。'),
1654
1658
  workflowCode: z.string().optional().describe("portal draft-save shape: create the row AND a DRAFT workflow instance + start workItem (finishStart=FALSE); submit later via data.submit with the returned workItemId. formData must NOT carry an id — in-place workflow start has no REST surface in 8.6.26。发起语义阶梯(r68s 真机取证):本参数=发起停在第一节点(行/实例双 DRAFT,首办待办=发起人);到第一个审批节点用 data.submit 三件套;无流程模型用 submit:true 一调完成态;代他人发起(可选发起人)唯一路径=业务规则 CREATE+startWorkflow(完成态发起,不留草稿待办)"),
1655
1659
  submit: z.boolean().optional().describe("true=保存后立即直提(无流程模型 DRAFT→COMPLETED,触发 Create 规则);与 workflowCode 互斥。**按业务约定正式数据优先直接 data.submit(无 id=新建并提交一调完成)——本参数是便捷别名,save 的定位是草稿/暂存**"),
1656
1660
  allowStaffOnSubmit: z.boolean().optional().describe("submit:true 时显式允许携带人员字段(issue#10:人员字段提交面两种形状都可能 50000,可靠链路是 save 落库后提交时省略;个别平台构建接受提交面携带,自担风险)"),
@@ -1670,7 +1674,11 @@ export function registerRuntimeDataLane(tools) {
1670
1674
  });
1671
1675
  const { sheetCode, resolvedFrom } = await resolveFormSheetCode(session, { schemaCode: args.schemaCode, sheetCode: args.sheetCode });
1672
1676
  const rawSaveData = args.formData;
1673
- const saveIsUpdate = typeof rawSaveData.id === "string" && rawSaveData.id.trim().length > 0;
1677
+ // 券商 issue 1.3(cpdocs 2026-10-27):formData.id = 更新语义(平台
1678
+ // BizObjectModel.getId() 只读 data.id)。捕获原始 id 供写前存在性校验与
1679
+ // 写后孤儿判据(返回 objectId ≠ 传入 id = 平台没按更新处理)使用。
1680
+ const saveSuppliedId = typeof rawSaveData.id === "string" ? rawSaveData.id.trim() : "";
1681
+ const saveIsUpdate = saveSuppliedId.length > 0;
1674
1682
  const prepared = await prepareRuntimeFormData(session, args.schemaCode, rawSaveData, { isUpdate: saveIsUpdate });
1675
1683
  const formData = prepared.formData;
1676
1684
  const writeDiagnostics = { ...ignoredNullDiagnostic(formData), ...unknownFieldDiagnostic(formData, prepared.fieldCodes, prepared.childCodes, prepared.schemaLoaded) };
@@ -1779,6 +1787,26 @@ export function registerRuntimeDataLane(tools) {
1779
1787
  readback: { ...application, ...writeDiagnostics, authoritative: projectReadbackRecord(normalizeLoadedRecord((readbackData ?? {})), args), sequenceStatus, expectedSequenceStatus: "DRAFT" },
1780
1788
  };
1781
1789
  }
1790
+ // 券商 issue 1.3(cpdocs 2026-10-27):带 formData.id 的 save 是更新语义;
1791
+ // 平台对**不存在的 id** 不报错而是退回 createBizObject 静默新建(fake/live
1792
+ // 一致,loadExistingBizObject 的注释即此判据)。data.update/data.submit 已有
1793
+ // 同族写前校验(update-target-absent / submit-target-absent),data.save 是
1794
+ // 最后一块没有闸的写面——孤儿行就是这么来的,fail-closed。
1795
+ if (saveIsUpdate) {
1796
+ const existingById = await loadExistingBizObject(session, args.schemaCode, sheetCode, saveSuppliedId);
1797
+ if (!existingById) {
1798
+ throw new ToolRefusalError({
1799
+ status: "refused",
1800
+ blocker: "save-update-target-absent",
1801
+ schemaCode: args.schemaCode,
1802
+ bizObjectId: saveSuppliedId,
1803
+ sheetCode,
1804
+ nextCommand: `omc call data.list --args '${JSON.stringify({ schemaCode: args.schemaCode })}'`,
1805
+ message: `formData.id=${saveSuppliedId} 指向的记录不存在,已拒(平台对未知 id 会静默新建孤儿行而不是更新——返回的新 objectId 就是判据,cpdocs issue 2026-10-27 §1.3)。` +
1806
+ `要更新:data.list 找到正确 id(或改用 data.update,其 bizObjectId 在顶层参数位、写前同样校验存在);要新建:省略 formData.id。`,
1807
+ });
1808
+ }
1809
+ }
1782
1810
  let performed;
1783
1811
  try {
1784
1812
  performed = await runtimeWriteWithAppMapping(session, args.schemaCode, 50000, "data.save 运行时写稳定失败(50000)", () => wireCall(session, {
@@ -1815,6 +1843,19 @@ export function registerRuntimeDataLane(tools) {
1815
1843
  authoritative: projectReadbackRecord(savedRecord, args),
1816
1844
  ...(savedEmptyFields.length > 0 ? { readbackWarning: readbackWarningFor(savedEmptyFields, "data.save") } : {}),
1817
1845
  ...(dataWarnings.length > 0 ? { warnings: dataWarnings } : {}),
1846
+ // 券商 issue 1.3(cpdocs 2026-10-27):写前校验(save-update-target-absent)
1847
+ // 之后的第二道防线——返回 objectId ≠ 传入 formData.id 就是平台没按更新处理
1848
+ // (静默新建孤儿行的真机判据),如实报警而不是回一个"成功"。
1849
+ ...(saveIsUpdate && typeof bizObjectId === "string" && bizObjectId !== saveSuppliedId
1850
+ ? {
1851
+ orphanWarning: {
1852
+ criterion: "返回 objectId ≠ formData.id",
1853
+ suppliedId: saveSuppliedId,
1854
+ returnedId: bizObjectId,
1855
+ message: `平台没有按 formData.id 更新而是新建了行(返回 ${bizObjectId} ≠ 传入 ${saveSuppliedId})——疑似孤儿数据,请 data.list 核对并清理(cpdocs issue 2026-10-27 §1.3)`,
1856
+ },
1857
+ }
1858
+ : {}),
1818
1859
  draftRuleHint: workflowDraftHint ?? "草稿态(DRAFT)保存不触发业务规则——DRAFT 行跳过 Create/Update 分发(DomainServiceImpl.java:240-248);要一调完成态本调用加 submit:true(仅 data.save 有此参数;data.submit 不收);已存草稿直提形状:data.submit {schemaCode, bizObjectId: 本读回的 bizObjectId, formData}(submit 自持久化)",
1819
1860
  };
1820
1861
  // r18 retro (G3): one-call COMPLETED creation — the agent goal is usually
@@ -1879,7 +1920,11 @@ export function registerRuntimeDataLane(tools) {
1879
1920
  schemaCode: z.string().min(1),
1880
1921
  sheetCode: z.string().optional(),
1881
1922
  bizObjectId: z.string().min(1).describe("id of the EXISTING record to edit; the tool refuses when it is absent (never silently inserts)"),
1882
- formData: runtimeFormDataArg.describe("fields to change, keyed by field code; the platform merges them onto the stored record, so omitted fields keep their value (patch semantics)"),
1923
+ formData: runtimeFormDataArg.describe(
1924
+ // 券商 issue 1.3(cpdocs 2026-10-27):把主键契约写进参数面——OMC 工具
1925
+ // 收顶层 bizObjectId 并由工具写入 data.id;直调 REST 时主键必须自己放
1926
+ // data.id,放 bizObject.bizObjectId 会被忽略并静默新建孤儿行。
1927
+ "fields to change, keyed by field code; the platform merges them onto the stored record, so omitted fields keep their value (patch semantics). 更新主键由顶层 bizObjectId 携带,工具写入 data.id——平台只读 data.id(直调 REST 更新时主键也必须在 data.id,放 bizObject.bizObjectId 会被忽略并静默新建孤儿行,cpdocs issue 2026-10-27 §1.3)"),
1883
1928
  ...readbackProjectionArgs,
1884
1929
  },
1885
1930
  execute: async (session, args) => {
@@ -209,6 +209,16 @@ export function refusalRecovery(blocker, payload, options = {}) {
209
209
  // not overwritten — single owner per envelope.
210
210
  if (payload.recovery !== undefined)
211
211
  return payload.recovery;
212
+ // r70 探针01-F5/F12:同 code 重建撞 601012「模型编码已存在于回收站」——裸 wire-business
213
+ // 只给 help 指针,探针自己挖出语义。回收站残留正是 removedClean:false 的实体面
214
+ // (report.delete 后平台树干净但回收站仍占 code),在这教清楚。
215
+ const text0 = JSON.stringify({ m: payload.message, d: payload.detail, c: payload.errcode });
216
+ if (/601012|回收站/.test(text0)) {
217
+ return {
218
+ whatWentWrong: "该 code 在平台回收站里还有残留(report.delete 删除/其它资源删除后进了回收站,code 仍被占用)——这正是删除回执 removedClean:false 的实体面",
219
+ fixFirst: "处置三选一:① 换一个 code 重建(最快,不动回收站);② 门户「回收站」里物理删除该条目后原 code 可用;③ 保留残留用现名(先 report.get 核对 treeVisibility)。不要反复重试同 code——回收站不清空它就一直占。",
220
+ };
221
+ }
212
222
  // r19 p14: the report BI boundary is matched from the wire path in the
213
223
  // message/detail, so both refused and frozen (uncertain) envelopes teach it.
214
224
  if (mentionsDashboardChannel(payload)) {
package/dist/residue.js CHANGED
@@ -127,6 +127,9 @@ export async function scanResidues(session, prefix, options = {}) {
127
127
  // coverage 逐面标注,未扫面不得读作「零残留」。
128
128
  clean: userResidues === 0 && !pendingCascade,
129
129
  cleanWithinScannedFaces: userResidues === 0 && !pendingCascade,
130
+ // r70 探针01-F7:真残留存在时顶层 clean:true 仍误导(coverage 在深处,首屏只看
131
+ // clean)——caveat 常驻顶层,紧贴 clean 键。
132
+ cleanCaveat: "clean 仅指已扫描面;report 面未扫描(报表资源残留用 report.tree + report.get 判)",
130
133
  coverage: { report: "not-scanned(用 report.tree + report.get 判,BI 残留看 readback.biResidue)", workflow: "模板跟模型走(模型删即删)" },
131
134
  ...(systemPresetCount > 0 ? { systemPresetCount } : {}),
132
135
  ...(pendingCascade ? { pendingCascade: true } : {}),
package/dist/support.js CHANGED
@@ -102,6 +102,11 @@ export async function resolveApplicationScope(session, requested) {
102
102
  * The echo payload for a scan-style read: `source` says why this application,
103
103
  * `applicationCount` says how many the tenant has (fallback case only), so a
104
104
  * zero result can never be mistaken for tenant-wide absence.
105
+ *
106
+ * cpdocs issue 2026-10-30(pwsh-ergonomics)P1:`source=first-tenant-application`
107
+ * 且租户应用数>1 时附 `scannedApplications: "1 / total: N"`——`count:0` 被读成
108
+ * 「不存在」的高危场景,结构化键比散文 hint 更难被忽略(词表与
109
+ * discover_environment 同源:explicit|configured|first-tenant-application)。
105
110
  */
106
111
  export function applicationResolutionOf(scope) {
107
112
  return {
@@ -109,6 +114,9 @@ export function applicationResolutionOf(scope) {
109
114
  source: scope.source,
110
115
  ...(scope.requested !== null ? { requested: scope.requested } : {}),
111
116
  ...(scope.applicationCount !== undefined ? { applicationCount: scope.applicationCount } : {}),
117
+ ...(scope.source === "first-tenant-application" && (scope.applicationCount ?? 1) > 1
118
+ ? { scannedApplications: `1 / total: ${scope.applicationCount}` }
119
+ : {}),
112
120
  };
113
121
  }
114
122
  /** One-line nudge appended to a zero-result scan read; names the real scope of the answer. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stalfh233/omc-cli",
3
- "version": "0.6.63",
3
+ "version": "0.6.65",
4
4
  "description": "CloudPivot 8.6 configuration capability CLI — governed, fail-closed, coverage-manifest bounded.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -56,7 +56,7 @@
56
56
  },
57
57
  "dependencies": {
58
58
  "commander": "14.0.3",
59
- "omc-core": "0.6.63",
59
+ "omc-core": "0.6.65",
60
60
  "proper-lockfile": "4.1.2",
61
61
  "write-file-atomic": "6.0.0",
62
62
  "zod": "^3.23.8",
@@ -74,6 +74,6 @@
74
74
  "directory": "packages/omc-cli"
75
75
  },
76
76
  "optionalDependencies": {
77
- "@stalfh233/omc-fake-platform": "0.6.63"
77
+ "@stalfh233/omc-fake-platform": "0.6.65"
78
78
  }
79
79
  }
@@ -42,9 +42,10 @@ handle 返回值,可当轻量后端 API(见 §5.1 调用面;8.6.26 反编
42
42
 
43
43
  先按 cpdocs 的落点判据定「配置 / 二开」;判到二开时,再用上表在两种 Java 落点间选。
44
44
 
45
- 手工路径(人不用 CLI 时):IDEA 写 → 粘贴设计器「在线编码」界面 save/publish;本地保留
46
- `.omc-programming/` 同构副本进 git 作回滚依据(published 无 wire 读取端点);平台无乐观锁,
47
- 多端编辑漂移时以平台草稿为准重拉。
45
+ 手工路径(人不用 CLI 时):入口两条——设计器新建规则时选「编码」模式,或图形化编辑中
46
+ 「切换模式」转编码(官方 6.x 口径);IDEA 写 → 粘贴设计器「在线编码」界面 save/publish;
47
+ 本地保留 `.omc-programming/` 同构副本进 git 作回滚依据(published 无 wire 读取端点);
48
+ 平台无乐观锁,多端编辑漂移时以平台草稿为准重拉。
48
49
 
49
50
  ## 0.1 在线编码的能力边界(实测,1.1.25)
50
51
 
@@ -77,7 +78,9 @@ handle 返回值,可当轻量后端 API(见 §5.1 调用面;8.6.26 反编
77
78
  所以用 Java 8 之后的语法时,错误里会先出现一坨 Lombok 异常,真正的
78
79
  `cannot find symbol` 排在后面。**看错误先看最后一条**,别被 Lombok 噪音带偏。
79
80
  Lombok 的代码生成也**不可用**(`@Data` 生成的方法找不到),老老实实手写 getter/setter
80
- 和 `LoggerFactory.getLogger(...)`。
81
+ 和 `LoggerFactory.getLogger(...)`。注意这套行为是 **compile 检查器**一侧的;运行期
82
+ AppBox javac 带的 lombok processor 是另一套,两套规则有差异——compile 绿 ≠ 运行可编
83
+ (见下「compile 通过 ≠ 运行可用」)。
81
84
 
82
85
  ### 可用依赖
83
86
 
@@ -92,7 +95,23 @@ Lombok 的代码生成也**不可用**(`@Data` 生成的方法找不到),
92
95
 
93
96
  **别按平台的「补全白名单」写代码**:白名单列了 `engine.api.*` / `engine.domain.*` /
94
97
  `engine.service.*`,但**白名单 ≠ javac 类路径**——白名单里很多类实际编不过。以
95
- `engine.open.*` 为准,拿不准就先 `programming.compile` 试一次(只读,不落库)。
98
+ `engine.open.*` 为准,拿不准就先 `programming.compile` 试一次(只读,不落库)——但它
99
+ 只能证伪、不能证实:**compile 通过 ≠ 运行可用**,见下节。
100
+
101
+ ### compile 通过 ≠ 运行可用(两套编译器;#34 真机双复现 2026-11-13,1.1.25)
102
+
103
+ `programming.compile` 的检查器与**运行期 AppBox javac(带 lombok processor)是两套编译器**,
104
+ 规则有已知差异:compile 回 `success:true`,运行期照样编译失败——`rule.run` 只回 50000
105
+ 「在线编码执行异常」,**真错只在 `<launcher>/logs/log_error.log`**。已知假阴性两类(普通
106
+ 写法,双复现):
107
+
108
+ | 写法(compile 绿) | 运行期真错 | 改法 |
109
+ |---|---|---|
110
+ | `catch (Throwable t)` | `incompatible types: java.lang.Throwable cannot be converted to java.lang.Exception` | 用 `catch (Exception e)` |
111
+ | try 块内赋值的局部变量 | `IllegalStateException: [<变量名>没有进行初始化]` | 变量声明处初始化 |
112
+
113
+ 所以 compile 只能**证伪**(报错 = 一定不可用),不能证实;**闭环验证 = publish 后
114
+ `rule.run` 真跑一次**,回 50000 就去 `<launcher>/logs/log_error.log` 查真错。
96
115
 
97
116
  ### 运行时约束
98
117
 
@@ -139,7 +158,9 @@ Lombok 的代码生成也**不可用**(`@Data` 生成的方法找不到),
139
158
  内存泄漏(见上方生命周期表)。
140
159
 
141
160
  适用判据:有状态 / 要容器 / 多 bean 协作的逻辑沉到扩展包 bean;字段改写、跨模型编排、
142
- 触发时机留在线编码。纯无状态工具方法连 bean 都不用——直接 import 扩展包静态工具类即可。
161
+ 触发时机留在线编码。纯无状态工具方法连 bean 都不用——直接 import 扩展包静态工具类即可;
162
+ redis/mq 等中间件客户端同理(官方 6.x 口径:中间件操作经本地工具类 = 融合路径的应用,
163
+ 规则里只调用,不在规则里建连/注册)。
143
164
 
144
165
  ### 类路径统一模型(8.6.26 反编译 + 真机启动参数 2026-11-10)
145
166
 
@@ -165,10 +186,11 @@ import;但 launcher 自身的嵌套 BOOT-INF lib 对直接 import 仍不可见
165
186
  - 你负责**产出可部署的 jar + 源码 + 单测**,并说清「这个类已经在代码里、但需要部署后才可用」。
166
187
  - **部署与重启不要自己做**:这是运维动作,会让别人正在用的系统中断。停下来,向需求方/运维说明
167
188
  「需要部署这个 jar 并重启 launcher 才生效」,等他们给窗口。
168
- - 判断某个扩展类当前是否**已生效**,别猜:写进 handler 走一次 `programming.compile`
169
- **你没法列举已部署的类**:CLI 没有「列出 extensions 内容」的读面(`extensions/` 在远端容器里,
170
- agent 侧看不到)。判断某个类能不能用只有一条路——写进 handler,`programming.compile` 试一次
171
- (只读、不落库):成功即可用,`errors[]` 里报 `package ... does not exist` 即不可用。
189
+ - **你没法列举已部署的类**:CLI 没有「列出 extensions 内容」的读面(`extensions/` 在远端
190
+ 容器里,agent 侧看不到)。判断某个扩展类能不能用只有一条路——写进 handler,
191
+ `programming.compile` 试一次(只读、不落库):`errors[]` 报 `package ... does not exist`
192
+ 即不可用(证伪有效);compile 绿只说明**类路径可达**,≠ 运行可用(两套编译器,见 §0.1
193
+ 「compile 通过 ≠ 运行可用」)——最终以 publish 后真跑一次为准。
172
194
 
173
195
  **类路径是启动时快照,不是「目录里有就能用」**(真机对照实验 2026-11-11,r53):
174
196
  `loader.path` 在 webapi 进程**启动时**解析成类路径快照,之后新放进目录的 jar **连编译都看不见**——
@@ -191,7 +213,7 @@ agent 侧看不到)。判断某个类能不能用只有一条路——写进 h
191
213
  ```bash
192
214
  # 1) 读模板(未落库时平台按规则类型生成;不传 code 自动推导主键)
193
215
  omc call programming.get --env <env> --args '{"schemaCode":"contract","businessRuleCode":"Update"}'
194
- # 2) 编译检查(先编译,再保存——错误定位最省事)
216
+ # 2) 编译检查(先编译,再保存——错误定位最省事;通过 ≠ 运行可用,见 §0.1)
195
217
  omc call programming.compile --env <env> --args '{"schemaCode":"contract","businessRuleCode":"Update","content":"...java..."}'
196
218
  # 3) 存草稿(不影响运行时)
197
219
  omc call programming.save --env <env> --args-file save.json
@@ -249,7 +271,8 @@ cleanup:
249
271
 
250
272
  流水:compile 门禁 → publish(内容未变可跳过)→ 触发(`data.*`;`custom` 用 `rule.run`)
251
273
  → `data.list` 断言 → 只清理自己种的行 → 报告 `verdict`。编译失败/触发异常(带 Java
252
- errmsg)/断言失败都会进报告,agent 据此改码重跑。
274
+ errmsg)/断言失败都会进报告,agent 据此改码重跑。compile 门禁是**必要非充分**(检查器有
275
+ 已知假阴性,见 §0.1),publish 后的触发一步不可省。
253
276
 
254
277
  ### 触发前提:DRAFT 不执行规则
255
278
 
@@ -286,7 +309,8 @@ cpdocs 提供**平台知识与规范**,本 CLI 提供**执行面**。已安装
286
309
  `compile` → `apply --publish` → `programming test` 断言 → (跨模型/对外接口才升到二开扩展包)**。
287
310
 
288
311
  在线编码里能用什么依赖、什么语法、什么必须退回扩展包——见 [§0.1 能力边界](#01-在线编码的能力边界实测-1125)。
289
- 拿不准某个类能不能用,先 `programming.compile` 试一次(只读不落库),比猜快。
312
+ 拿不准某个类能不能用,先 `programming.compile` 试一次(只读不落库),比猜快——但 compile
313
+ 绿 ≠ 运行可用,能否真跑以 publish 后 `rule.run` 一次为准(假阴性清单见 §0.1)。
290
314
 
291
315
  ## 5. 典型 handler 骨架(已验证可编译可运行)
292
316
 
@@ -334,6 +358,10 @@ public class <schema><rule>Handler extends BaseHandler {
334
358
  }
335
359
  ```
336
360
 
361
+ Request 语义(官方 6.x 文档):`Context` 目前仅 `userId`;
362
+ `request.getData().getBizObject()` 在**自定义按钮未选数据时返回 null**——骨架里对
363
+ `current` 判空就是为它,别假设 BizObject 必有值。
364
+
337
365
  ### 三个必踩的骨架陷阱(真机 1.1.25,2026-11-12 r57)
338
366
 
339
367
  **① `createBizObject` 返回 `String`(新行 id),不是 `BizObject`**
@@ -502,6 +530,7 @@ mkdir -p "$LAUNCHER/inject_code_dir" && chown <容器用户uid>:<gid> "$LAUNCHER
502
530
  |---|---|---|
503
531
  | publish 回 `PROGRAMMING_COMPILE_FAILED` | 编译失败 | `programming.compile` 看 errors;注意类名/包名/括号 |
504
532
  | 规则执行 50000 | 运行时编译/注入失败 | 先看 `log_error.log`;常见是 `inject_code_dir` 权限 |
533
+ | compile 回 `success:true` 但执行 50000「在线编码执行异常」 | **compile 检查器 ≠ 运行期 AppBox javac(带 lombok processor)**,已知假阴性:`catch (Throwable)`、try 块内初始化的局部变量 | 真错去 `<launcher>/logs/log_error.log`;写法改 `catch (Exception)`、变量声明处初始化;闭环验证 = publish 后 `rule.run` 一次(#34 真机双复现 2026-11-13,见 §0.1) |
505
534
  | `programming.schemas` 空 | 平台只列**已有编码规则**的模型 | 用 `rule.list` 找规则,`adopt`/`get` 起模板 |
506
535
  | `list_source_by_schemacode` 报源码不存在 | 任一规则缺草稿会整列失败 | 用 `programming.get` 逐条读(未落库回模板) |
507
536
  | apply 报 `remote-ahead` | 别人改过远端草稿 | 先 `pull`,再改再 apply |