From 58bcee4db830c9806afd915418f38b84c56538fa Mon Sep 17 00:00:00 2001 From: eust-w Date: Tue, 30 Jun 2026 08:02:30 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Align=20summary=20runtime=20cont?= =?UTF-8?q?racts?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/operators/builtin/lerobot_summary/operator.json | 2 +- backend/operators/builtin/lerobot_summary/repository.json | 4 ++-- backend/operators/builtin/rosbag_summary/operator.json | 2 +- backend/operators/builtin/rosbag_summary/repository.json | 4 ++-- internal/api/builtin_operators_catalog.json | 8 ++++---- operator-repos/builtin/lerobot_summary/README.md | 2 +- operator-repos/builtin/lerobot_summary/operator.json | 2 +- operator-repos/builtin/lerobot_summary/repository.json | 4 ++-- .../builtin/lerobot_summary/runtime_contract.json | 2 +- operator-repos/builtin/rosbag_summary/README.md | 2 +- operator-repos/builtin/rosbag_summary/operator.json | 2 +- operator-repos/builtin/rosbag_summary/repository.json | 4 ++-- .../builtin/rosbag_summary/runtime_contract.json | 2 +- scripts/generate_operator_images.py | 3 ++- scripts/generate_operator_repositories.py | 2 ++ 15 files changed, 24 insertions(+), 21 deletions(-) diff --git a/backend/operators/builtin/lerobot_summary/operator.json b/backend/operators/builtin/lerobot_summary/operator.json index 1c48622a..6aef484c 100644 --- a/backend/operators/builtin/lerobot_summary/operator.json +++ b/backend/operators/builtin/lerobot_summary/operator.json @@ -12,7 +12,7 @@ "imageId": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-lerobot-summary:69b0e0e-poc-20260630072404@sha256:9cb7288be1a06c0098d0babd83da3e1b821be02644483b8d02ad92145d43dd95", "migrationStatus": "migrated", "name": "LeRobot 数据集概览", - "runtimeHandler": "builtin_lerobot_summary", + "runtimeHandler": "lerobot", "runtimeSource": "backend/operators/builtin/lerobot_summary/operator.py", "type": "builtin" } diff --git a/backend/operators/builtin/lerobot_summary/repository.json b/backend/operators/builtin/lerobot_summary/repository.json index bddc8a4e..8d2b8669 100644 --- a/backend/operators/builtin/lerobot_summary/repository.json +++ b/backend/operators/builtin/lerobot_summary/repository.json @@ -39,7 +39,7 @@ "requiresManifest": true }, "entrypoint": "/app/backend/operator-runner/main.py", - "handler": "builtin_lerobot_summary", + "handler": "lerobot", "imagePolicy": { "allowsSharedBaseLayer": true, "forbidsSharedOperatorRunnerFinalImage": true, @@ -65,7 +65,7 @@ "runtimeDependencies": [ "lerobot-dataset-files" ], - "runtimeHandler": "builtin_lerobot_summary", + "runtimeHandler": "lerobot", "runtimeSource": "backend/operators/builtin/lerobot_summary/operator.py", "schemaVersion": "droboticflow.operator.repository/v1", "sourceRoot": "backend/operators/builtin/lerobot_summary", diff --git a/backend/operators/builtin/rosbag_summary/operator.json b/backend/operators/builtin/rosbag_summary/operator.json index ee664c99..62312358 100644 --- a/backend/operators/builtin/rosbag_summary/operator.json +++ b/backend/operators/builtin/rosbag_summary/operator.json @@ -12,7 +12,7 @@ "imageId": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-rosbag-summary:69b0e0e-poc-20260630072404@sha256:ac7d5fbcd7cf2b80c51e6f5f972bc66d7b9563ca3ceeaac7ceba6b3101c9b1f0", "migrationStatus": "migrated", "name": "ROSBag 数据概览", - "runtimeHandler": "builtin_rosbag_summary", + "runtimeHandler": "rosbag", "runtimeSource": "backend/operators/builtin/rosbag_summary/operator.py", "type": "builtin" } diff --git a/backend/operators/builtin/rosbag_summary/repository.json b/backend/operators/builtin/rosbag_summary/repository.json index 4dadc8d8..41e7e795 100644 --- a/backend/operators/builtin/rosbag_summary/repository.json +++ b/backend/operators/builtin/rosbag_summary/repository.json @@ -39,7 +39,7 @@ "requiresManifest": true }, "entrypoint": "/app/backend/operator-runner/main.py", - "handler": "builtin_rosbag_summary", + "handler": "rosbag", "imagePolicy": { "allowsSharedBaseLayer": true, "forbidsSharedOperatorRunnerFinalImage": true, @@ -67,7 +67,7 @@ "rosbag2-files", "sqlite" ], - "runtimeHandler": "builtin_rosbag_summary", + "runtimeHandler": "rosbag", "runtimeSource": "backend/operators/builtin/rosbag_summary/operator.py", "schemaVersion": "droboticflow.operator.repository/v1", "sourceRoot": "backend/operators/builtin/rosbag_summary", diff --git a/internal/api/builtin_operators_catalog.json b/internal/api/builtin_operators_catalog.json index 0018e7c3..0b7d06a9 100644 --- a/internal/api/builtin_operators_catalog.json +++ b/internal/api/builtin_operators_catalog.json @@ -8392,7 +8392,7 @@ "requiresManifest": true }, "entrypoint": "/app/backend/operator-runner/main.py", - "handler": "builtin_lerobot_summary", + "handler": "lerobot", "imagePolicy": { "allowsSharedBaseLayer": true, "forbidsSharedOperatorRunnerFinalImage": true, @@ -8416,7 +8416,7 @@ ], "schemaVersion": "droboticflow.operator.runtime/v1" }, - "runtimeHandler": "builtin_lerobot_summary", + "runtimeHandler": "lerobot", "runtimeSource": "operator-repos/builtin/lerobot_summary/src/operator.py", "skillDefinition": "面向 LeRobot 数据集目录的真实概览算子,适合机器人示教数据检查。", "type": "builtin" @@ -8473,7 +8473,7 @@ "requiresManifest": true }, "entrypoint": "/app/backend/operator-runner/main.py", - "handler": "builtin_rosbag_summary", + "handler": "rosbag", "imagePolicy": { "allowsSharedBaseLayer": true, "forbidsSharedOperatorRunnerFinalImage": true, @@ -8498,7 +8498,7 @@ ], "schemaVersion": "droboticflow.operator.runtime/v1" }, - "runtimeHandler": "builtin_rosbag_summary", + "runtimeHandler": "rosbag", "runtimeSource": "operator-repos/builtin/rosbag_summary/src/operator.py", "skillDefinition": "支持 rosbag db3 topic/message 概览,以及 bag/mcap 文件摘要。", "type": "builtin" diff --git a/operator-repos/builtin/lerobot_summary/README.md b/operator-repos/builtin/lerobot_summary/README.md index aefbc1dc..674b55ba 100644 --- a/operator-repos/builtin/lerobot_summary/README.md +++ b/operator-repos/builtin/lerobot_summary/README.md @@ -4,7 +4,7 @@ - 镜像:`ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-lerobot-summary:69b0e0e-poc-20260630072404` - Digest:`ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-lerobot-summary:69b0e0e-poc-20260630072404@sha256:9cb7288be1a06c0098d0babd83da3e1b821be02644483b8d02ad92145d43dd95` -- Runtime handler:`builtin_lerobot_summary` +- Runtime handler:`lerobot` - Source:`src/operator.py` 生产验收要求真实 fixture、artifact checksum、lineage 证据;不接受 mock、仿真、smoke 或空文件验收。 diff --git a/operator-repos/builtin/lerobot_summary/operator.json b/operator-repos/builtin/lerobot_summary/operator.json index df73f5b1..0dc3ec66 100644 --- a/operator-repos/builtin/lerobot_summary/operator.json +++ b/operator-repos/builtin/lerobot_summary/operator.json @@ -12,7 +12,7 @@ "imageId": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-lerobot-summary:69b0e0e-poc-20260630072404@sha256:9cb7288be1a06c0098d0babd83da3e1b821be02644483b8d02ad92145d43dd95", "migrationStatus": "migrated", "name": "LeRobot 数据集概览", - "runtimeHandler": "builtin_lerobot_summary", + "runtimeHandler": "lerobot", "runtimeSource": "operator-repos/builtin/lerobot_summary/src/operator.py", "type": "builtin" } diff --git a/operator-repos/builtin/lerobot_summary/repository.json b/operator-repos/builtin/lerobot_summary/repository.json index 07dadcef..669fdcb0 100644 --- a/operator-repos/builtin/lerobot_summary/repository.json +++ b/operator-repos/builtin/lerobot_summary/repository.json @@ -42,7 +42,7 @@ "requiresManifest": true }, "entrypoint": "/app/backend/operator-runner/main.py", - "handler": "builtin_lerobot_summary", + "handler": "lerobot", "imagePolicy": { "allowsSharedBaseLayer": true, "forbidsSharedOperatorRunnerFinalImage": true, @@ -69,7 +69,7 @@ "runtimeDependencies": [ "lerobot-dataset-files" ], - "runtimeHandler": "builtin_lerobot_summary", + "runtimeHandler": "lerobot", "runtimeSource": "operator-repos/builtin/lerobot_summary/src/operator.py", "schemaVersion": "droboticflow.operator.repository/v1", "sourceRoot": "operator-repos/builtin/lerobot_summary", diff --git a/operator-repos/builtin/lerobot_summary/runtime_contract.json b/operator-repos/builtin/lerobot_summary/runtime_contract.json index ac86eecd..8a9c4896 100644 --- a/operator-repos/builtin/lerobot_summary/runtime_contract.json +++ b/operator-repos/builtin/lerobot_summary/runtime_contract.json @@ -12,7 +12,7 @@ "requiresManifest": true }, "entrypoint": "/app/backend/operator-runner/main.py", - "handler": "builtin_lerobot_summary", + "handler": "lerobot", "imagePolicy": { "allowsSharedBaseLayer": true, "forbidsSharedOperatorRunnerFinalImage": true, diff --git a/operator-repos/builtin/rosbag_summary/README.md b/operator-repos/builtin/rosbag_summary/README.md index a928bcee..039631d1 100644 --- a/operator-repos/builtin/rosbag_summary/README.md +++ b/operator-repos/builtin/rosbag_summary/README.md @@ -4,7 +4,7 @@ - 镜像:`ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-rosbag-summary:69b0e0e-poc-20260630072404` - Digest:`ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-rosbag-summary:69b0e0e-poc-20260630072404@sha256:ac7d5fbcd7cf2b80c51e6f5f972bc66d7b9563ca3ceeaac7ceba6b3101c9b1f0` -- Runtime handler:`builtin_rosbag_summary` +- Runtime handler:`rosbag` - Source:`src/operator.py` 生产验收要求真实 fixture、artifact checksum、lineage 证据;不接受 mock、仿真、smoke 或空文件验收。 diff --git a/operator-repos/builtin/rosbag_summary/operator.json b/operator-repos/builtin/rosbag_summary/operator.json index 7cd44fca..f57a0e31 100644 --- a/operator-repos/builtin/rosbag_summary/operator.json +++ b/operator-repos/builtin/rosbag_summary/operator.json @@ -12,7 +12,7 @@ "imageId": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-rosbag-summary:69b0e0e-poc-20260630072404@sha256:ac7d5fbcd7cf2b80c51e6f5f972bc66d7b9563ca3ceeaac7ceba6b3101c9b1f0", "migrationStatus": "migrated", "name": "ROSBag 数据概览", - "runtimeHandler": "builtin_rosbag_summary", + "runtimeHandler": "rosbag", "runtimeSource": "operator-repos/builtin/rosbag_summary/src/operator.py", "type": "builtin" } diff --git a/operator-repos/builtin/rosbag_summary/repository.json b/operator-repos/builtin/rosbag_summary/repository.json index 45647d3e..8b8b1a24 100644 --- a/operator-repos/builtin/rosbag_summary/repository.json +++ b/operator-repos/builtin/rosbag_summary/repository.json @@ -42,7 +42,7 @@ "requiresManifest": true }, "entrypoint": "/app/backend/operator-runner/main.py", - "handler": "builtin_rosbag_summary", + "handler": "rosbag", "imagePolicy": { "allowsSharedBaseLayer": true, "forbidsSharedOperatorRunnerFinalImage": true, @@ -71,7 +71,7 @@ "rosbag2-files", "sqlite" ], - "runtimeHandler": "builtin_rosbag_summary", + "runtimeHandler": "rosbag", "runtimeSource": "operator-repos/builtin/rosbag_summary/src/operator.py", "schemaVersion": "droboticflow.operator.repository/v1", "sourceRoot": "operator-repos/builtin/rosbag_summary", diff --git a/operator-repos/builtin/rosbag_summary/runtime_contract.json b/operator-repos/builtin/rosbag_summary/runtime_contract.json index 4e306526..c2ea60ed 100644 --- a/operator-repos/builtin/rosbag_summary/runtime_contract.json +++ b/operator-repos/builtin/rosbag_summary/runtime_contract.json @@ -12,7 +12,7 @@ "requiresManifest": true }, "entrypoint": "/app/backend/operator-runner/main.py", - "handler": "builtin_rosbag_summary", + "handler": "rosbag", "imagePolicy": { "allowsSharedBaseLayer": true, "forbidsSharedOperatorRunnerFinalImage": true, diff --git a/scripts/generate_operator_images.py b/scripts/generate_operator_images.py index 5776175f..5d734193 100644 --- a/scripts/generate_operator_images.py +++ b/scripts/generate_operator_images.py @@ -248,11 +248,12 @@ RUN mkdir -p /tmp/droboticflow-home /workspace /outputs def contract_for(item: dict[str, Any], slug: str) -> dict[str, Any]: dependencies = RUNTIME_DEPENDENCIES.get(slug, []) gpu = slug in GPU_SLUGS + handler = container_handler(item, slug) return { "schemaVersion": "droboticflow.operator.runtime/v1", "operatorId": item["id"], "operatorSlug": slug, - "handler": item.get("runtimeHandler") or slug, + "handler": handler, "entrypoint": "/app/backend/operator-runner/main.py", "imagePolicy": { "independentFinalImage": True, diff --git a/scripts/generate_operator_repositories.py b/scripts/generate_operator_repositories.py index 78b0b842..8f1bf6d4 100644 --- a/scripts/generate_operator_repositories.py +++ b/scripts/generate_operator_repositories.py @@ -33,6 +33,8 @@ def operator_slug(operator_id: str) -> str: def read_runtime_contract(catalog_item: dict[str, Any]) -> dict[str, Any]: contract = dict(catalog_item.get("runtimeContract") or {}) + handler = contract.get("handler") or catalog_item.get("runtimeHandler") or operator_slug(catalog_item["id"]) + contract["handler"] = CONTAINER_HANDLER_ALIASES.get(handler, handler) contract["sourceRoot"] = f"operator-repos/builtin/{operator_slug(catalog_item['id'])}" contract["runtimeSource"] = "src/operator.py" return contract