Repository navigation
fix(semantics): restrict reflective attributes to owning metaclasses - #1835
Conversation
Co-Authored-By: jason.han <hanhuijun@gmail.com>
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
There was a problem hiding this comment.
🔍 Devin Review: 1 flag
Not posted on this PR by your GitHub settings — view it in Devin Review. (Configure)
|
The advisory flag about RDF/reflection attribute ownership is not a valid-source discrepancy. Verified with the CLI built from this head: API-JSON omits No exporter change is needed for this reflective-ownership fix. |
What and why
Reflective reads now respect metaclass attribute ownership:
ConjugatedPortDefinitionanswers onlyisAbstractandisSufficientin its Type-attribute branch, bothfalse.isConstant.isParallelis derived only for metaclasses conforming toStateDefinitionorStateUsage.reflectiveFeatureBoolean/FeatureIsConstantpath.Caller inspection confirmed that typed filters, queries and runtime reflection check metaclass/property applicability before reading;
ok=falserepresents an absent or underived value, not a lost legitimate property. Parser/AST behavior is unchanged: an invalidconstant part defprefix can populateDefinition.IsConstantwhile producing a diagnostic.Correct the existing unreleased conjugated-port entry and add a separate ownership-fix entry. No files from #1834 are changed.
Specification basis
KerML 8.3.3.1 defines Type attributes
isAbstractandisSufficient; KerML 8.3.3.3.4 placesisConstanton Feature. SysML v2 8.3.12.3 defines the owned conjugated port definition, while 8.3.18.5–8.3.18.6 placeisParallelonStateDefinitionandStateUsage. No compliance row or gate count changes.How it was verified
~Q, part/port definitions and part usages; true/false state parallelism; and unchanged Feature constancy.go build ./...,go vet ./...,make lint,make changelog-check: pass.gofmt -l .: empty../scripts/download-pilot-corpora.shand./scripts/download-training-examples.sh,OPENSYSML_REQUIRE_PILOT_CORPORA=1 OPENSYSML_REQUIRE_TRAINING_CORPUS=1 go test -count=1 ./internal/semantic/... ./internal/translate/export/... ./tests/export/... ./internal/check/...: pass.go -C tools test -count=1 ./referee/apijson/... ./oracle/baseline/...: pass, including the provenance guards; no re-recording needed../scripts/download-spec-examples.sh,OPENSYSML_REQUIRE_PILOT_CORPORA=1 OPENSYSML_REQUIRE_TRAINING_CORPUS=1 OPENSYSML_REQUIRE_SPEC_EXAMPLES=1 go test -count=1 ./tests/corpus -run TestCorpusRoundTrip: pass, not skipped. All 880 pinned verdicts remain unchanged: 835 stable, 7 whitespace-only, 38 refused; zero graph differences, unwritable files or unparseable files.OPENSYSML_REQUIRE_PILOT_CORPORA=1 OPENSYSML_REQUIRE_TRAINING_CORPUS=1 OPENSYSML_REQUIRE_SPEC_EXAMPLES=1 go test -p 2 -timeout=30m ./...: pass. The initial default-timeout run timed out incmd/sysmlandtests/codegen; both pass in the lower-concurrency rerun (323s and 383s).Checklist
go test ./...andmake lintpass locally (race suite runs in CI)changes/unreleased/<slug>.<section>.md, not as an edit toCHANGELOG.md