新增 release artifact URL workflow SDK gate

This commit is contained in:
2026-06-16 14:29:55 +08:00
parent bee05005b5
commit b7ec759645
9 changed files with 184 additions and 3 deletions

View File

@@ -9,7 +9,7 @@ turn-by-turn continuation notes and next-batch execution records.
## Current Status ## Current Status
- Active continuation file: `text14.txt` - Active continuation file: `text14.txt`
- Latest completed batch: project release readiness artifact URL workflow summary view-model SDK API - Latest completed batch: project release artifact URL workflow SDK gate
- Latest relevant commit: use `git log -1 --oneline` after each committed batch - Latest relevant commit: use `git log -1 --oneline` after each committed batch
- Working tree at tracker creation: clean - Working tree at tracker creation: clean
- Required policy: LinuxCNC remains the only CNC semantic source - Required policy: LinuxCNC remains the only CNC semantic source
@@ -43,12 +43,12 @@ The project is complete for the current scope when all of the following are true
| Native nc_files baseline | Stable | Last recorded Layer 1: `total 107`, `pass 101`, `expected_fail 6`, `unexpected_fail 0`. | | Native nc_files baseline | Stable | Last recorded Layer 1: `total 107`, `pass 101`, `expected_fail 6`, `unexpected_fail 0`. |
| Native sim configs baseline | Stable | Last recorded Layer 2: `total 159`, `pass 151`, `expected_fail 8`, `unexpected_fail 0`. | | Native sim configs baseline | Stable | Last recorded Layer 2: `total 159`, `pass 151`, `expected_fail 8`, `unexpected_fail 0`. |
| OPFS/session persistence | Stable for current scope | Browser smoke passes, SDK re-exports OPFS/session helpers including `readMachineSessionReadiness()` and `createMachineSessionPersistenceSummary()`, the UI exposes `getMachineSessionPersistenceSummary()`, and `docs/opfs-session-persistence.md` defines the project-level release gate. | | OPFS/session persistence | Stable for current scope | Browser smoke passes, SDK re-exports OPFS/session helpers including `readMachineSessionReadiness()` and `createMachineSessionPersistenceSummary()`, the UI exposes `getMachineSessionPersistenceSummary()`, and `docs/opfs-session-persistence.md` defines the project-level release gate. |
| SDK/API surface | Stable for current scope | SDK re-exports core, OPFS/session readiness/load helpers, sim-config staging, project release gate manifest/result matrix/action-plan/readiness summary view-model, project release readiness report/artifact JSON workflow/artifact URL workflow summary/artifact validation summary/action-plan plus URL loading workflow, INI panel entry/launcher/control-page/shell/workflow overview helpers, the session readiness workflow report, and the shell API surface inventory with a Node surface smoke. | | SDK/API surface | Stable for current scope | SDK re-exports core, OPFS/session readiness/load helpers, sim-config staging, project release gate manifest/result matrix/action-plan/readiness summary view-model, project release readiness report/artifact JSON workflow/artifact URL workflow summary/artifact validation summary/action-plan plus URL loading workflow, INI panel entry/launcher/control-page/shell/workflow overview helpers, the session readiness workflow report, and the shell API surface inventory with dedicated Node smokes. |
| Browser/UI workflow | Stable for current scope | Workflow overview embedding mount DOM closure is complete, and INI panel session workflows plus read-only control/shell handoff expose, render, fetch, validate, summarize, and report OPFS/session readiness, OPFS/session persistence summary, release readiness artifact validation/rendering/URL workflow summaries, and API surface inventory before loading or reading WASM session state. | | Browser/UI workflow | Stable for current scope | Workflow overview embedding mount DOM closure is complete, and INI panel session workflows plus read-only control/shell handoff expose, render, fetch, validate, summarize, and report OPFS/session readiness, OPFS/session persistence summary, release readiness artifact validation/rendering/URL workflow summaries, and API surface inventory before loading or reading WASM session state. |
| Workflow overview embedding | Stable for current scope | Report/display/render, DOM contract/readiness/renderer, mount result/display/render, mount DOM contract/readiness/renderer/wrapper exist. | | Workflow overview embedding | Stable for current scope | Report/display/render, DOM contract/readiness/renderer, mount result/display/render, mount DOM contract/readiness/renderer/wrapper exist. |
| Host/runtime boundary proof | Stable blocked state | Host smoke passes; runtime families remain blocked and `docs/host-runtime-boundary-handoff.md` records host readiness, promotion blockers, dispatch, and evidence gates. | | Host/runtime boundary proof | Stable blocked state | Host smoke passes; runtime families remain blocked and `docs/host-runtime-boundary-handoff.md` records host readiness, promotion blockers, dispatch, and evidence gates. |
| Documentation/release gate | Stable for current scope | `docs/project-release-handoff.md` links README, panel entry, SDK, OPFS/session, sim-config, host/runtime, source reuse, drift, tracker acceptance paths, and the machine-readable release readiness report/artifact. | | Documentation/release gate | Stable for current scope | `docs/project-release-handoff.md` links README, panel entry, SDK, OPFS/session, sim-config, host/runtime, source reuse, drift, tracker acceptance paths, and the machine-readable release readiness report/artifact. |
| Project release gate wrapper | Stable | `tests/host/verify_project_release_gate.sh` runs the documented minimum release validation commands including the release artifact URL browser workflow gate, writes `build/project-release-readiness.json`, verifies embedded gate manifest/result matrix/action-plan evidence through the SDK artifact validation workflow, and ends with `project_release_gate=ok`. | | Project release gate wrapper | Stable | `tests/host/verify_project_release_gate.sh` runs the documented minimum release validation commands including the release artifact URL browser workflow gate and SDK URL workflow gate, writes `build/project-release-readiness.json`, verifies embedded gate manifest/result matrix/action-plan evidence through the SDK artifact validation workflow, and ends with `project_release_gate=ok`. |
## Blocked Runtime Families ## Blocked Runtime Families

