diff --git a/docs/operations.md b/docs/operations.md index 29fd1a25..eecdfc97 100644 --- a/docs/operations.md +++ b/docs/operations.md @@ -101,11 +101,11 @@ Explicit `COMMAND` / `SCRIPT` execution is disabled by default. Set `OPERATOR_AL ## Acceptance Checks -Run acceptance checks after a deployment from a local shell or external CI. Live workflow acceptance requires `WORKFLOW_ACCEPTANCE_SOURCE_PATH`, a real path visible to operator-runner Jobs. GPU acceptance loads `scripts/load-deploy-env.sh`, so on `dev` it uses the POC kubeconfig when `DEPLOY_ENV` is unset; other environments still require a kubeconfig with permission to create a temporary Job in `K8S_NAMESPACE`. The GPU acceptance wrapper validates namespace, image, timeout, GPU count, selector, tolerations JSON, resource name, Job name, and runtime class before any `kubectl` call; invalid acceptance inputs fail locally instead of creating a malformed Job. It also checks for a selector-matched, non-unschedulable Node with enough allocatable GPU before creating its probe Job, so a CPU-only cluster or selector mismatch reports a hardware-capacity blocker explicitly. The deployed worker exposes the same allocatable-node view at `GET /worker-api/capacity`; API callers reach it through the normal worker API proxy and should expect `gpu.available=false` on POC until the cluster has schedulable `nvidia.com/gpu` resources. +Run acceptance checks after a deployment from a local shell or external CI. Live workflow acceptance requires `WORKFLOW_ACCEPTANCE_SOURCE_PATH`, a real path visible to operator-runner Jobs. GPU acceptance loads `scripts/load-deploy-env.sh`, so on `dev` it uses the POC kubeconfig when `DEPLOY_ENV` is unset; other environments still require a kubeconfig with permission to create a temporary Job in `K8S_NAMESPACE`. The GPU acceptance wrapper validates namespace, image, timeout, GPU count, selector, tolerations JSON, resource name, Job name, and runtime class before any `kubectl` call; invalid acceptance inputs fail locally instead of creating a malformed Job. It also checks for a selector-matched, non-unschedulable Node with enough allocatable GPU before creating its probe Job, so a CPU-only cluster or selector mismatch reports a hardware-capacity blocker explicitly. The deployed worker exposes the same allocatable-node view at `GET /worker-api/capacity`; API callers reach it through the normal worker API proxy and should expect `gpu.available=true` only after the target cluster has schedulable `nvidia.com/gpu` resources. `npm run acceptance:poc-gpu-capacity` verifies the deployed POC worker capacity endpoint from inside the cluster. It creates a short-lived Pod with the deployed `OPERATOR_RUNNER_IMAGE`, calls `http://droboticflow-worker:3002/worker-api/capacity`, and requires node-level capacity evidence. The default expectation is CPU-only POC (`gpu.available=false`, zero schedulable GPU, zero max single-node GPU); set `POC_GPU_CAPACITY_EXPECT_AVAILABLE=true` only after a real GPU node pool and NVIDIA runtime/device plugin are installed. -`npm run acceptance:poc-gpu-workflow` is the POC workflow-level GPU preflight check. With `DROBOTICFLOW_ACCEPTANCE_EMAIL` / `DROBOTICFLOW_ACCEPTANCE_PASSWORD`, it logs in and exercises the normal project/workflow/run APIs. Without session credentials, it uses `DROBOTICFLOW_API_TOKEN` from the environment or reads it from `droboticflow-auth-secret`, calls the bounded `/api/acceptance/poc-gpu-workflow` route to create or reuse one fixed GPU-preflight project/workflow, port-forwards the deployed worker service, triggers `/worker-api/process-once`, and requires a failed run log containing `gpu request cannot be scheduled`. Each invocation creates a fresh run for evidence but reuses the fixed POC GPU acceptance project/workflow to avoid cluttering the platform with duplicate acceptance containers. This verifies the worker path, not only the standalone `nvidia-smi` probe, while regular business writes still require a user session. `GET /api/acceptance/poc-readiness` and the dashboard expose this latest workflow-level proof as `gpuWorkflowPreflight`, separate from the hardware-capacity `gpu` gate, so CPU-only POC can prove the blocked path without pretending GPU runtime acceptance has passed. `npm run acceptance:poc-readiness` also calls that bounded platform readiness endpoint by default and requires the same `gpuWorkflowPreflight` evidence unless `POC_PLATFORM_READINESS_ENABLED=false` is explicitly set for isolated diagnostics. +`npm run acceptance:poc-gpu-workflow` is the POC workflow-level GPU check. With `DROBOTICFLOW_ACCEPTANCE_EMAIL` / `DROBOTICFLOW_ACCEPTANCE_PASSWORD`, it logs in and exercises the normal project/workflow/run APIs. Without session credentials, it uses `DROBOTICFLOW_API_TOKEN` from the environment or reads it from `droboticflow-auth-secret`, calls the bounded `/api/acceptance/poc-gpu-workflow` route to create or reuse one fixed GPU acceptance workflow, port-forwards the deployed worker service, and triggers `/worker-api/process-once`. The default CPU-only mode requires a failed run log containing `gpu request cannot be scheduled`. After real GPU hardware is installed, run with `POC_GPU_WORKFLOW_EXPECT_AVAILABLE=true` or `POC_GPU_CAPACITY_EXPECT_AVAILABLE=true`; the same script then requires a completed run with artifacts. Each invocation creates a fresh run for evidence but reuses the fixed POC GPU acceptance project/workflow to avoid cluttering the platform with duplicate acceptance containers. This verifies the worker path, not only the standalone `nvidia-smi` probe, while regular business writes still require a user session. `GET /api/acceptance/poc-readiness` and the dashboard expose this latest workflow-level proof as `gpuWorkflowPreflight`, separate from the hardware-capacity `gpu` gate. `npm run acceptance:poc-readiness` also calls that bounded platform readiness endpoint by default and requires matching CPU-only blocked evidence or GPU-available completed evidence unless `POC_PLATFORM_READINESS_ENABLED=false` is explicitly set for isolated diagnostics. ## Video Preview Performance @@ -215,7 +215,7 @@ REGISTRY_NAMESPACE=dataflow-poc \ npm run images:poc-kaniko ``` -The Kaniko wrapper archives the current git `HEAD` into the shared `/workspace` PVC, creates one Kubernetes Job each for API, worker, and operator-runner, and mounts the existing `droboticflow-registry` Secret as `/kaniko/.docker/config.json`. `IMAGE_TAG` defaults to `-poc-` for rollback-friendly POC pushes. The uploaded build context is removed on success, failure, or timeout by default; set `POC_KANIKO_CLEAN_CONTEXT=false` only when retaining the context for cluster-side diagnostics. `POC_KANIKO_REGISTRY_MIRRORS` defaults to `mirror.gcr.io` so base image pulls do not rely on unauthenticated Docker Hub quota; set it to a comma-separated mirror list or an empty value only when the cluster registry path is already reliable. POC also sets `POC_KANIKO_GOPROXY=https://goproxy.cn,direct` by default for Go module downloads inside the cluster; override it when the cluster has a different approved module proxy. +The Kaniko wrapper uploads the current tracked worktree files into the shared `/workspace` PVC by default, creates one Kubernetes Job each for API, worker, and operator-runner, and mounts the existing `droboticflow-registry` Secret as `/kaniko/.docker/config.json`. Set `POC_KANIKO_CONTEXT_SOURCE=head` when a reproducible build from committed `HEAD` is required. `IMAGE_TAG` defaults to `-poc-` for rollback-friendly POC pushes. The uploaded build context is removed on success, failure, or timeout by default; set `POC_KANIKO_CLEAN_CONTEXT=false` only when retaining the context for cluster-side diagnostics. `POC_KANIKO_REGISTRY_MIRRORS` defaults to `mirror.gcr.io` so base image pulls do not rely on unauthenticated Docker Hub quota; set it to a comma-separated mirror list or an empty value only when the cluster registry path is already reliable. POC also sets `POC_KANIKO_GOPROXY=https://goproxy.cn,direct` by default for Go module downloads inside the cluster; override it when the cluster has a different approved module proxy. Before launching the Job, run the read-only readiness gate: @@ -223,7 +223,7 @@ Before launching the Job, run the read-only readiness gate: DEPLOY_ENV=poc npm run acceptance:poc-readiness ``` -The readiness gate emits JSON and exits non-zero when the deployed API/worker images are not ready, the configured operator-runner image is missing, the deployed worker GPU capacity endpoint cannot be verified, the platform `gpuWorkflowPreflight` gate is missing or stale, `droboticflow-dcloud-secret` is absent or incomplete, generated fixtures are enabled, or the real fixture manifest is not usable on the shared workspace PVC. GPU capacity readiness defaults to a local `kubectl port-forward` probe against `service/droboticflow-worker`, disables local HTTP proxies for that loopback request, and expects CPU-only POC capacity; set `POC_GPU_CAPACITY_EXPECT_AVAILABLE=true` only after real GPU nodes are installed. Platform GPU workflow readiness resolves `API_BASE_URL` / `BASE_URL` first, otherwise reads `service/droboticflow-api-public`, and authenticates with `DROBOTICFLOW_API_TOKEN` or the token in `droboticflow-auth-secret`; run `npm run acceptance:poc-gpu-workflow` before final readiness so the platform has a real failed GPU-requesting workflow run to report. Use `POC_GPU_CAPACITY_PROBE_MODE=pod` only when port-forward is unavailable and a short-lived in-cluster Pod probe is acceptable. Its default manifest path is `${WORKSPACE_MOUNT_PATH:-/workspace}/fixtures/poc-operator-acceptance/poc-operator-acceptance.json`, and every manifest or fixture path must stay under the same `WORKSPACE_MOUNT_PATH` used by the deployed Pods. Manifest readiness means the JSON is parseable, declares `xplatform`, `csv`, `json`, `lerobot`, `rosbag`, `model`, and `shellCommand`, and every declared fixture path is readable with the expected file or directory type from the deployed Pod. `POC_ACCEPTANCE_ALLOW_GENERATED_FIXTURES=true` is diagnostic-only and blocks strict POC readiness instead of producing a `ready` result. The gate decodes secret keys only to check that required values are non-empty and never prints token, cookie, password, AK, SK, or kubeconfig data. A `ready` result is only a precondition for final acceptance; the strict pass signal still comes from `npm run acceptance:poc-operators` returning `fullExternalAcceptance=true`. +The readiness gate emits JSON and exits non-zero when the deployed API/worker images are not ready, the configured operator-runner image is missing, the deployed worker GPU capacity endpoint cannot be verified, the platform `gpuWorkflowPreflight` gate is missing or stale, generated fixtures are enabled, or the real fixture manifest is not usable on the shared workspace PVC. GPU capacity readiness defaults to a local `kubectl port-forward` probe against `service/droboticflow-worker`, disables local HTTP proxies for that loopback request, and expects CPU-only POC capacity unless `POC_GPU_CAPACITY_EXPECT_AVAILABLE=true` is set. Platform GPU workflow readiness resolves `API_BASE_URL` / `BASE_URL` first, otherwise reads `service/droboticflow-api-public`, and authenticates with `DROBOTICFLOW_API_TOKEN` or the token in `droboticflow-auth-secret`; run `npm run acceptance:poc-gpu-workflow` before final CPU-only readiness, or `POC_GPU_WORKFLOW_EXPECT_AVAILABLE=true npm run acceptance:poc-gpu-workflow` before final GPU-available readiness. Use `POC_GPU_CAPACITY_PROBE_MODE=pod` only when port-forward is unavailable and a short-lived in-cluster Pod probe is acceptable. Its default manifest path is `${WORKSPACE_MOUNT_PATH:-/workspace}/fixtures/poc-operator-acceptance/poc-operator-acceptance.json`, and every manifest or fixture path must stay under the same `WORKSPACE_MOUNT_PATH` used by the deployed Pods. Manifest readiness means the JSON is parseable, declares `xplatform`, `csv`, `json`, `lerobot`, `rosbag`, `model`, and `shellCommand`, and every declared fixture path is readable with the expected file or directory type from the deployed Pod. `POC_ACCEPTANCE_ALLOW_GENERATED_FIXTURES=true` is diagnostic-only and blocks strict POC readiness instead of producing a `ready` result. The gate decodes secret keys only to check that required values are non-empty and never prints token, cookie, password, AK, SK, or kubeconfig data. A `ready` result is only a precondition for final acceptance; the strict pass signal still comes from `npm run acceptance:poc-operators` returning `fullExternalAcceptance=true`. For the final no-mock POC gate, prefer the strict orchestrator: @@ -231,7 +231,7 @@ For the final no-mock POC gate, prefer the strict orchestrator: DEPLOY_ENV=poc npm run acceptance:poc-strict ``` -`acceptance:poc-strict` refuses dependency-isolation scopes by requiring `POC_ACCEPTANCE_REQUIRED_EXTERNALS` to include `bos,dcloud,mongo`. It runs `acceptance:poc-readiness`, probes the two D-Cloud FAT contracts from `droboticflow-dcloud-secret`, and only then launches `acceptance:poc-operators`. Readiness or D-Cloud probe failures emit a standard `DROBOTICFLOW_POC_OPERATOR_ACCEPTANCE=` preflight-failure result and stop before the Kubernetes acceptance Job is created; the D-Cloud probe reports status, response shape, configured-header booleans, and redacted diagnostic fields such as upstream status/message/location, never secret values or business payloads. With `POC_ACCEPTANCE_IMPORT_RESULT=true`, POC strict acceptance imports those blocked preflights into the `POC 算子验收` platform history exactly like Job results; it uses `POC_ACCEPTANCE_IMPORT_API_BASE_URL`, `API_BASE_URL`, or `BASE_URL` when provided, otherwise it discovers the `droboticflow-api-public` LoadBalancer URL and loads `DROBOTICFLOW_API_TOKEN` from `droboticflow-auth-secret`. Use narrower `POC_ACCEPTANCE_REQUIRED_EXTERNALS` only when intentionally running `acceptance:poc-operators` as dependency-isolation diagnostics, not as final strict evidence. +`acceptance:poc-strict` refuses dependency-isolation scopes by requiring `POC_ACCEPTANCE_REQUIRED_EXTERNALS` to include `bos,mongo`. It runs `acceptance:poc-readiness` and only then launches `acceptance:poc-operators`. Readiness failures emit a standard `DROBOTICFLOW_POC_OPERATOR_ACCEPTANCE=` preflight-failure result and stop before the Kubernetes acceptance Job is created. With `POC_ACCEPTANCE_IMPORT_RESULT=true`, POC strict acceptance imports those blocked preflights into the `POC 算子验收` platform history exactly like Job results; it uses `POC_ACCEPTANCE_IMPORT_API_BASE_URL`, `API_BASE_URL`, or `BASE_URL` when provided, otherwise it discovers the `droboticflow-api-public` LoadBalancer URL and loads `DROBOTICFLOW_API_TOKEN` from `droboticflow-auth-secret`. Use narrower `POC_ACCEPTANCE_REQUIRED_EXTERNALS` only when intentionally running `acceptance:poc-operators` as dependency-isolation diagnostics, not as final strict evidence. `scripts/poc-operator-full-acceptance.sh` loads the `poc` deployment environment on `dev`, reads the current `OPERATOR_RUNNER_IMAGE`, workspace PVC, Mongo secret, and BOS workspace secret references from Kubernetes, mounts `scripts/poc_operator_full_acceptance_job.py` into a temporary Job, and prints one `DROBOTICFLOW_POC_OPERATOR_ACCEPTANCE=` result. The Job executes builtin modules from the deployed runner image and writes evidence under `/workspace/acceptance//`; `` is set from `POC_OPERATOR_ACCEPTANCE_JOB_NAME` so the raw result, Kubernetes Job, imported platform run source, and workspace evidence directory stay traceable to the same acceptance execution. If the PVC is misconfigured and the runner cannot write there, the run fails by default instead of silently accepting temporary evidence. Set `POC_ACCEPTANCE_ALLOW_TMP_FALLBACK=true` only for diagnostic runs that intentionally write to `/tmp/droboticflow-acceptance//` and report `workspaceFallbackReason`. @@ -277,9 +277,9 @@ Final POC operator acceptance requires real input fixtures that already exist in The legacy explicit variables remain supported and take precedence over the manifest: `POC_ACCEPTANCE_XPLATFORM_SOURCE_PATH`, `POC_ACCEPTANCE_CSV_INPUT_PATH`, `POC_ACCEPTANCE_JSON_INPUT_PATH`, `POC_ACCEPTANCE_LEROBOT_SOURCE_PATH`, `POC_ACCEPTANCE_ROSBAG_SOURCE_PATH`, `POC_ACCEPTANCE_MODEL_JSON_PATH`, and `POC_ACCEPTANCE_SHELL_COMMAND`. The script fails by default when any required real fixture path is missing or unreadable. `POC_ACCEPTANCE_ALLOW_GENERATED_FIXTURES=true` exists only for explicitly labeled diagnostics; generated video, CSV, JSON, LeRobot, ROSBag, model, or shell-command fixtures are not valid final POC acceptance evidence. Tune real fixture semantics with either the manifest fields above or the equivalent environment variables: `POC_ACCEPTANCE_JSON_FILTER_FIELD`, `POC_ACCEPTANCE_JSON_FILTER_EXPECTED`, `POC_ACCEPTANCE_JSON_EXTRACT_FIELD`, `POC_ACCEPTANCE_JSON_FIELD_MAP_JSON`, `POC_ACCEPTANCE_TEMPLATE_TEXT`, `POC_ACCEPTANCE_MIN_CLARITY`, `POC_ACCEPTANCE_MAX_SHAKE`, `POC_ACCEPTANCE_MAX_HAND_OCCLUSION`, `POC_ACCEPTANCE_CLARITY_SCALE`, `POC_ACCEPTANCE_XPLATFORM_DATE_START`, `POC_ACCEPTANCE_XPLATFORM_DATE_END`, `POC_ACCEPTANCE_XPLATFORM_PLACE`, `POC_ACCEPTANCE_XPLATFORM_TYPE`, `POC_ACCEPTANCE_SEGMENT_DURATION_SECONDS`, `POC_ACCEPTANCE_FRAME_INTERVAL_SECONDS`, and `POC_ACCEPTANCE_AUDIT_RULES_JSON`. -By default `POC_ACCEPTANCE_REQUIRED_EXTERNALS=bos,dcloud,mongo`, so missing `BOS_ENDPOINT`, BOS bucket/AK/SK, `MONGO_URI`, or accepted D-Cloud FAT responses is reported as an acceptance failure instead of being treated as a pass. The POC preset supplies the current Beijing BOS endpoint; override it with `POC_ACCEPTANCE_BOS_ENDPOINT` only when validating a different bucket region. When `dcloud` is required, the wrapper checks that `POC_ACCEPTANCE_DCLOUD_SECRET_NAME` exists and contains `DCLOUD_FAT_BASE_URL`, a usable auth path, `DCLOUD_ORG_SYMBOL`, and `DCLOUD_SOURCEAPP` before creating the Kubernetes Job; missing or incomplete D-Cloud context fails fast without printing secret values. For dependency isolation runs, explicitly narrow that list, for example `POC_ACCEPTANCE_REQUIRED_EXTERNALS=mongo npm run acceptance:poc-operators`; such a run is useful diagnostics, but it is not full external acceptance evidence. Use `POC_ACCEPTANCE_BOS_BUCKET` when the cluster defaults do not expose the bucket name. D-Cloud FAT context is read from `POC_ACCEPTANCE_DCLOUD_SECRET_NAME` (default `droboticflow-dcloud-secret`): provide `DCLOUD_FAT_BASE_URL`, plus one auth path: `DCLOUD_FAT_AUTH_TOKEN` or `DCLOUD_API_TOKEN`, `DCLOUD_FAT_COOKIE` or `DCLOUD_COOKIE`, `DCLOUD_FAT_USERNAME`/`DCLOUD_FAT_PASSWORD` with optional `DCLOUD_FAT_SIGNIN_URL`/`DCLOUD_FAT_SIGNIN_ENDPOINT`, or direct service headers through `DCLOUD_D_USER_ID`/`D_USER_ID`; also provide `DCLOUD_ORG_SYMBOL` and `DCLOUD_SOURCEAPP`. Do not pass tokens, cookies, passwords, d-user-id values, or other secret values through dry-run output. +By default `POC_ACCEPTANCE_REQUIRED_EXTERNALS=bos,mongo`, so missing `BOS_ENDPOINT`, BOS bucket/AK/SK, or `MONGO_URI` is reported as an acceptance failure instead of being treated as a pass. The POC preset supplies the current Beijing BOS endpoint; override it with `POC_ACCEPTANCE_BOS_ENDPOINT` only when validating a different bucket region. For dependency isolation runs, explicitly narrow that list, for example `POC_ACCEPTANCE_REQUIRED_EXTERNALS=mongo npm run acceptance:poc-operators`; such a run is useful diagnostics, but it is not full external acceptance evidence. Use `POC_ACCEPTANCE_BOS_BUCKET` when the cluster defaults do not expose the bucket name. D-Cloud FAT operators were removed from the builtin catalog; historical D-Cloud result artifacts may still render in Monitoring, but current strict POC evidence is based on BOS, Mongo, real fixtures, operator coverage, and repository policy. -The result JSON exposes `acceptanceScope`, `fullExternalAcceptance`, `fixtureSources`, `generatedFixtureCount`, `realFixtureCount`, `allFixturesReal`, `operatorPassedCount`, `coveredOperatorCount`, `allOperatorCoverageComplete`, `blockingOperatorCoverageComplete`, `externalVerificationPassed`, `externalVerificationMissing`, `externalVerificationPassedCount`, `externalVerificationRequiredCount`, `operatorRepositoryCount`, `operatorRepositoryRequiredCount`, `operatorRepositoryCoverageComplete`, `operatorRepositoryPolicyClean`, `operatorRepositoryPolicyViolations`, `statusCounts`, and skipped-count fields. The Job sets `fullExternalAcceptance=true` only when the same strict evidence set is already present in the raw result: scope is `full`, required externals include `bos,dcloud,mongo`, every required external system is verified, every operator is covered and passed, every builtin operator has a matching local repository manifest, repository policy violations are empty, no failed/required-skipped/missing-coverage entries exist, `allFixturesReal=true`, `generatedFixtureCount=0`, and `realFixtureCount>0`. Treat `fullExternalAcceptance=true` plus `status=passed` as the strict full-acceptance signal; any `dependency-isolation` result can prove the configured dependencies but not the omitted external operators. External verification is counted by system: BOS requires both real upload and BOS incremental scan records, Mongo requires a write followed by an independent count/drop verification, and D-Cloud requires both FAT API operators to pass. The Monitoring summary card applies the same strict display rules. +The result JSON exposes `acceptanceScope`, `fullExternalAcceptance`, `fixtureSources`, `generatedFixtureCount`, `realFixtureCount`, `allFixturesReal`, `operatorPassedCount`, `coveredOperatorCount`, `allOperatorCoverageComplete`, `blockingOperatorCoverageComplete`, `externalVerificationPassed`, `externalVerificationMissing`, `externalVerificationPassedCount`, `externalVerificationRequiredCount`, `operatorRepositoryCount`, `operatorRepositoryRequiredCount`, `operatorRepositoryCoverageComplete`, `operatorRepositoryPolicyClean`, `operatorRepositoryPolicyViolations`, `statusCounts`, and skipped-count fields. The Job sets `fullExternalAcceptance=true` only when the same strict evidence set is already present in the raw result: scope is `full`, required externals include `bos,mongo`, every required external system is verified, every operator is covered and passed, every builtin operator has a matching local repository manifest, repository policy violations are empty, no failed/required-skipped/missing-coverage entries exist, `allFixturesReal=true`, `generatedFixtureCount=0`, and `realFixtureCount>0`. Treat `fullExternalAcceptance=true` plus `status=passed` as the strict full-acceptance signal; any `dependency-isolation` result can prove the configured dependencies but not the omitted external systems. External verification is counted by system: BOS requires both real upload and BOS incremental scan records, and Mongo requires a write followed by an independent count/drop verification. The Monitoring summary card applies the same strict display rules. When the Job emits a `DROBOTICFLOW_POC_OPERATOR_ACCEPTANCE=` marker, the wrapper extracts it from the Job logs even if the Job exits failed. If `POC_ACCEPTANCE_IMPORT_API_BASE_URL`, `API_BASE_URL`, or `BASE_URL` is set, it posts that result to `/api/acceptance/poc-operator-result` and records it as a normal platform run under the `POC 算子验收` project. In session-auth POC deployments, the acceptance-import endpoint accepts either an admin/pipeline/operator session through `DROBOTICFLOW_ACCEPTANCE_EMAIL` and `DROBOTICFLOW_ACCEPTANCE_PASSWORD`, or the shared `DROBOTICFLOW_API_TOKEN` for this fixed POC-result import route only; regular business writes still require a user session. The imported run contains a `poc-operator-full-acceptance-result.json` artifact, so the Monitoring page can show the same strict-vs-dependency-isolation summary that appears in the raw Job log. Automation can read the narrowed POC gate summary with `GET /api/acceptance/poc-readiness` and `Authorization: Bearer ${DROBOTICFLOW_API_TOKEN}`; this endpoint returns only GPU, D-Cloud, strict-acceptance, fixture, coverage, and next-action evidence, while the full `/api/dashboard` remains session-only in public POC deployments. For `fullExternalAcceptance=true`, the import must also carry Kubernetes source evidence (`source.namespace`, `source.jobName`, `source.image`, and `source.imageId`); for every imported result, `result.runId` should equal `source.jobName`, any provided `source.imageId` must be a full `@sha256:<64 hex>` image digest, must identify the same repository as `source.image`, and any provided `source.image` must not contain whitespace. The Monitoring card displays these fields so a final pass is tied to the exact POC Job and operator-runner image digest that produced it. Set `POC_ACCEPTANCE_IMPORT_RESULT=false` for one-off diagnostics that should not create or update platform acceptance history. @@ -299,7 +299,7 @@ npm run acceptance:poc-import-verify -- \ `acceptance:poc-import-verify` creates a short-lived `mongo:7` Pod in the target namespace, injects `MONGO_URI` from `droboticflow-mongo-secret`, reads `MONGO_DB` from `droboticflow-config`, asserts that the imported run contains `poc-operator-full-acceptance-result.json`, checks the runner image, requires a sha256 image digest, requires Kubernetes source evidence (`namespace`, `jobName`, `image`, and `imageId`), requires real fixture evidence by default (`allFixturesReal=true`, `generatedFixtureCount=0`, positive `realFixtureCount`, absolute fixture paths, and no generated fixture sources), verifies every `--expected-external` system is in `externalVerificationPassed`, enforces clean repository-policy evidence, and optionally checks `human_review` task evidence. It deletes the probe Pod by default and prints only the bounded verification summary, never the Mongo URI or secret values. `--result-file ` can be used instead of `--run-id`; the script derives the platform run id from the raw `DROBOTICFLOW_POC_OPERATOR_ACCEPTANCE=` marker. -If strict acceptance cannot even create the Kubernetes Job because required readiness inputs are missing, the wrapper still emits a standard failed `DROBOTICFLOW_POC_OPERATOR_ACCEPTANCE=` preflight result. It evaluates D-Cloud FAT secret readiness and real fixture readiness in the same pass instead of stopping at the first locally detectable blocker. A single blocker keeps its specific `preflightStage` such as `dcloud-secret-readiness` or `fixture-readiness`; multiple blockers use `preflightStage=preflight-readiness`, list each specific stage in `preflightStages`, and include one failed `records` entry per blocker. If fixture readiness passed while another preflight blocker failed, the result still carries the passed real-fixture evidence as `fixtureSources`, `realFixtureCount`, `generatedFixtureCount`, and `allFixturesReal`, so the platform does not lose positive fixture readiness evidence just because D-Cloud or another external gate is blocked. Fixture-readiness failures also include a bounded `fixtureDiscovery` evidence summary from the deployed API Pod's shared workspace mount: scanned roots, missing fixture categories, selected paths if any, candidate counts, and next actions. The preflight result also includes the static builtin-operator repository evidence fields (`static`, `operatorRepositoryCount`, `operatorRepositoryRequiredCount`, `operatorRepositoryCoverageComplete`, `operatorRepositoryPolicyClean`, and `operatorRepositoryPolicyViolations`) so a blocked platform run still proves whether local independent operator repositories and no-mock/no-simulation/no-hardcoded policy metadata are complete. When platform import is enabled, the failure is imported as a failed POC acceptance run with `preflightFailure=true`, `acceptanceScope=full`, `fullExternalAcceptance=false`, and blocking coverage derived from the affected repository manifests. This keeps the platform history honest: missing D-Cloud credentials and missing real fixture contracts are visible together instead of being hidden behind the first failing dependency. +If strict acceptance cannot even create the Kubernetes Job because required readiness inputs are missing, the wrapper still emits a standard failed `DROBOTICFLOW_POC_OPERATOR_ACCEPTANCE=` preflight result. A single blocker keeps its specific `preflightStage` such as `fixture-readiness`; multiple blockers use `preflightStage=preflight-readiness`, list each specific stage in `preflightStages`, and include one failed `records` entry per blocker. Fixture-readiness failures also include a bounded `fixtureDiscovery` evidence summary from the deployed API Pod's shared workspace mount: scanned roots, missing fixture categories, selected paths if any, candidate counts, and next actions. The preflight result also includes the static builtin-operator repository evidence fields (`static`, `operatorRepositoryCount`, `operatorRepositoryRequiredCount`, `operatorRepositoryCoverageComplete`, `operatorRepositoryPolicyClean`, and `operatorRepositoryPolicyViolations`) so a blocked platform run still proves whether local independent operator repositories and no-mock/no-simulation/no-hardcoded policy metadata are complete. When platform import is enabled, the failure is imported as a failed POC acceptance run with `preflightFailure=true`, `acceptanceScope=full`, `fullExternalAcceptance=false`, and blocking coverage derived from the affected repository manifests. This keeps the platform history honest: missing real fixture contracts are visible before a Job is created. Verify an imported strict preflight blocker with the same Mongo probe by naming the expected stage. This switches the verifier to failed-run semantics and checks `preflightFailure`, `preflightStages`, failed preflight records, blocking coverage, and failure messages instead of requiring passed-run fixture/image-digest evidence: @@ -309,12 +309,12 @@ KUBECONFIG=/Users/d-robotics/.config/droboticflow/kubeconfigs/poc.config \ npm run acceptance:poc-import-verify -- \ --run-id "run-poc-operator-acceptance-" \ --expected-scope full \ - --expected-preflight-stage dcloud-secret-readiness + --expected-preflight-stage fixture-readiness ``` Generated fixtures are disabled by default, so the wrapper refuses to create the Job when no real fixture contract is configured. Provide either `POC_ACCEPTANCE_FIXTURE_MANIFEST_PATH` or all explicit real fixture inputs, including `POC_ACCEPTANCE_XPLATFORM_SOURCE_PATH`, `POC_ACCEPTANCE_CSV_INPUT_PATH`, `POC_ACCEPTANCE_JSON_INPUT_PATH`, `POC_ACCEPTANCE_LEROBOT_SOURCE_PATH`, `POC_ACCEPTANCE_ROSBAG_SOURCE_PATH`, `POC_ACCEPTANCE_MODEL_JSON_PATH`, and `POC_ACCEPTANCE_SHELL_COMMAND`. Manifest and explicit fixture paths must point under `WORKSPACE_MOUNT_PATH`; before creating the acceptance Job, the wrapper verifies those files or directories through the deployed API Pod's shared workspace PVC mount. Missing, unreadable, empty file, or off-workspace fixture paths are imported with `fixture-readiness` coverage for the full builtin operator set, so the platform history distinguishes missing external credentials from missing real acceptance data without launching a Job that can only fail later. -The import endpoint validates full-acceptance consistency before it creates or updates a platform run. A payload with `fullExternalAcceptance=true` must also have `status=passed`, `acceptanceScope=full`, `requiredExternals` containing `bos,dcloud,mongo`, `externalVerificationPassed` containing all three systems, empty `externalVerificationMissing`, `externalVerificationPassedCount>=3`, complete operator coverage, zero failed or required-skipped operators, empty missing-coverage lists, `allFixturesReal=true`, `generatedFixtureCount=0`, `realFixtureCount>0`, structured `fixtureSources.items` covering `csv`, `json`, `lerobot`, `model`, `rosbag`, and `xplatform` with absolute fixture paths and `generated=false` for every item, fixture counts that match the `fixtureSources.items` evidence, `static.operatorFileCount>0`, `static.repositoryManifestCount==static.operatorFileCount`, empty static manifest/duplicate/legacy/helper/hardcoded-source violation lists, `operatorRepositoryCoverageComplete=true`, and `operatorRepositoryPolicyClean=true`. Dependency-isolation evidence can still be imported, but it cannot be mislabeled as full external acceptance. +The import endpoint validates full-acceptance consistency before it creates or updates a platform run. A payload with `fullExternalAcceptance=true` must also have `status=passed`, `acceptanceScope=full`, `requiredExternals` containing `bos,mongo`, `externalVerificationPassed` containing both systems, empty `externalVerificationMissing`, `externalVerificationPassedCount>=2`, complete operator coverage, zero failed or required-skipped operators, empty missing-coverage lists, `allFixturesReal=true`, `generatedFixtureCount=0`, `realFixtureCount>0`, structured `fixtureSources.items` covering `csv`, `json`, `lerobot`, `model`, `rosbag`, and `xplatform` with absolute fixture paths and `generated=false` for every item, fixture counts that match the `fixtureSources.items` evidence, `static.operatorFileCount>0`, `static.repositoryManifestCount==static.operatorFileCount`, empty static manifest/duplicate/legacy/helper/hardcoded-source violation lists, `operatorRepositoryCoverageComplete=true`, and `operatorRepositoryPolicyClean=true`. Dependency-isolation evidence can still be imported, but it cannot be mislabeled as full external acceptance. Configure or refresh the POC real fixture manifest from local fixture files and directories: @@ -347,7 +347,7 @@ npm run acceptance:poc-fixtures `acceptance:poc-fixtures` copies only caller-provided non-empty local files/directories, or validates existing paths under `${WORKSPACE_MOUNT_PATH:-/workspace}` when those are already present on the shared PVC. It writes the manifest to `${WORKSPACE_MOUNT_PATH:-/workspace}/fixtures/poc-operator-acceptance/poc-operator-acceptance.json` by default and prints the corresponding `POC_ACCEPTANCE_FIXTURE_MANIFEST_PATH` export line. It does not create mock, simulated, generated, or hardcoded acceptance data; dry-run mode (`POC_ACCEPTANCE_FIXTURE_DRY_RUN=true`) validates local inputs and prints the resolved workspace paths without touching Kubernetes. -Configure or refresh the POC D-Cloud FAT secret from the current shell environment: +The historical D-Cloud FAT secret helper is retained only for old deployments that still run external D-Cloud operators. The current builtin catalog does not register those operators, and strict POC acceptance does not require this secret: ```bash DCLOUD_FAT_USERNAME=... \ @@ -359,9 +359,9 @@ DCLOUD_SOURCEAPP=... \ scripts/configure-poc-dcloud-secret.sh ``` -The script also accepts `DCLOUD_FAT_AUTH_TOKEN`/`DCLOUD_API_TOKEN` or `DCLOUD_FAT_COOKIE`/`DCLOUD_COOKIE` instead of username/password. When username/password auth is used, set `DCLOUD_FAT_SIGNIN_URL` for SSO-hosted FAT login endpoints such as `https://sso-fat.d-robotics.cc/api/signin`; otherwise the runtime falls back to `${DCLOUD_FAT_BASE_URL}/${DCLOUD_FAT_SIGNIN_ENDPOINT:-/api/signin}`. JWT-style auth tokens are decoded locally and rejected when the `exp` claim is missing, invalid, or already expired; refresh the token or use cookie / username-password auth before treating POC full acceptance as final evidence. `DCLOUD_FAT_BASE_URL` is required and is stored in the Kubernetes secret; D-Cloud operators and POC full acceptance do not fall back to a hardcoded FAT domain. The script writes canonical secret keys through `kubectl apply -f -` without placing secret values in kubectl command-line arguments. Use `POC_DCLOUD_SECRET_DRY_RUN=true scripts/configure-poc-dcloud-secret.sh` to validate the configured key set without printing values or touching the cluster. +The script also accepts `DCLOUD_FAT_AUTH_TOKEN`/`DCLOUD_API_TOKEN` or `DCLOUD_FAT_COOKIE`/`DCLOUD_COOKIE` instead of username/password. When username/password auth is used, set `DCLOUD_FAT_SIGNIN_URL` for SSO-hosted FAT login endpoints such as `https://sso-fat.d-robotics.cc/api/signin`; otherwise the runtime falls back to `${DCLOUD_FAT_BASE_URL}/${DCLOUD_FAT_SIGNIN_ENDPOINT:-/api/signin}`. JWT-style auth tokens are decoded locally and rejected when the `exp` claim is missing, invalid, or already expired. The script writes canonical secret keys through `kubectl apply -f -` without placing secret values in kubectl command-line arguments. Use `POC_DCLOUD_SECRET_DRY_RUN=true scripts/configure-poc-dcloud-secret.sh` to validate the configured key set without printing values or touching the cluster. -Every builtin operator directory also carries a local repository manifest at `backend/operators/builtin//repository.json`. Regenerate the manifests with `npm run operators:manifests` after catalog or runtime metadata changes, and enforce drift checks with `npm run operators:manifests:check`. Each manifest records the operator entrypoint, runtime dependencies, strict POC external requirements, optional external API source/route metadata, and the no-mock/no-simulation/no-hardcoded-output acceptance policy. The POC acceptance Job promotes this static check into top-level `operatorRepository*` evidence fields, and the platform import gate refuses a `fullExternalAcceptance=true` payload when repository coverage is incomplete or policy violations are present. D-Cloud source repos, route roots, and POC acceptance probe paths live in the D-Cloud operators' `operator.json` / `repository.json` metadata, while the FAT base URL is runtime configuration from `DCLOUD_FAT_BASE_URL`. A strict full POC acceptance run must include `bos,dcloud,mongo`; runs that omit `dcloud` cannot be used as final evidence for the two D-Cloud FAT API operators. +Every builtin operator directory also carries a local repository manifest at `backend/operators/builtin//repository.json`. Regenerate the manifests with `npm run operators:manifests` after catalog or runtime metadata changes, and enforce drift checks with `npm run operators:manifests:check`. Each manifest records the operator entrypoint, runtime dependencies, strict POC external requirements, optional external API source/route metadata, and the no-mock/no-simulation/no-hardcoded-output acceptance policy. The POC acceptance Job promotes this static check into top-level `operatorRepository*` evidence fields, and the platform import gate refuses a `fullExternalAcceptance=true` payload when repository coverage is incomplete or policy violations are present. A strict full POC acceptance run must include `bos,mongo`; D-Cloud FAT API operators are intentionally absent from the current builtin catalog. The POC static operator-layout check derives the builtin operator count from the deployed runner image's `backend/operators/builtin/*/operator.json` files. It fails when no builtin metadata exists, when any operator lacks `repository.json`, when repository manifests do not match their paired metadata, or when builtin operator IDs/names are duplicated. Do not add fixed operator-count assertions to the acceptance Job; adding or removing a real builtin operator should update the catalog, metadata, generated repository manifest, docs, and tests together. diff --git a/docs/poc-current-status.md b/docs/poc-current-status.md index afb1ce08..93c5e34e 100644 --- a/docs/poc-current-status.md +++ b/docs/poc-current-status.md @@ -6,8 +6,8 @@ Last checked: 2026-06-26 Asia/Shanghai. - Namespace: `droboticflow` - Public API: `http://120.48.164.19` -- API deployment: `1/1`, image `ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-api:60fc78d-poc-20260626002716` -- Worker deployment: `1/1`, image `ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-worker:60fc78d-poc-20260626002716` +- API deployment: `1/1`, image `ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-api:fc420be-poc-20260626220856` +- Worker deployment: `1/1`, image `ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-worker:fc420be-poc-20260626220856` - API health: `{"service":"droboticflow-api","status":"ok"}` ## Artifact Preview Streaming @@ -25,30 +25,40 @@ Content-Type: video/mp4 ## GPU Status -POC currently has no allocatable GPU resources. +POC now has one schedulable GPU node with allocatable `nvidia.com/gpu=8`. Checked nodes: ```text -192.168.80.249 gpu={} -192.168.81.47 gpu={} +192.168.80.136 nvidia.com/gpu=8 128 CPU / 1024 GiB / A800 +192.168.80.249 nvidia.com/gpu=0 +192.168.81.47 nvidia.com/gpu=0 ``` -`npm run acceptance:gpu` against the POC kubeconfig exits before creating a Job: +Direct runtime acceptance on 2026-06-26 created a temporary Pod on `192.168.80.136` with `limits.nvidia.com/gpu=1` and ran `nvidia-smi` successfully: ```text -GPU readiness unavailable: no node reports allocatable nvidia.com/gpu>=1 -Checked nodes: - - 192.168.80.249 nvidia.com/gpu=0 - - 192.168.81.47 nvidia.com/gpu=0 -ERROR: no Kubernetes node reports allocatable nvidia.com/gpu >= 1 +NVIDIA-SMI 570.195.03 Driver Version: 570.195.03 CUDA Version: 12.8 +0, NVIDIA A800-SXM4-80GB, 570.195.03, 81920 MiB ``` -`npm run acceptance:poc-gpu-capacity` covers the deployed worker capacity endpoint without a POC user session. It starts a temporary Pod in the POC namespace with the deployed operator-runner image, reads `http://droboticflow-worker:3002/worker-api/capacity`, and currently expects `gpu.available=false` plus zero schedulable GPU because POC has no GPU nodes. +`POC_GPU_CAPACITY_EXPECT_AVAILABLE=true npm run acceptance:poc-gpu-capacity` covers the deployed worker capacity endpoint without a POC user session. It starts a temporary Pod in the POC namespace with the deployed operator-runner image, reads `http://droboticflow-worker:3002/worker-api/capacity`, and passed with: -`npm run acceptance:poc-gpu-workflow` now covers the workflow-level GPU preflight path. With `DROBOTICFLOW_ACCEPTANCE_EMAIL` and `DROBOTICFLOW_ACCEPTANCE_PASSWORD`, it exercises normal POC project/workflow writes. Without those credentials, it uses `DROBOTICFLOW_API_TOKEN` from the environment or `droboticflow-auth-secret` only against the bounded `/api/acceptance/poc-gpu-workflow` route, then port-forwards the deployed worker and triggers a real `process-once`. The expected POC result while no GPU nodes exist is a real run failure containing `gpu request cannot be scheduled`. The latest proof is also available from `/api/acceptance/poc-readiness` as `gpuWorkflowPreflight`, separate from the hardware `gpu` gate. +```text +gpu.available=true resource=nvidia.com/gpu schedulableAllocatable=8 maxAllocatable=8 nodes=3 +node 192.168.80.136 nvidia.com/gpu=8 selectorMatched=true +``` -Therefore GPU support is wired at the platform level, but POC GPU runtime acceptance is not complete until a GPU node pool with the NVIDIA device plugin/runtime is available and `npm run acceptance:gpu` plus a GPU operator workflow both pass. +`POC_GPU_WORKFLOW_EXPECT_AVAILABLE=true npm run acceptance:poc-gpu-workflow` covers the workflow-level GPU path after hardware is available. With `DROBOTICFLOW_ACCEPTANCE_EMAIL` and `DROBOTICFLOW_ACCEPTANCE_PASSWORD`, it exercises normal POC project/workflow writes. Without those credentials, it uses `DROBOTICFLOW_API_TOKEN` from the environment or `droboticflow-auth-secret` only against the bounded `/api/acceptance/poc-gpu-workflow` route, then port-forwards the deployed worker and triggers a real `process-once`. With GPU expected, the run must complete and produce artifacts; without GPU expected, the same script still verifies the real `gpu request cannot be scheduled` failure path. + +Latest GPU workflow acceptance run: + +```text +runId=run-008e6c48e55dfea3d645722247119ea0 +status=completed +artifacts=9 +lastLog="Produced 5 artifact(s)" +``` ## Artifact Lineage Audit @@ -68,31 +78,20 @@ downstream slice DJI_20260318112834_0001_D_clip001.mp4 -> annotate in-1 ## Strict POC Acceptance -`npm run acceptance:poc-readiness` currently reports: +`npm run acceptance:poc-readiness` currently expects: - `deployment:droboticflow-api`: passed - `deployment:droboticflow-worker`: passed - `operator-runner-image`: passed -- `gpu-capacity`: passed, CPU-only POC capacity expected (`gpu.available=false`, two checked nodes) -- `platform-gpu-workflow-preflight`: passed after `npm run acceptance:poc-gpu-workflow` records the real no-GPU workflow failure in platform readiness +- `gpu-capacity`: passed when run with `POC_GPU_CAPACITY_EXPECT_AVAILABLE=true` (`gpu.available=true`, `maxAllocatable=8`) +- `platform-gpu-workflow-preflight`: passed, latest run `run-008e6c48e55dfea3d645722247119ea0` completed - `fixture-manifest`: passed -- `dcloud-secret`: failed, missing `droboticflow/droboticflow-dcloud-secret` -`npm run acceptance:poc-strict` fails in preflight with: +`npm run acceptance:poc-strict` now uses `POC_ACCEPTANCE_REQUIRED_EXTERNALS=bos,mongo` by default. D-Cloud FAT API operators have been removed from the builtin catalog, so missing `droboticflow-dcloud-secret` is no longer a strict POC blocker. -- `preflightStage`: `dcloud-secret-readiness` -- `failures`: `D-Cloud FAT secret droboticflow/droboticflow-dcloud-secret is missing` -- `operatorRepositoryCoverageComplete`: `true` -- `operatorRepositoryPolicyClean`: `true` -- `operatorRepositoryCount`: `87` -- `missingCoverage`: `dcloud_data_generation`, `dcloud_embodied_annotation` -- `externalVerificationMissing`: `bos`, `dcloud`, `mongo` - -This means the deployed platform and static operator repository policy are ready, but full external POC acceptance is blocked until real D-Cloud FAT credentials are configured and the strict run can exercise BOS, D-Cloud, and Mongo together. +If strict acceptance fails before creating the Job, the expected blocker is now `fixture-readiness` or a BOS/Mongo readiness issue. A final pass still requires real fixtures, real BOS evidence, real Mongo evidence, complete operator coverage, and clean repository policy evidence. ## Next Acceptance Gates -- Configure `droboticflow-dcloud-secret` with real D-Cloud FAT credentials, then rerun `npm run acceptance:poc-readiness` and `npm run acceptance:poc-strict`. -- Run GPU acceptance on a GPU-capable cluster or after adding GPU nodes to POC. -- Run a GPU-backed operator workflow when GPU hardware is available. +- Run `POC_GPU_WORKFLOW_EXPECT_AVAILABLE=true npm run acceptance:poc-gpu-workflow` and then `POC_GPU_CAPACITY_EXPECT_AVAILABLE=true npm run acceptance:poc-readiness`. - Continue video semantic processing validation with real detection/tracking operators rather than heuristic motion-only annotations. diff --git a/internal/api/poc_operator_workflow_acceptance.go b/internal/api/poc_operator_workflow_acceptance.go index da5b6422..a92c4455 100644 --- a/internal/api/poc_operator_workflow_acceptance.go +++ b/internal/api/poc_operator_workflow_acceptance.go @@ -638,6 +638,12 @@ func buildPocOperatorWorkflowEdges(batchName string, operators []domain.Operator add("builtin_shell_command", "builtin_mongodb_write") return edges } + if batchName == "data-io-core" { + add("builtin_vla_model_train", "builtin_sim3d_asset_generate") + add("builtin_vla_model_train", "builtin_vla_model_inference") + add("builtin_vla_model_inference", "builtin_vla_model_evaluate") + return edges + } if batchName != "video-data-platform" { return []domain.WorkflowEdge{} } diff --git a/internal/api/poc_operator_workflow_acceptance_test.go b/internal/api/poc_operator_workflow_acceptance_test.go index c5eed72b..34ff80c6 100644 --- a/internal/api/poc_operator_workflow_acceptance_test.go +++ b/internal/api/poc_operator_workflow_acceptance_test.go @@ -100,6 +100,30 @@ func TestBuildPocOperatorWorkflowEdgesConnectsShellToMongo(t *testing.T) { } } +func TestBuildPocOperatorWorkflowEdgesConnectsVLADataFlow(t *testing.T) { + operators := []domain.OperatorRecord{ + {ID: "operator-builtin-vla-model-evaluate", Name: "VLA 模型评测", Type: "builtin"}, + {ID: "operator-builtin-vla-model-inference", Name: "VLA 模型推理", Type: "builtin"}, + {ID: "operator-builtin-vla-model-train", Name: "VLA 模型训练", Type: "builtin"}, + {ID: "operator-builtin-sim3d-asset-generate", Name: "3D 资产仿真生成", Type: "builtin"}, + } + + edges := buildPocOperatorWorkflowEdges("data-io-core", operators) + want := []domain.WorkflowEdge{ + pocOperatorWorkflowEdge("op-vla-model-train", "op-sim3d-asset-generate"), + pocOperatorWorkflowEdge("op-vla-model-train", "op-vla-model-inference"), + pocOperatorWorkflowEdge("op-vla-model-inference", "op-vla-model-evaluate"), + } + if len(edges) != len(want) { + t.Fatalf("edges length = %d, want %d: %#v", len(edges), len(want), edges) + } + for index := range want { + if edges[index] != want[index] { + t.Fatalf("edge[%d] = %#v, want %#v", index, edges[index], want[index]) + } + } +} + func TestBuildPocOperatorWorkflowEdgesConnectsVideoPipelineCatalogIDs(t *testing.T) { if got := pocOperatorHandlerKey(domain.OperatorRecord{ID: "operator-builtin-xplatform-dataset-index", Name: "X 平台数据集索引", Type: "builtin"}); got != "builtin_xplatform_index" { t.Fatalf("xplatform index handler = %q", got) diff --git a/src/components/ArtifactPreviewPanel.tsx b/src/components/ArtifactPreviewPanel.tsx index b644dbb3..49efc94a 100644 --- a/src/components/ArtifactPreviewPanel.tsx +++ b/src/components/ArtifactPreviewPanel.tsx @@ -106,8 +106,20 @@ function ArtifactActions({ item }: { item: ExecutionData }) { ); } -function TextContentPreview({ item, previewURL, inlineText }: { item: ExecutionData; previewURL: string; inlineText?: string }) { - const [state, setState] = useState<{ status: "idle" | "loading" | "ready" | "error"; text: string; truncated: boolean }>({ +function TextContentPreview({ + item, + previewURL, + inlineText, +}: { + item: ExecutionData; + previewURL: string; + inlineText?: string; +}) { + const [state, setState] = useState<{ + status: "idle" | "loading" | "ready" | "error"; + text: string; + truncated: boolean; + }>({ status: inlineText ? "ready" : "idle", text: inlineText || "", truncated: false, @@ -161,13 +173,17 @@ function TextContentPreview({ item, previewURL, inlineText }: { item: ExecutionD {state.status === "loading" ? (
正在加载预览...
) : state.status === "error" ? ( -
预览加载失败:{state.text}
+
+ 预览加载失败:{state.text} +
) : ( <>
             {state.text || "暂无可展示文本内容"}
           
- {state.truncated ?
仅展示文件开头 256 KiB,完整内容请下载或打开原文件。
: null} + {state.truncated ? ( +
仅展示文件开头 256 KiB,完整内容请下载或打开原文件。
+ ) : null} )} @@ -316,11 +332,23 @@ export function ArtifactPreviewPanel({ item }: { item: ExecutionData | null }) { } if (preview.kind === "table") { - return ; + return ( + + ); } if (preview.kind === "text") { - return ; + return ( + + ); } if (preview.kind === "json" || item.type === "json") { diff --git a/src/pages/Dashboard.tsx b/src/pages/Dashboard.tsx index 1dffebe3..9557e149 100644 --- a/src/pages/Dashboard.tsx +++ b/src/pages/Dashboard.tsx @@ -91,7 +91,6 @@ export default function Dashboard() { - ); } diff --git a/src/pages/Monitoring.tsx b/src/pages/Monitoring.tsx index 9ae67e81..e39de2fa 100644 --- a/src/pages/Monitoring.tsx +++ b/src/pages/Monitoring.tsx @@ -1030,7 +1030,9 @@ export default function Monitoring() { )} {hasDirectArtifactURL(selectedArtifact) ? (