Archived
M5/M6 修复串:判据 ③ 全链路跑通 —— 六处「声明与引擎对不上」
判据 ③ 现在从入站到 released 一路走通:步序推进 → LLM 步(密钥是占位符,
按声明降级为人兜底)→ 台账草稿层 → D1 条件跳步 → S4 工具 → S5 DMN 三分类
(LM358DR → Type A · 直接快答)→ 验收放行 → 草稿合并正式版 2 行 → 输出口
intake 发射 → 终态 released。
沿路修掉的六处,每一处都是「声明是这么写的,引擎不这么读」:
1. 人兜底卡只问一个笼统「结果」框 → 改问**这一步声明的出参字段**。
出参契约属于步、不属于执行者:同一步谁做完,落进作用域的形状都得一样。
2. 人事件的载荷是回传协议壳 `{mode,workOrderId,values}`,
引擎把整个壳当出参写 → 取 `values`。
3. 引擎作用域是 `{'域.对象': 行数组}`,而所有活动的步声明写的都是裸字段名 →
任务视图三层铺开:起单入参在底、各对象最新行的字段铺顶层、地址式整表保留。
4. 起单入参从不落库、也进不了作用域 → task 存 `input_data`,断点续跑后仍在。
5. 步出参无法声明**写哪一行** → 出参加 `key`(主键列 → 作用域路径);
六个活动包的每处出参补上键。台账几乎都有主键,不声明键就只能写无主键行。
6. `tick` 不处理 `finished`:谱走完仍按 running 一拍拍推,把预算烧到 exhausted,
把「没人裁」误报成「跑爆了」→ 放行通过则落地收敛后 released;未放行则挂起等人。
`flow.advance` 据末步验收裁决报 released —— **完成只出自放行通过**。
另两处装配缺口:
· `release.land()` 实现完整却无人调用 —— 放行后从不落地。经 LandingGateway 接上。
· `process.onTaskTerminal()` 实现完整却无人调用 —— 任务终态报不到流程层,
流就停在那个节点上,既不流转也不走失败走向。task 在 L6 不得反向依赖 L7,
这一跳由 app 缝合(延后绑定,同 container 里 TriggerMatcher 的手法)。
还有一处版本化缺陷:资产播种恒用 v1,`shouldSeedAsset` 一比就跳过 ——
只有**第一个**包版本的资产此生有效,之后装什么都跑旧的。改为播下一版;
进化管线放行出的更高版仍不被盖过;同版重复安装不再播种。
gates: tsc / eslint / depcruise(317 模块)/ api-report / 393 测试 全绿
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KeDBx2PHLavbURXB8LJJ7m
This commit is contained in:
@@ -13,7 +13,7 @@ export const manifest: ActivityManifest = {
|
||||
identity: {
|
||||
activityId: ACTIVITY_ID,
|
||||
name: 'A7 · 情报归档',
|
||||
packageVersion: '0.1.0',
|
||||
packageVersion: '0.1.1',
|
||||
category: '统一报价',
|
||||
paradigm: 'flow',
|
||||
sdkVersion: '0.1.0-m5',
|
||||
@@ -118,7 +118,12 @@ export const manifest: ActivityManifest = {
|
||||
name: 'S1_log_result',
|
||||
label: 'S1 结果登记(拒绝原因 / 竞对价位)',
|
||||
input: { reason: 'reason', quoteNo: 'quoteNo' },
|
||||
output: { domain: 'shared', object: 'history_price', fields: { lost_reason: 'lostReason' } },
|
||||
output: {
|
||||
domain: 'shared',
|
||||
object: 'history_price',
|
||||
key: { pn: 'pn', quoted_at: 'quotedAt' },
|
||||
fields: { lost_reason: 'lostReason' },
|
||||
},
|
||||
model: 'quote-extractor',
|
||||
template: '从跟进反馈里抽出拒绝原因与竞对价位。只输出 JSON。反馈:{{reason}}',
|
||||
outputSchema: {
|
||||
@@ -132,7 +137,12 @@ export const manifest: ActivityManifest = {
|
||||
name: 'S2_profile',
|
||||
label: 'S2 画像更新(供 P-01 的客户等级因子取用)',
|
||||
input: { customerCode: 'customerCode', reason: 'reason' },
|
||||
output: { domain: 'shared', object: 'customer', fields: { profile_tags: 'tags' } },
|
||||
output: {
|
||||
domain: 'shared',
|
||||
object: 'customer',
|
||||
key: { customer_code: 'customerCode' },
|
||||
fields: { profile_tags: 'tags' },
|
||||
},
|
||||
tool: 'quote-archive.profile',
|
||||
failure: { retry: { times: 1, backoff: 'PT10S' }, fallback: { kind: 'blocked' } },
|
||||
},
|
||||
@@ -141,7 +151,12 @@ export const manifest: ActivityManifest = {
|
||||
name: 'S3_landing_rate',
|
||||
label: 'S3 落地率统计',
|
||||
input: {},
|
||||
output: { domain: 'shared', object: 'landing_stats', fields: { landing_rate: 'landingRate' } },
|
||||
output: {
|
||||
domain: 'shared',
|
||||
object: 'landing_stats',
|
||||
key: { period: 'period' },
|
||||
fields: { landing_rate: 'landingRate' },
|
||||
},
|
||||
tool: 'quote-archive.landing-rate',
|
||||
failure: { retry: { times: 1, backoff: 'PT10S' }, fallback: { kind: 'blocked' } },
|
||||
},
|
||||
|
||||
@@ -40,7 +40,7 @@ export const manifest: ActivityManifest = {
|
||||
identity: {
|
||||
activityId: ACTIVITY_ID,
|
||||
name: 'A1 · RFQ 需求分析',
|
||||
packageVersion: '0.1.0',
|
||||
packageVersion: '0.1.2',
|
||||
category: '统一报价',
|
||||
paradigm: 'flow',
|
||||
sdkVersion: '0.1.0-m5',
|
||||
@@ -135,6 +135,10 @@ export const manifest: ActivityManifest = {
|
||||
{ name: 'type_tag', type: 'text', primaryKey: false, masked: false },
|
||||
{ name: 'basis', type: 'text', primaryKey: false, masked: false, label: '分级依据' },
|
||||
{ name: 'history_hit', type: 'boolean', primaryKey: false, masked: false, label: '历史价命中' },
|
||||
// 打标的三个判据必须落表:S5 的 DMN 从这里读,不落就无米下锅
|
||||
{ name: 'history_days', type: 'integer', primaryKey: false, masked: false, label: '距上次报价天数' },
|
||||
{ name: 'market_stable', type: 'boolean', primaryKey: false, masked: false, label: '行情稳定' },
|
||||
{ name: 'lifecycle', type: 'text', primaryKey: false, masked: false, label: '生命周期' },
|
||||
],
|
||||
},
|
||||
],
|
||||
@@ -168,7 +172,12 @@ export const manifest: ActivityManifest = {
|
||||
name: 'S3_normalize',
|
||||
label: 'S3 逐条解析归一',
|
||||
input: { rfqRef: 'rfqRef', customerCode: 'customerCode' },
|
||||
output: { domain: INTAKE_DOMAIN, object: 'record', fields: { pn: 'pn', brand: 'brand', eau: 'eau' } },
|
||||
output: {
|
||||
domain: INTAKE_DOMAIN,
|
||||
object: 'record',
|
||||
key: { customer_code: 'customerCode', pn: 'pn' },
|
||||
fields: { pn: 'pn', brand: 'brand', eau: 'eau' },
|
||||
},
|
||||
model: 'quote-extractor',
|
||||
template:
|
||||
'按《询价受理规范》把这份 RFQ 拆解为逐条需求,抄录 PN/数量/EAU/厂牌/目标价/交期。' +
|
||||
@@ -213,7 +222,18 @@ export const manifest: ActivityManifest = {
|
||||
name: 'S4_history',
|
||||
label: 'S4 查历史价',
|
||||
input: { pn: 'pn' },
|
||||
output: { domain: INTAKE_DOMAIN, object: 'type_table', fields: { history_hit: 'hit' } },
|
||||
// 情报四件全部落表:S5 打标要的就是这三件,只落 hit 会让下一步无米下锅
|
||||
output: {
|
||||
domain: INTAKE_DOMAIN,
|
||||
object: 'type_table',
|
||||
key: { pn: 'pn' },
|
||||
fields: {
|
||||
history_hit: 'hit',
|
||||
history_days: 'historyDays',
|
||||
market_stable: 'marketStable',
|
||||
lifecycle: 'lifecycle',
|
||||
},
|
||||
},
|
||||
tool: 'crm.history-price-read',
|
||||
failure: { retry: { times: 2, backoff: 'PT1M' }, fallback: { kind: 'human', workOrder: 'execution' } },
|
||||
},
|
||||
@@ -221,8 +241,14 @@ export const manifest: ActivityManifest = {
|
||||
kind: 'pure-tool',
|
||||
name: 'S5_classify',
|
||||
label: 'S5 逐条打标(DMN · 三分类规则 P-03)',
|
||||
input: { historyDays: 'historyDays', marketStable: 'marketStable', lifecycle: 'lifecycle' },
|
||||
output: { domain: INTAKE_DOMAIN, object: 'type_table', fields: { type_tag: 'type', basis: 'play' } },
|
||||
// 入参名 ← 作用域路径:作用域里是 S4 落表后的字段名
|
||||
input: { historyDays: 'history_days', marketStable: 'market_stable', lifecycle: 'lifecycle' },
|
||||
output: {
|
||||
domain: INTAKE_DOMAIN,
|
||||
object: 'type_table',
|
||||
key: { pn: 'pn' },
|
||||
fields: { type_tag: 'type', basis: 'play' },
|
||||
},
|
||||
tool: 'quote-intake.classify',
|
||||
failure: { retry: { times: 1, backoff: 'PT10S' }, fallback: { kind: 'blocked' } },
|
||||
},
|
||||
|
||||
@@ -15,7 +15,7 @@ export const manifest: ActivityManifest = {
|
||||
identity: {
|
||||
activityId: ACTIVITY_ID,
|
||||
name: 'A6 · 报价议价',
|
||||
packageVersion: '0.1.0',
|
||||
packageVersion: '0.1.1',
|
||||
category: '统一报价',
|
||||
paradigm: 'flow',
|
||||
sdkVersion: '0.1.0-m5',
|
||||
@@ -135,7 +135,12 @@ export const manifest: ActivityManifest = {
|
||||
name: 'S1_compose',
|
||||
label: 'S1 生成正式报价单',
|
||||
input: { items: 'items', customerCode: 'customerCode' },
|
||||
output: { domain: DOMAIN, object: 'formal_quote', fields: { unit_price: 'unitPrice', lead_time: 'leadTime' } },
|
||||
output: {
|
||||
domain: DOMAIN,
|
||||
object: 'formal_quote',
|
||||
key: { quote_no: 'quoteNo', pn: 'pn' },
|
||||
fields: { unit_price: 'unitPrice', lead_time: 'leadTime' },
|
||||
},
|
||||
model: 'quote-extractor',
|
||||
template:
|
||||
'把已批准的报价草案排版为正式报价单条目(单价CNY/交期/SPQ/MOQ/贸易条款),' +
|
||||
|
||||
@@ -59,7 +59,7 @@ export const manifest: ActivityManifest = {
|
||||
identity: {
|
||||
activityId: ACTIVITY_ID,
|
||||
name: 'A4 · 成本定价',
|
||||
packageVersion: '0.1.0',
|
||||
packageVersion: '0.1.1',
|
||||
category: '统一报价',
|
||||
paradigm: 'flow',
|
||||
sdkVersion: '0.1.0-m5',
|
||||
@@ -167,7 +167,7 @@ export const manifest: ActivityManifest = {
|
||||
label: 'S1 取价基准',
|
||||
// Type A 取历史价近期价;B/C 取供应商底价表(C 类参考替代对标表)
|
||||
input: { pn: 'pn' },
|
||||
output: { domain: DOMAIN, object: 'draft', fields: { deviation: 'deviation' } },
|
||||
output: { domain: DOMAIN, object: 'draft', key: { pn: 'pn' }, fields: { deviation: 'deviation' } },
|
||||
tool: 'crm.history-price-read',
|
||||
failure: { retry: { times: 2, backoff: 'PT1M' }, fallback: { kind: 'human', workOrder: 'execution' } },
|
||||
},
|
||||
@@ -176,7 +176,12 @@ export const manifest: ActivityManifest = {
|
||||
name: 'S2_price',
|
||||
label: 'S2 逐条定价(DMN · 利润模型 P-01)',
|
||||
input: { customerGrade: 'customerGrade', materialType: 'materialType', volumeTier: 'volumeTier' },
|
||||
output: { domain: DOMAIN, object: 'draft', fields: { margin: 'marginLow', quoted_price: 'quotedPrice' } },
|
||||
output: {
|
||||
domain: DOMAIN,
|
||||
object: 'draft',
|
||||
key: { pn: 'pn' },
|
||||
fields: { margin: 'marginLow', quoted_price: 'quotedPrice' },
|
||||
},
|
||||
tool: 'quote-pricing.margin',
|
||||
failure: { retry: { times: 1, backoff: 'PT10S' }, fallback: { kind: 'blocked' } },
|
||||
},
|
||||
@@ -185,7 +190,7 @@ export const manifest: ActivityManifest = {
|
||||
name: 'S3_floor_gate',
|
||||
label: 'S3 底价自检(DMN · 底价门禁 P-02)',
|
||||
input: { deviation: 'deviation' },
|
||||
output: { domain: DOMAIN, object: 'draft', fields: { disposition: 'disposition' } },
|
||||
output: { domain: DOMAIN, object: 'draft', key: { pn: 'pn' }, fields: { disposition: 'disposition' } },
|
||||
tool: 'quote-pricing.floor-gate',
|
||||
failure: { retry: { times: 1, backoff: 'PT10S' }, fallback: { kind: 'blocked' } },
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user