Repository navigation
Conversation
…efines an inherited one Co-Authored-By: jason.han <hanhuijun@gmail.com>
…ined-inherited-succession
|
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 found 2 findings. Devin automatically fixed all 2 findings.
Fixed by Devin (2)
- Missing succession on selectively exposed lifelines — Confirmed: a leaf inheriting a redefining succession from a usage the view does not show lost the order. It now reads the redefining succession's own order. Fix is committed locally (3f36674403) with a test; the push is held for the merge lane and lands with the next push.
- Missing succession with inherited ends — Confirmed with
succession s2 :>> s;: no arrow was drawn. The redefining succession is now read over the nearest ends it inherits, under its own name. Fix is committed locally (3f36674403) with a test; the push is held for the merge lane and lands with the next push.
QA: PASSTested head The fix
Unchanged, base and head byte-identical
Past fixes in the touched area (head)
With #2661 #2661 (private event inheritance) is still open, so it is not in this base. Merged locally onto this head it conflicts in Hosted CI 20 passed, 0 failed, 13 skipped (the client, editor, PDF and derived-property jobs). Not run
No failures, so no failure screenshots. |
QA: passHead Gates on the head
Note on the race run: in the combined command
Failing-firstWith only
Sequence renders, develop against head
Named succession redefined; one further specializer; one plain inheritor messages:
client.sent -> a: m1 of Ping
- client.sent -> client.got: s
client.sent -> client.got: s2
b -> client.got: m2 of Ping
heir.sent -> a: m3 of Ping
- heir.sent -> heir.got: s
heir.sent -> heir.got: s2
b -> heir.got: m4 of Ping
other.sent -> c: m5 of Ping
other.sent -> other.got: s
d -> other.got: m6 of Ping
sent -> got: sMermaid: the same two lines go ( A definition stating the order onto several usages ( Anonymous redefinition ( Events themselves redefined client.sent2 -> a: m1 of Ping
- client.sent2 -> client.got2: s
client.sent2 -> client.got2: s2
b -> client.got2: m2 of Ping
inheritor.sent3 -> a: m3 of Ping
inheritor.sent3 -> inheritor.got3: s
b -> inheritor.got3: m4 of Ping
half.sent3 -> a: m5 of Ping
- half.sent3 -> half.got3: s
half.sent3 -> half.got3: s4Redefinition chain and a reversing redefinition ( Unchanged, as expected: a model with no redefinition, a member-attached Existing models: every Re-merge over #2661A scratch merge of develop + #2661's head if read[[2]int{i, at}] || !r.specializes(shown[lifeline], o.within) {
continue
}
// A succession the lifeline redefines is read there as the one redefining it.
if o.succession != nil && r.memberFor(shown[lifeline], o.succession) != o.succession {
continue
}
from, fromDrawn := r.orderedOn(lifeline, shown[lifeline], o.from)
to, toDrawn := r.orderedOn(lifeline, shown[lifeline], o.to)
undrawn := !fromDrawn || !toDrawnWith that resolution Not covered
|
What and why
A sequence rendering drew two succession arrows on a lifeline that redefines a named succession it inherits: the inherited one and the one redefining it. It now draws only the redefining succession there. Lifelines that merely inherit the succession still draw it.
inheritedOrders(internal/ir/view/sequence.go) reads an order a type states onto every shown lifeline specializing that type. It checked that the lifeline holds the two events, but not that the succession stating the order is still a member of the lifeline. The redefining succession is collected as an order of its own, so both were drawn. The reading is now skipped whenmemberFor(lifeline, succession)is another feature, the same maskingMembersOfapplies and that the events already go through. This covers ordinary specialization, a lifeline typed by a definition that redefines, a lifeline further down the chain, an unnamed redefinition, and a succession over events held by reference subsetting. A member-attachedthen, which has no succession usage to redefine, is unchanged.Model (
spec.sysml, validates cleanly):sysml -render '#sequence' -render-form mermaid spec.sysml, arrows only (n5isclient,n3/n4aresent/gotofsource):develop)Reference subsetting (
ref part observer ::> source { succession s first sent then got; },part client :> observer, source { succession s2 :>> s first sent then got; };n6isclient):develop)Specification basis
A succession usage is a feature, and a feature redefined by a feature of a type is not among that type's inherited memberships (KerML
Type::inheritedMemberships, which removes redefined features), so the redefined succession does not hold on the redefining lifeline. No row indocs/project/spec-compliance/moves.How it was verified
internal/ir/view/sequence_inherited_test.go, written first and failing ondevelopwith the extraoriginalarrows:TestSequenceRenderingDropsAnInheritedSuccessionTheLifelineRedefines: the redefining lifeline, a lifeline specializing it, a sibling that only inherits (keepsoriginal), and the declaring usage itself.TestSequenceRenderingDropsARedefinedSuccessionOverReferenceSubsetEvents.succession :>> s ...; each draws one arrow on the redefining lifeline andson a plain inheritor.go build ./...andgo vet ./...in the root andtoolsmodules,gofmt -l,make lint,go test -race ./internal/ir/view, andgo testover the packages that render views (./examples ./internal/doc/... ./internal/ir/... ./internal/check/passes/diagram ./internal/frontend/{repl,lsp,grpc,jupyter} ./cmd/sysml).make testsuite and the corpus sweeps.Try it:
make build-sysml && bin/sysml -render '#sequence' -render-form mermaid spec.sysmlChecklist
make testandmake lintpass locally (make lintand the packages listed above; not the full suite)changes/unreleased/<slug>.<section>.md, not as an edit toCHANGELOG.mdmake docs-countsrun if a gate count moved (compliance rows need nothing: the census is counted at docs build) (none moved)F4,K5) in the body, docs, or changelogImplemented in session Drop redefined inherited successions from sequence views
Review with Devin · Open in Devin Desktop