Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

-strict accepts a namespace with indistinguishable memberships (warning, exit 0)

Aperta
#973 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@devin-ai-integration ci sta già lavorando.

Dal 10/10/2026.

  • #1050 di @devin-ai-integration — aperta

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
45/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
go
Ambito
backend

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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

Lingua principale
Go
Stelle
36
Fork
10
Merge medio
13h 17m
PR unite (30g)
791

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Open-MBEE/OpenSysML

Tutte le issue di Open-MBEE/OpenSysML

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.