From 54e40dbed08744692beecc518a43ea7ced449ece Mon Sep 17 00:00:00 2001 From: Norbert Hartl Date: Thu, 3 Sep 2026 20:07:45 +0200 Subject: [PATCH] Register routes from the reachable pragmas, not the presenter's own Route registration and link serialisation ask different questions of the same presenter. A variable segment has to register a route for every operation any specialisation under the base class may expose, long before it is known which concrete presenter serves a request - that is reachability. Serialising an object's _links asks what that one presenter offers, and gates it through isAllowed:. Both went through #allLinksPragmas, which collected over the whole subtree. Point route registration at #reachableLinkPragmas instead, which names the reachability question explicitly, so #allLinksPragmas is free to mean ordinary inheritance. No behaviour change on its own: #reachableLinkPragmas collects the same subtree #allLinksPragmas did. Co-Authored-By: Claude Opus 5 (1M context) --- source/HOP-Core/HOPVariableSegment.class.st | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/HOP-Core/HOPVariableSegment.class.st b/source/HOP-Core/HOPVariableSegment.class.st index 7119f43..febc030 100644 --- a/source/HOP-Core/HOPVariableSegment.class.st +++ b/source/HOP-Core/HOPVariableSegment.class.st @@ -72,8 +72,10 @@ HOPVariableSegment >> initializePresenter [ self presenterClasses do: [ :presenterClass | "each instance class can have a number of possible presenters. From an instance class we get the base presenter class" - "we collect all links pragma for the base class and all its subclasses" - presenterClass allLinksPragmas do: [ :pragma | + "routes must cover every operation any specialisation below the base class may + expose, so this asks the reachability question and not what the base presenter + itself offers - see AGObjectPresenter class>>reachableLinkPragmas" + presenterClass reachableLinkPragmas do: [ :pragma | self registerOperationFor: pragma presenter: presenterClass ] ].