-strict accepts a namespace with indistinguishable memberships (warning, exit 0)
Maintainer thường phản hồi trong vòng 1 ngày
Một pull request liên quan đã được merge.
- #1050 của @devin-ai-integration — đã merge
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 45/100
Hướng nghiên cứu
Start by tracing how -strict and the service’s strict_conformance setting affect validation and how duplicate owned member names are reported. The issue gives a reproducer and expected behavior: under strict mode the warnings should become errors, while default-mode output stays unchanged. Check existing validation tests and add coverage for both modes; the issue does not name specific files or tests.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
The ruling
spec-pilot gap register #13: indistinguishable memberships are reported as a warning, as the pilot reports them, so that duplicated names in the training corpus do not fail its clean gate. The register's own assessment is that "the rule is a validate… constraint — a violating model is not well-formed — so a warning under-reports it".
Model and observed behaviour
package P {
part def A;
part def A;
}
$ sysml -validate -strict dup.sysml
dup.sysml:2:14: warning: Duplicate of other owned member name
dup.sysml:3:14: warning: Duplicate of other owned member name
✓ dup.sysml: no errors
$ echo $?
0
develop 1e68ecf2d. Without -strict the output is the same.
Why it is wrong under -strict
KerML §8.3.2.4.5 Namespace, validateNamespaceDistinguishibility (spelt so in the PDF): "All memberships of a Namespace must be distinguishable from each other." The two As have the same name and the same metaclass, so by §8.3.2.4.3 Membership::isDistinguishableFrom they are not distinguishable, and the model is not well-formed. -strict is described as judging "the model as conforming SysML v2", yet it accepts this model with exit 0. So a check run with -strict cannot rely on it to reject a model the specification says is not well-formed.
Proposed behaviour
Only under -strict (and strict_conformance on the service), report indistinguishable memberships as an error. The default stays a warning, so the training corpus, its clean gate and the differential against the pilot are unchanged.
This widens -strict from notation alone to this one well-formedness constraint, which is a change to what the flag means. If that is not wanted, a separate opt-in (a flag, or a lint code that can be raised to an error) would serve the same need.
The case against
The question to the specification's authors in #13 is still open. If they rule that a tool may keep resolving a namespace with indistinguishable memberships, an error would be stricter than the specification intends. Even then, the constraint as published is a validate… constraint, and a strict mode that claims conformance seems the place to apply it as written until that ruling changes it.
🤖 Generated with Claude Code
- Ngôn ngữ chính
- Go
- Star
- 47
- Fork
- 13
- Merge trung bình
- 15 giờ 52 phút
- Pull request đã merge (30 ngày)
- 906
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của Open-MBEE/OpenSysML
-
Definition of requirementsĐang mởquestion
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
Open-MBEE/OpenSysML#1359 · 4 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
Open-MBEE/OpenSysML#1628 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
spec compliance
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
Open-MBEE/OpenSysML#1576 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
question
Độ khó 4/5 1-2 ngày Mức phù hợp với người mới 48/100
Open-MBEE/OpenSysML#1575 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Review branding assetsĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của Open-MBEE/OpenSysML
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày
-
schema-drift
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
stefanhoth/paperless-ngx-cli#61 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Project submission: CodeAFĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
slavakurilyak/awesome-ai-agents#888 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement nav-pilot
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
-
kind/enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
Maintainer thường phản hồi trong vòng 1 ngày