Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

BReg: name `relationship` in the Action input refusal message

未关闭 适合新手
#2,150 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
92/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
rust
领域
backend

调研方向

从 crates/registry-breg/src/contract.rs 中的 impl Deserialize for ActionInputSource 开始,其中定义了拒绝条件和 Invalid::expected 消息。更新两个预期的成员字符串,并检查 crates/registry-breg/tests/field_encryption_contract.rs 中的断言;如果需要,添加或调整一个同级测试,以覆盖 relationship 成员。完成的标准是诊断文本和快速修复文本都指明 relationship,验证仍会拒绝该成员,并且相关测试全部通过。

由索引模型根据 Issue 内容生成。

描述

area:breg bug criticality:p3

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

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

registrystack/registry-stack 的其他 Issue

查看 registrystack/registry-stack 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。