simon824 commented on code in PR #380:
URL: https://github.com/apache/hugegraph-ai/pull/380#discussion_r4236014723


##########
domains/product-manufacturing/functions/material-availability.yaml:
##########
@@ -0,0 +1,27 @@
+apiVersion: ontogeny/v1
+kind: Function
+metadata:
+  name: material-availability
+  display: Material availability check
+  description: Explode the product BOM, compare required quantities against 
on-hand material stock and
+    return the shortage list
+spec:
+  runtime: python
+  entry: availability.py:material_availability
+  parameters:
+    product_id:
+      type: string
+      required: true
+      display: Product ID
+    qty:
+      type: integer
+      required: true
+      display: Quantity
+  returns:
+    type: string

Review Comment:
   Same as the capacity-check thread: intentionally unchanged. 
`material_availability` returns a success/failure union (failure: `{product_id, 
ready: false, shortage: [], reason}`), the type vocabulary has no 
object/list-of-structs shape, and `returns` is documentation-only. Revisit if 
the DSL grows an object type.



##########
domains/product-manufacturing/functions/order-yield.yaml:
##########
@@ -0,0 +1,22 @@
+apiVersion: ontogeny/v1
+kind: Function
+metadata:
+  name: order-yield
+  display: Order quality yield
+  description: Summarise inspection results and routing progress for one 
production order
+spec:
+  runtime: python
+  entry: yield.py:order_yield
+  parameters:
+    order_id:
+      type: string
+      required: true
+      display: Order ID
+  returns:
+    type: string

Review Comment:
   Same rationale as the other two function threads: `order_yield` returns a 
success/failure union (`pass_rate` is `null` when nothing was inspected), which 
the current type vocabulary cannot express. Left as `string` with the "(JSON)" 
display note.



##########
server/ontogeny/core/__init__.py:
##########
@@ -0,0 +1,35 @@
+# Copyright 2026 Apache HugeGraph Authors
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+"""ontogeny.core -- DSL: models, loading, validation, linting, expression 
language."""
+
+from .loader import OntologyPackage, load_package

Review Comment:
   Fixed in deff6b2: `from .linter import lint` is now imported before the 
`__all__` export, so `from ontogeny.core import *` resolves it.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to