feat(services): register workflow-native driver keys in field registry
Workflow reconciliation (see previous commit) showed the 20261022
state variable really stores person identity under driver{i}ID /
driver{i}Phonenumber (x2), while the API get_info group keys
(sfzmhm{i}/sjhm{i}) have zero references in any workflow version -
the legacy group read always returned empty for workflow-produced data.
- registry: +4 keys (driver1/2ID, driver1/2Phonenumber) in
human1/human2 groups, SENSITIVE, documented as synonymous with
sfzmhm{i}/sjhm{i}; 24 -> 28 specs
- driver{i}License deliberately NOT registered: the sandbox reads
state.hphm{i} and only renames the output for confirmation prompts -
it is not a state key, set_info rejects it as unknown (workflow
never consumes it)
- intentional diff documented: acdhuman1/2 group output now includes
the driver keys (legacy FastGPT output did not) - fixes the legacy
'workflow person data unreadable by group' gap; synonym merging
(driver1ID vs sfzmhm1) deferred pending caller confirmation
- tests: registry size 28, driver keys present with sensitive level,
License alias excluded
Verified: 230 unit tests
This commit is contained in:
@@ -56,12 +56,23 @@
|
||||
### 对账发现的一个真实差异
|
||||
|
||||
20261022 workflow 的 `state` 变量中人员信息键为
|
||||
`driver1ID / driver1License / driver1Phonenumber`(×2),
|
||||
`driver1ID / driver1Phonenumber`(×2,sandbox 另把 `hphm1/2`
|
||||
车牌改名 `driver{i}License` 输出给确认提示词——该名不是 state 键),
|
||||
与 API `get_info` 分组键(`sfzmhm1/sjwh1/sjhm1` 等)**不同名**。
|
||||
旧 FastGPT 实现按 API 分组键读 state,这些键在 workflow state 中
|
||||
本就读空——属于既有行为。新后端注册表沿用了 API 契约键
|
||||
(保证 get/set_info 自洽),workflow 侧键名差异已列入审计:
|
||||
若线上有调用方依赖 `driver1ID` 等键,需决定是否补登记别名。
|
||||
本就读空——属于既有行为。
|
||||
|
||||
**处理(2026-10-22 已落地)**:注册表把 workflow 原生键
|
||||
`driver{i}ID / driver{i}Phonenumber`(×2,同义 sfzmhm/sjhm)
|
||||
登记进 human1/human2 分组——
|
||||
- set/get_info 单键直读写 driver 系键与旧 API 行为一致;
|
||||
- **有意差异**:`acdhuman1/2` 分组输出现包含 driver 系键
|
||||
(旧 FastGPT 分组输出没有它们)。调用方按 JSON 取键,多键无害;
|
||||
这修正了旧实现"workflow 真实人员数据无法分组读到"的问题;
|
||||
- `driver{i}License` 非 state 键,对其 set_info 按未知键拒绝
|
||||
(workflow 不消费它);
|
||||
- 同义键(driver1ID vs sfzmhm1)暂不合并:合并需调用方确认
|
||||
实际使用侧后作为后续优化,已列入审计项。
|
||||
|
||||
## 待审计项(作业 6-7 要求的后续工作)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user