View File

@@ -3308,6 +3308,63 @@ ui_node_smokes=ok
继续只做实质能力推进。优先选择可执行 gate、SDK/API surface、或真实 browser workflow 继续只做实质能力推进。优先选择可执行 gate、SDK/API surface、或真实 browser workflow
不要做只整理断言或局部常量化的批次。 不要做只整理断言或局部常量化的批次。
五十五、2026-06-16 继续执行记录project release artifact URL workflow SDK gate
本轮继续按“每批必须产出可调用 API、可验证 workflow、可执行 gate、或真实 UI/browser 能力”推进,
把 SDK 侧 release artifact URL workflow 从 surface 测试中的局部断言提升为独立可执行 gate。外部
CI 现在可以单独运行这个 gate 验证 caller-provided fetch、ready URL workflow、summary view-model、
missing input、HTTP failure 和 thrown fetch error。
完成内容:
- 新增可执行 SDK gate
- `tests/sdk/node/verify_project_release_artifact_url_workflow.mjs`
- `tests/sdk/node/verify_project_release_artifact_url_workflow.sh`
- 新 gate 覆盖:
- fetch 收到 caller-provided artifact URL
- ready artifact URL workflow
- ready URL workflow summary view-model
- missing `artifactUrl/fetchRef`
- HTTP failure
- thrown fetch error
- blocked workflow 的 next-command action-plan
- `tests/sdk/node/verify_sdk_surface.sh` 聚合运行新 gate
- `tests/host/verify_project_release_gate.sh` 显式运行新 SDK URL workflow gate
- `runtime/sdk/README.md` 记录新 gate 命令和输出;
- `docs/project-release-handoff.md` 把新 gate 加入 release validation commands 和 expected SDK outputs
- `tests/docs/node/verify_project_release_handoff_docs.mjs` 覆盖新 gate 命令和输出;
- `PROJECT_COMPLETION_TRACKER.md` 同步 latest completed batch、SDK/API surface 和 release gate wrapper 状态;
- 未新增控制按钮;
- 未执行 opt-in runtime probes
- 未解析 G-code
- 未解释 canonical events
- 未新增 JS CNC 语义;
- 未 promotion blocked runtime family
- 未改变 LinuxCNC interpreter、tool、parameter、planner、kinematics、remap 或 LinuxCNC-owned
runtime semantics。
验证已通过(先行 targeted
```bash
wasm-port/tests/sdk/node/verify_project_release_artifact_url_workflow.sh
wasm-port/tests/sdk/node/verify_sdk_surface.sh
wasm-port/tests/docs/node/verify_project_release_handoff_docs.sh
```
关键输出:
```text
project_release_artifact_url_workflow_node_smoke=ok
sdk_surface_node_smoke=ok
project_release_gate_manifest_node_smoke=ok
project_release_handoff_docs_node_smoke=ok
```
下一步工作计划:
继续只做实质能力推进。优先选择可执行 gate、SDK/API surface、或真实 browser workflow
不要做只整理断言或局部常量化的批次。
五十四、2026-06-16 继续执行记录project release readiness artifact URL workflow summary view-model SDK API 五十四、2026-06-16 继续执行记录project release readiness artifact URL workflow summary view-model SDK API
本轮继续按“每批必须产出可调用 API、可验证 workflow、可执行 gate、或真实 UI/browser 能力”推进, 本轮继续按“每批必须产出可调用 API、可验证 workflow、可执行 gate、或真实 UI/browser 能力”推进,

View File

@@ -113,6 +113,7 @@ SKIP_INTERP_BUILD=1 wasm-port/tests/wasm/node/verify_sim_configs_inventory_wasm.
SKIP_INI_BUILD=1 SKIP_INTERP_BUILD=1 wasm-port/tests/browser/verify_ini_panel_browser.sh SKIP_INI_BUILD=1 SKIP_INTERP_BUILD=1 wasm-port/tests/browser/verify_ini_panel_browser.sh
SKIP_INI_BUILD=1 SKIP_INTERP_BUILD=1 wasm-port/tests/browser/verify_release_artifact_url_workflow_browser.sh SKIP_INI_BUILD=1 SKIP_INTERP_BUILD=1 wasm-port/tests/browser/verify_release_artifact_url_workflow_browser.sh
wasm-port/tests/ui/node/verify_ui_node_smokes.sh wasm-port/tests/ui/node/verify_ui_node_smokes.sh
wasm-port/tests/sdk/node/verify_project_release_artifact_url_workflow.sh
wasm-port/tests/host/verify_host_smokes.sh wasm-port/tests/host/verify_host_smokes.sh
``` ```
@@ -151,6 +152,7 @@ opfs_session_docs_node_smoke=ok
sim_configs_coverage_docs_node_smoke=ok sim_configs_coverage_docs_node_smoke=ok
host_runtime_boundary_docs_node_smoke=ok host_runtime_boundary_docs_node_smoke=ok
sdk_surface_node_smoke=ok sdk_surface_node_smoke=ok
project_release_artifact_url_workflow_node_smoke=ok
``` ```
The expected browser INI panel smoke outputs include: The expected browser INI panel smoke outputs include:

View File

@@ -252,6 +252,10 @@ action-plan output without executing release gates.
`createProjectReleaseReadinessArtifactUrlWorkflowSummaryViewModel()` turns the `createProjectReleaseReadinessArtifactUrlWorkflowSummaryViewModel()` turns the
URL workflow result into stable dashboard status text and rows for ready, URL workflow result into stable dashboard status text and rows for ready,
missing-input, fetch-failure, and artifact-validation-blocked states. missing-input, fetch-failure, and artifact-validation-blocked states.
`tests/sdk/node/verify_project_release_artifact_url_workflow.sh` is the
dedicated executable SDK gate for that URL workflow. It verifies caller-provided
fetch handling, ready summaries, missing input, HTTP failure, thrown fetch
errors, and ends with `project_release_artifact_url_workflow_node_smoke=ok`.
## OPFS/session persistence exports ## OPFS/session persistence exports

View File

@@ -57,8 +57,10 @@ for (const phrase of [
"verify_project_release_gate.sh", "verify_project_release_gate.sh",
"build/project-release-readiness.json", "build/project-release-readiness.json",
"verify_project_release_readiness_artifact.sh", "verify_project_release_readiness_artifact.sh",
"verify_project_release_artifact_url_workflow.sh",
"host_wasm_opfs_browser_smokes=ok", "host_wasm_opfs_browser_smokes=ok",
"project_release_readiness_artifact_node_smoke=ok", "project_release_readiness_artifact_node_smoke=ok",
"project_release_artifact_url_workflow_node_smoke=ok",
"project_release_gate=ok", "project_release_gate=ok",
"sim_configs_wasm_node_inventory_unexpected_fail=0", "sim_configs_wasm_node_inventory_unexpected_fail=0",
"browser_ini_shell_integration_workflow_smoke=ok", "browser_ini_shell_integration_workflow_smoke=ok",
@@ -91,6 +93,7 @@ for (const phrase of [
"verify_host_smokes.sh", "verify_host_smokes.sh",
"write_project_release_readiness_artifact.mjs", "write_project_release_readiness_artifact.mjs",
"verify_project_release_readiness_artifact.sh", "verify_project_release_readiness_artifact.sh",
"verify_project_release_artifact_url_workflow.sh",
"project_release_gate=ok", "project_release_gate=ok",
]) { ]) {
assert.match(projectReleaseGateText, literalRegExp(phrase)); assert.match(projectReleaseGateText, literalRegExp(phrase));
@@ -123,6 +126,8 @@ for (const phrase of [
"loadIniPanelShellWorkflowOverviewReleaseReadinessArtifactUrl()", "loadIniPanelShellWorkflowOverviewReleaseReadinessArtifactUrl()",
"loadProjectReleaseReadinessArtifactUrlWorkflow()", "loadProjectReleaseReadinessArtifactUrlWorkflow()",
"createProjectReleaseReadinessArtifactUrlWorkflowSummaryViewModel()", "createProjectReleaseReadinessArtifactUrlWorkflowSummaryViewModel()",
"verify_project_release_artifact_url_workflow.sh",
"project_release_artifact_url_workflow_node_smoke=ok",
"build/project-release-readiness.json", "build/project-release-readiness.json",
"INI panel shell handoff exports", "INI panel shell handoff exports",
"createIniPanelShellApiSurfaceInventory()", "createIniPanelShellApiSurfaceInventory()",

View File

@@ -14,6 +14,7 @@ SKIP_INTERP_BUILD=1 "$ROOT_DIR/tests/wasm/node/verify_sim_configs_inventory_wasm
SKIP_INI_BUILD=1 SKIP_INTERP_BUILD=1 "$ROOT_DIR/tests/browser/verify_ini_panel_browser.sh" SKIP_INI_BUILD=1 SKIP_INTERP_BUILD=1 "$ROOT_DIR/tests/browser/verify_ini_panel_browser.sh"
SKIP_INI_BUILD=1 SKIP_INTERP_BUILD=1 "$ROOT_DIR/tests/browser/verify_release_artifact_url_workflow_browser.sh" SKIP_INI_BUILD=1 SKIP_INTERP_BUILD=1 "$ROOT_DIR/tests/browser/verify_release_artifact_url_workflow_browser.sh"
"$ROOT_DIR/tests/ui/node/verify_ui_node_smokes.sh" "$ROOT_DIR/tests/ui/node/verify_ui_node_smokes.sh"
"$ROOT_DIR/tests/sdk/node/verify_project_release_artifact_url_workflow.sh"
"$ROOT_DIR/tests/host/verify_host_smokes.sh" "$ROOT_DIR/tests/host/verify_host_smokes.sh"
node "$ROOT_DIR/tests/host/write_project_release_readiness_artifact.mjs" node "$ROOT_DIR/tests/host/write_project_release_readiness_artifact.mjs"

View File

@@ -0,0 +1,105 @@
import assert from "node:assert/strict";
import {
createProjectReleaseGateManifest,
createProjectReleaseReadinessArtifactUrlWorkflowSummaryViewModel,
createProjectReleaseReadinessReport,
loadProjectReleaseReadinessArtifactUrlWorkflow,
} from "../../../runtime/sdk/src/index.js";
const manifest = createProjectReleaseGateManifest();
const readyArtifactJson = JSON.stringify(createProjectReleaseReadinessReport({
gateResults: Object.fromEntries(manifest.gateIds.map((id) => [id, true])),
}));
let fetchedUrl = null;
const readyWorkflow = await loadProjectReleaseReadinessArtifactUrlWorkflow({
artifactUrl: "/project-release-readiness.json",
fetchRef: async (url) => {
fetchedUrl = url;
return {
ok: true,
status: 200,
text: async () => readyArtifactJson,
};
},
});
const readySummary = createProjectReleaseReadinessArtifactUrlWorkflowSummaryViewModel(readyWorkflow);
assert.equal(fetchedUrl, "/project-release-readiness.json");
assert.equal(readyWorkflow.apiName, "project-release-readiness-artifact-url-workflow");
assert.equal(readyWorkflow.workflowVersion, 1);
assert.equal(readyWorkflow.ready, true);
assert.equal(readyWorkflow.fetched, true);
assert.equal(readyWorkflow.httpStatus, 200);
assert.equal(readyWorkflow.fetchError, null);
assert.equal(readyWorkflow.jsonWorkflow.ready, true);
assert.equal(readyWorkflow.validation.ready, true);
assert.equal(readyWorkflow.actionPlan.ready, true);
assert.equal(readySummary.apiName, "project-release-readiness-artifact-url-workflow-summary-view-model");
assert.equal(readySummary.statusLine, "Ready: Artifact URL workflow complete");
assert.deepEqual(
readySummary.rows.map(({ id, value }) => [id, value]),
[
["artifact-url", "/project-release-readiness.json"],
["fetch", "ready (200)"],
["json-workflow", "ready"],
["artifact-validation", "ready"],
["next-command", "none"],
["missing", "none"],
],
);
const missingInputWorkflow = await loadProjectReleaseReadinessArtifactUrlWorkflow({
artifactUrl: "",
fetchRef: null,
});
const missingInputSummary = createProjectReleaseReadinessArtifactUrlWorkflowSummaryViewModel(
missingInputWorkflow,
);
assert.equal(missingInputWorkflow.ready, false);
assert.equal(missingInputWorkflow.fetched, false);
assert.deepEqual(missingInputWorkflow.missing.slice(0, 2), ["artifact-url", "fetch"]);
assert.match(missingInputSummary.statusLine, /^Blocked: artifact-url, fetch/);
assert.equal(missingInputSummary.rows.find(({ id }) => id === "artifact-url")?.value, "missing");
const httpFailureWorkflow = await loadProjectReleaseReadinessArtifactUrlWorkflow({
artifactUrl: "/missing.json",
fetchRef: async () => ({
ok: false,
status: 404,
text: async () => "",
}),
});
const httpFailureSummary = createProjectReleaseReadinessArtifactUrlWorkflowSummaryViewModel(
httpFailureWorkflow,
);
assert.equal(httpFailureWorkflow.ready, false);
assert.equal(httpFailureWorkflow.fetched, false);
assert.equal(httpFailureWorkflow.httpStatus, 404);
assert.match(httpFailureWorkflow.fetchError, /404/);
assert.equal(httpFailureWorkflow.missing[0], "artifact-fetch");
assert.equal(
httpFailureWorkflow.actionPlan.nextCommand,
"wasm-port/tests/host/verify_project_release_gate.sh",
);
assert.match(httpFailureSummary.statusLine, /^Blocked: artifact-fetch/);
assert.equal(httpFailureSummary.rows.find(({ id }) => id === "fetch")?.value, "blocked");
const thrownFetchWorkflow = await loadProjectReleaseReadinessArtifactUrlWorkflow({
artifactUrl: "/throws.json",
fetchRef: async () => {
throw new Error("network unavailable");
},
});
const thrownFetchSummary = createProjectReleaseReadinessArtifactUrlWorkflowSummaryViewModel(
thrownFetchWorkflow,
);
assert.equal(thrownFetchWorkflow.ready, false);
assert.equal(thrownFetchWorkflow.fetched, false);
assert.equal(thrownFetchWorkflow.httpStatus, null);
assert.equal(thrownFetchWorkflow.fetchError, "network unavailable");
assert.equal(thrownFetchWorkflow.missing[0], "artifact-fetch");
assert.match(thrownFetchSummary.statusLine, /^Blocked: artifact-fetch/);
console.log("project_release_artifact_url_workflow_node_smoke=ok");

View File

@@ -0,0 +1,6 @@
#!/usr/bin/env bash
set -euo pipefail
ROOT_DIR="$(cd "$(dirname "$0")/../../.." && pwd)"
node "$ROOT_DIR/tests/sdk/node/verify_project_release_artifact_url_workflow.mjs"

View File

@@ -5,3 +5,4 @@ ROOT_DIR="$(cd "$(dirname "$0")/../../.." && pwd)"
node "$ROOT_DIR/tests/sdk/node/verify_sdk_surface.mjs" node "$ROOT_DIR/tests/sdk/node/verify_sdk_surface.mjs"
"$ROOT_DIR/tests/sdk/node/verify_project_release_gate_manifest.sh" "$ROOT_DIR/tests/sdk/node/verify_project_release_gate_manifest.sh"
"$ROOT_DIR/tests/sdk/node/verify_project_release_artifact_url_workflow.sh"