BReg: name `relationship` in the Action input refusal message
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
从 crates/registry-breg/src/contract.rs 中的 impl Deserialize for ActionInputSource 开始,其中定义了拒绝条件和 Invalid::expected 消息。更新两个预期的成员字符串,并检查 crates/registry-breg/tests/field_encryption_contract.rs 中的断言;如果需要,添加或调整一个同级测试,以覆盖 relationship 成员。完成的标准是诊断文本和快速修复文本都指明 relationship,验证仍会拒绝该成员,并且相关测试全部通过。
由索引模型根据 Issue 内容生成。
描述
A relationship member on an Action input is refused, which is correct: inputs are ephemeral and
cannot declare an inverse relationship. But the diagnostic and its fix-it list only
validTimeRole, pattern, encrypted and lookup. An author who copied a reference field into
inputs is told to remove four members, none of which is present, and the one that caused the
refusal is never named.
Minimal repro, in a project whose registry.yaml has an Action with a reference input:
actions:
- id: register-facility
# ...
inputs:
- id: operator
type: reference
target: operator
relationship: {inverseName: registeredFacilities}
required: true
classification: internal
bregctl check <project> reports:
error[config.invalid-value] registry.yaml:<line>:<col> /actions/0/inputs/<n>
expected an action input without validTimeRole, pattern, encrypted, or lookup
next: Remove validTimeRole, pattern, encrypted, and lookup from the action input.
Expected:
expected an action input without validTimeRole, pattern, encrypted, lookup, or relationship
next: Remove validTimeRole, pattern, encrypted, lookup, and relationship from the action input.
Likely fix: crates/registry-breg/src/contract.rs, impl Deserialize for ActionInputSource. The
condition already refuses raw.relationship; only the two strings passed to Invalid::expected
need the fifth member. The assertion in crates/registry-breg/tests/field_encryption_contract.rs
(native_proposal_inputs_do_not_accept_persisted_record_encryption_members) matches the current
wording with .contains(...) and needs the same update. A sibling test that sets relationship
on an input would cover the case. Naming only the member actually present would be a better
message still.
The generated authoring schema already refuses relationship on inputs, so this is a
message-only fix.
Seen on main at 2fe7e90b2: the condition and both strings are unchanged.
- 主要语言
- Rust
- 星标
- 2
- 派生
- 0
- 平均合并
- 10 小时 32 分钟
- 30 天内合并 PR
- 269
环境准备
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
registrystack/registry-stack 的其他 Issue
-
area:docs documentation
难度 2/5 1-3 小时 新手友好度 76/100
registrystack/registry-stack#2253 ·
维护者通常 1 天内回复
-
area:coordinator bug
难度 2/5 1-3 小时 新手友好度 82/100
registrystack/registry-stack#2252 ·
维护者通常 1 天内回复
-
area:release bug
难度 2/5 1-3 小时 新手友好度 74/100
registrystack/registry-stack#2248 ·
维护者通常 1 天内回复
-
area:breg documentation
难度 1/5 1-3 小时 新手友好度 88/100
registrystack/registry-stack#2233 ·
维护者通常 1 天内回复
-
area:breg bug
难度 2/5 1-3 小时 新手友好度 90/100
registrystack/registry-stack#2231 ·
维护者通常 1 天内回复
查看 registrystack/registry-stack 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 66/100
home-assistant/installer#308 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
ProvableHQ/leo#29657 ·
-
bug
难度 2/5 1-3 小时 新手友好度 75/100
swc-project/swc-next#1053 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
nautechsystems/nautilus_trader#5387 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
NomicFoundation/edr#1872 ·
维护者通常 2 天内回复