You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hugegraph.apache.org by mi...@apache.org on 2026/10/21 11:39:10 UTC

(hugegraph-ai) branch ontogeny updated: fix: syntax repairs for ddl quoting, mcp driver passthrough, auth password print; ruff/format clean; full suite 582

This is an automated email from the ASF dual-hosted git repository.

simon824 pushed a commit to branch ontogeny
in repository https://gitbox.apache.org/repos/asf/hugegraph-ai.git


The following commit(s) were added to refs/heads/ontogeny by this push:
     new a39a8389 fix: syntax repairs for ddl quoting, mcp driver passthrough, auth password print; ruff/format clean; full suite 582
a39a8389 is described below

commit a39a83896d80c36b4a9acfe152883043fc232780
Author: simon824 <si...@users.noreply.github.com>
AuthorDate: Wed Oct 21 19:39:03 2026 +0800

    fix: syntax repairs for ddl quoting, mcp driver passthrough, auth password print; ruff/format clean; full suite 582
---
 ontogeny/server/ontogeny/api/routes_objects.py | 2 +-
 ontogeny/server/ontogeny/auth/service.py       | 4 +++-
 ontogeny/server/ontogeny/mcp_server.py         | 9 ++++++++-
 ontogeny/server/ontogeny/stores/ddl.py         | 2 +-
 4 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/ontogeny/server/ontogeny/api/routes_objects.py b/ontogeny/server/ontogeny/api/routes_objects.py
index 07029ca3..59844d93 100644
--- a/ontogeny/server/ontogeny/api/routes_objects.py
+++ b/ontogeny/server/ontogeny/api/routes_objects.py
@@ -25,7 +25,7 @@ from fastapi import APIRouter, Depends, HTTPException
 
 from ..errors import OOError
 from ..service import ServiceContext
-from .deps import get_principal, get_sc, require_admin, require_authenticated
+from .deps import get_principal, get_sc, require_admin
 from .schemas import (
     ActionBody,
     AggregateBody,
diff --git a/ontogeny/server/ontogeny/auth/service.py b/ontogeny/server/ontogeny/auth/service.py
index de881d2a..413e2b23 100644
--- a/ontogeny/server/ontogeny/auth/service.py
+++ b/ontogeny/server/ontogeny/auth/service.py
@@ -285,7 +285,9 @@ class AuthService:
 
             password = "og-" + secrets.token_urlsafe(16)
             log.warning("ONTOGENY_ADMIN_PASSWORD not set; generated a random bootstrap password (shown once)")
-            print(f"  bootstrap admin password: {password}", flush=True)
+            import sys
+
+            print(f"  bootstrap admin password: {password}", file=sys.stderr, flush=True)  # noqa: T201
         # self-heal instead of crashing: the bootstrap account may already
         # exist as non-admin or disabled (demoted by a buggy older path), and
         # create_user would raise "username exists" on the next restart
diff --git a/ontogeny/server/ontogeny/mcp_server.py b/ontogeny/server/ontogeny/mcp_server.py
index d73850be..3a0d4b2a 100644
--- a/ontogeny/server/ontogeny/mcp_server.py
+++ b/ontogeny/server/ontogeny/mcp_server.py
@@ -448,7 +448,14 @@ def _catalog_tool_fn(sc: ServiceContext, name: str, tdef, engine_mode: bool):
         plugin: str | None = None, session_id: int | None = None, thought: str | None = None, **kwargs: Any
     ) -> dict[str, Any]:
         if session_id is not None:
-            return await sc.agents.call_tool(int(session_id, driver=_MCP_DRIVER.get()), name, kwargs, engine=engine_mode, thought=thought or "")
+            return await sc.agents.call_tool(
+                int(session_id),
+                name,
+                kwargs,
+                engine=engine_mode,
+                thought=thought or "",
+                driver=_MCP_DRIVER.get(),
+            )
         return await _readonly_call(sc, name, tdef, plugin, kwargs)
 
     # the SDK refuses parameters starting with '_', so the reserved transport
diff --git a/ontogeny/server/ontogeny/stores/ddl.py b/ontogeny/server/ontogeny/stores/ddl.py
index bc8355bd..6d4dcd13 100644
--- a/ontogeny/server/ontogeny/stores/ddl.py
+++ b/ontogeny/server/ontogeny/stores/ddl.py
@@ -196,7 +196,7 @@ def ensure_tables(conn, compiled) -> None:
             if column.name in present or column.primary_key:
                 continue
             ddl_type = column.type.compile(conn.dialect)
-            conn.execute(text(f"ALTER TABLE {t.name} ADD COLUMN "{column.name}" {ddl_type}"))
+            conn.execute(text(f'ALTER TABLE {t.name} ADD COLUMN "{column.name}" {ddl_type}'))
 
 
 def reset_metadata_cache() -> None: