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:
@@ -70,6 +70,21 @@ def _human_fields(index: int) -> list[FieldSpec]:
|
||||
FieldSpec(f"sjhm{index}", group, str, True, SensitiveLevel.SENSITIVE, f"{side}手机号码"),
|
||||
FieldSpec(f"sjwh{index}", group, str, True, SensitiveLevel.PUBLIC, f"{side}手机文号"),
|
||||
FieldSpec(f"csbw{index}", group, str, True, SensitiveLevel.PUBLIC, f"{side}常熟部位/身份标识"),
|
||||
# workflow 原生键(对账发现,见 docs/assignment6-compat.md):
|
||||
# state 变量中真实读写的人员身份键,与上方 API 契约键同义并存:
|
||||
# driver{i}ID ~= sfzmhm{i}(身份证明号码)、
|
||||
# driver{i}Phonenumber ~= sjhm{i}(手机号码)。
|
||||
# 注意:workflow Code Sandbox 输出的 driver{i}License 是提示词
|
||||
# 输出别名(源数据为 state.hphm{i}),并非 state 键,故不登记——
|
||||
# 对它 set_info 会按未知键拒绝。
|
||||
FieldSpec(
|
||||
f"driver{index}ID", group, str, True, SensitiveLevel.SENSITIVE,
|
||||
f"{side}驾驶员身份证明号码(workflow 原生键,同义 sfzmhm{index})",
|
||||
),
|
||||
FieldSpec(
|
||||
f"driver{index}Phonenumber", group, str, True, SensitiveLevel.SENSITIVE,
|
||||
f"{side}驾驶员手机号码(workflow 原生键,同义 sjhm{index})",
|
||||
),
|
||||
]
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user