Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đang mở Phù hợp với người mới
#2,150 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
92/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
rust
Lĩnh vực
backend

Hướng nghiên cứu

Bắt đầu trong crates/registry-breg/src/contract.rs tại impl Deserialize for ActionInputSource, nơi điều kiện từ chối và thông báo Invalid::expected được định nghĩa. Cập nhật hai chuỗi thành viên được mong đợi và kiểm tra khẳng định trong crates/registry-breg/tests/field_encryption_contract.rs; nếu cần, hãy thêm hoặc điều chỉnh một test anh em bao phủ thành viên relationship. Hoàn tất nghĩa là văn bản chẩn đoán và quick fix đều nêu relationship, việc xác thực vẫn từ chối thành viên này và các test liên quan đều chạy thành công.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
Rust
Star
2
Fork
0
Merge trung bình
10 giờ 32 phút
Pull request đã merge (30 ngày)
256

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của registrystack/registry-stack

Tất cả issue của registrystack/registry-stack

Issue tương tự

Thêm issue về Rust

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.