chore: update docstring

This commit is contained in:
tao.chen
2026-09-02 10:10:41 +08:00
committed by tao.chen
parent ecf3b2e9c5
commit 5ed3aa4300
6 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -895,7 +895,7 @@ Base 前缀 `/api/v1/admin`。
整体替换指定平台角色的 `permission_codes`(diff-based 写入,见下文)。调用者必须是系统管理员。 整体替换指定平台角色的 `permission_codes`(diff-based 写入,见下文)。调用者必须是系统管理员。
> **本端点只控制前端菜单可见性**——不修改 `system_admin_context` 的鉴权判定(`role_code == "admin"` 始终等价于"拥有所有平台菜单权限")。若需调整 API 鉴权,请改 `backend.platform.system_admin_context`,不要绕过本端点。 > **本端点只控制前端菜单可见性**——不修改 `system_admin_context` 的鉴权判定(`role_code == "admin"` 始终等价于"拥有所有平台菜单权限")。若需调整 API 鉴权,请改 `backend.api.platform.system_admin_context`,不要绕过本端点。
- **请求体字段**: - **请求体字段**:
+1 -1
View File
@@ -168,7 +168,7 @@ grep -rnE 'os\.(environ\[?["\x27][A-Z_]+|getenv\(["\x27][A-Z_]+)' --include="*.p
### Service-to-service auth (P0-1 fix) ### Service-to-service auth (P0-1 fix)
- Schedule → Backend single endpoint ``POST /internal/v1/objects`` is - Schedule → Backend single endpoint ``POST /internal/v1/objects`` is
guarded by ``require_internal_service`` in ``backend.storage_api``. guarded by ``require_internal_service`` in ``backend.api.storage``.
- The token header is ``X-Internal-Service-Token`` (case-insensitive - The token header is ``X-Internal-Service-Token`` (case-insensitive
on the wire because FastAPI ``Header`` lowercase-matches the name on the wire because FastAPI ``Header`` lowercase-matches the name
``x-internal-service-token``); the secret value comes from ``x-internal-service-token``); the secret value comes from
+1 -1
View File
@@ -1,4 +1,4 @@
"""Unit tests for the 5s auth-result cache in ``backend.jupyter``. """Unit tests for the 5s auth-result cache in ``backend.api.jupyter``.
Jupyter 一次会话会触发几十次 Nginx ``auth_request``;本缓存按 Jupyter 一次会话会触发几十次 Nginx ``auth_request``;本缓存按
``(workspace_id, user_id)`` 缓存 membership + runtime 的查找结果,避免 ``(workspace_id, user_id)`` 缓存 membership + runtime 的查找结果,避免
+1 -1
View File
@@ -1,7 +1,7 @@
"""Unit tests for ``upload_bytes_to_session`` failure-path status persistence. """Unit tests for ``upload_bytes_to_session`` failure-path status persistence.
P0-5 / B1: the route handler wraps every request in ``session_scope`` P0-5 / B1: the route handler wraps every request in ``session_scope``
(``backend.dependencies.database_session``), which rolls back on (``backend.api.dependencies.database_session``), which rolls back on
exception. A naive ``upload.upload_status = "failed"; raise HTTPException(...)`` exception. A naive ``upload.upload_status = "failed"; raise HTTPException(...)``
loses the status flip and leaves the row stuck in ``created``/``uploading`` loses the status flip and leaves the row stuck in ``created``/``uploading``
forever. The fix is ``_mark_upload_failed_and_raise`` which opens a forever. The fix is ``_mark_upload_failed_and_raise`` which opens a
+1 -1
View File
@@ -1,6 +1,6 @@
"""Shared schedule-trigger logic. """Shared schedule-trigger logic.
Both the user-facing manual run endpoint (``backend.schedule_runs``) Both the user-facing manual run endpoint (``backend.api.schedules.runs``)
and the schedule service's cron tick handler call into this module to and the schedule service's cron tick handler call into this module to
materialize a ``ScheduleRuns`` row plus the corresponding materialize a ``ScheduleRuns`` row plus the corresponding
``schedule.run.requested`` outbox event. The outbox is the single ``schedule.run.requested`` outbox event. The outbox is the single
+1 -1
View File
@@ -191,7 +191,7 @@ def build_object_store(bucket_name: str | None = None) -> Any:
Respects ``settings.storage_backend``: in ``local`` mode points at the Respects ``settings.storage_backend``: in ``local`` mode points at the
local ``${local_storage_base_dir}/version`` directory (the same place local ``${local_storage_base_dir}/version`` directory (the same place
``backend.storage_api`` writes to), in ``s3`` mode points at the ``backend.api.storage`` writes to), in ``s3`` mode points at the
bucket named by ``bucket_name`` (default ``settings.s3_version_bucket``). bucket named by ``bucket_name`` (default ``settings.s3_version_bucket``).
The bucket override exists because some workspaces configure a custom The bucket override exists because some workspaces configure a custom