新增 release artifact URL workflow summary API
This commit is contained in:
@@ -9,7 +9,7 @@ turn-by-turn continuation notes and next-batch execution records.
|
||||
## Current Status
|
||||
|
||||
- Active continuation file: `text14.txt`
|
||||
- Latest completed batch: project release readiness artifact URL workflow SDK API
|
||||
- Latest completed batch: project release readiness artifact URL workflow summary view-model SDK API
|
||||
- Latest relevant commit: use `git log -1 --oneline` after each committed batch
|
||||
- Working tree at tracker creation: clean
|
||||
- Required policy: LinuxCNC remains the only CNC semantic source
|
||||
@@ -43,7 +43,7 @@ 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 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. |
|
||||
| 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/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 a Node surface smoke. |
|
||||
| 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. |
|
||||
| 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. |
|
||||
|
||||
57
text14.txt
57
text14.txt
@@ -3308,6 +3308,63 @@ ui_node_smokes=ok
|
||||
继续只做实质能力推进。优先选择可执行 gate、SDK/API surface、或真实 browser workflow;
|
||||
不要做只整理断言或局部常量化的批次。
|
||||
|
||||
五十四、2026-06-16 继续执行记录:project release readiness artifact URL workflow summary view-model SDK API
|
||||
|
||||
本轮继续按“每批必须产出可调用 API、可验证 workflow、可执行 gate、或真实 UI/browser 能力”推进,
|
||||
把 SDK 侧 release readiness artifact URL workflow 进一步封装为 dashboard 可直接消费的 summary
|
||||
view-model。外部 CI/dashboard 现在可以在 URL workflow 之后直接读取稳定 statusLine 和 display rows,
|
||||
不用自行解释 fetch、JSON workflow、artifact validation 和 action-plan 字段。
|
||||
|
||||
完成内容:
|
||||
|
||||
- `runtime/sdk/src/project-release-readiness.js` 新增:
|
||||
- `createProjectReleaseReadinessArtifactUrlWorkflowSummaryViewModel()`;
|
||||
- 新 summary view-model 返回:
|
||||
- `apiName: project-release-readiness-artifact-url-workflow-summary-view-model`;
|
||||
- `viewModelVersion: 1`;
|
||||
- `phase/ready`;
|
||||
- `title/statusText/detailText/statusLine`;
|
||||
- rows:`artifact-url`、`fetch`、`json-workflow`、`artifact-validation`、`next-command`、`missing`;
|
||||
- 覆盖 ready URL workflow 的 `Ready: Artifact URL workflow complete`;
|
||||
- 覆盖 missing URL/fetch 的 blocked statusLine;
|
||||
- 覆盖 HTTP failure 的 blocked summary row;
|
||||
- `runtime/sdk/src/index.js` re-export 新 summary API;
|
||||
- `verify_project_release_gate_manifest.mjs` 覆盖 ready、missing input、HTTP failure summary view-model;
|
||||
- `verify_sdk_surface.mjs` 覆盖 SDK export、README 可发现性和 ready statusLine;
|
||||
- `runtime/sdk/README.md`、`docs/project-release-handoff.md`、`verify_project_release_handoff_docs.mjs`
|
||||
记录 URL workflow summary API;
|
||||
- `PROJECT_COMPLETION_TRACKER.md` 同步 latest completed batch 和 SDK/API surface 状态;
|
||||
- 未新增控制按钮;
|
||||
- 未执行 release gate/action-plan;
|
||||
- 未解析 G-code;
|
||||
- 未解释 canonical events;
|
||||
- 未新增 JS CNC 语义;
|
||||
- 未运行 opt-in runtime probes;
|
||||
- 未 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_gate_manifest.sh
|
||||
wasm-port/tests/sdk/node/verify_sdk_surface.sh
|
||||
wasm-port/tests/docs/node/verify_project_release_handoff_docs.sh
|
||||
```
|
||||
|
||||
关键输出:
|
||||
|
||||
```text
|
||||
project_release_gate_manifest_node_smoke=ok
|
||||
sdk_surface_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 SDK API
|
||||
|
||||
本轮继续按“每批必须产出可调用 API、可验证 workflow、可执行 gate、或真实 UI/browser 能力”推进,
|
||||
|
||||
@@ -65,6 +65,8 @@ continuation records are in `../text14.txt`.
|
||||
`loadProjectReleaseReadinessArtifactUrlWorkflow()` provides the same
|
||||
SDK-side workflow from an artifact URL and caller-provided fetch
|
||||
implementation, including fetch status and next-command output.
|
||||
`createProjectReleaseReadinessArtifactUrlWorkflowSummaryViewModel()` turns
|
||||
that SDK URL workflow into stable dashboard rows and status text.
|
||||
Browser shells can also pass the JSON to
|
||||
`linuxCncIniPanelWorkflowOverviewApi.validateWorkflowOverviewReleaseReadinessArtifactJson()`
|
||||
through the workflow overview iframe and receive stable validation rows. They
|
||||
|
||||
@@ -57,6 +57,7 @@ import {
|
||||
createProjectReleaseGateManifest,
|
||||
createProjectReleaseGateResultMatrix,
|
||||
createProjectReleaseReadinessArtifactJsonWorkflow,
|
||||
createProjectReleaseReadinessArtifactUrlWorkflowSummaryViewModel,
|
||||
createProjectReleaseReadinessArtifactValidation,
|
||||
createProjectReleaseReadinessArtifactValidationActionPlan,
|
||||
createProjectReleaseReadinessArtifactValidationSummaryViewModel,
|
||||
@@ -248,6 +249,9 @@ action plan instead of throwing.
|
||||
for callers that supply a `fetch` implementation. It fetches the artifact URL,
|
||||
runs the JSON workflow, and returns fetch status, validation, summary, and
|
||||
action-plan output without executing release gates.
|
||||
`createProjectReleaseReadinessArtifactUrlWorkflowSummaryViewModel()` turns the
|
||||
URL workflow result into stable dashboard status text and rows for ready,
|
||||
missing-input, fetch-failure, and artifact-validation-blocked states.
|
||||
|
||||
## OPFS/session persistence exports
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ export {
|
||||
createProjectReleaseGateManifest,
|
||||
createProjectReleaseGateResultMatrix,
|
||||
createProjectReleaseReadinessArtifactJsonWorkflow,
|
||||
createProjectReleaseReadinessArtifactUrlWorkflowSummaryViewModel,
|
||||
createProjectReleaseReadinessArtifactValidation,
|
||||
createProjectReleaseReadinessArtifactValidationActionPlan,
|
||||
createProjectReleaseReadinessArtifactValidationSummaryViewModel,
|
||||
|
||||
@@ -674,6 +674,59 @@ export async function loadProjectReleaseReadinessArtifactUrlWorkflow({
|
||||
}
|
||||
}
|
||||
|
||||
export function createProjectReleaseReadinessArtifactUrlWorkflowSummaryViewModel(
|
||||
workflow = {},
|
||||
) {
|
||||
const missing = arrayOrEmpty(workflow?.missing);
|
||||
const ready = workflow?.ready === true;
|
||||
const statusText = ready ? "Ready" : "Blocked";
|
||||
const detailText = ready
|
||||
? "Artifact URL workflow complete"
|
||||
: (missing.length > 0 ? missing.join(", ") : workflow?.fetchError ?? "artifact URL workflow blocked");
|
||||
return {
|
||||
apiName: "project-release-readiness-artifact-url-workflow-summary-view-model",
|
||||
viewModelVersion: 1,
|
||||
phase: ready ? "ready" : "blocked",
|
||||
ready,
|
||||
title: "Project release artifact URL workflow",
|
||||
statusText,
|
||||
detailText,
|
||||
statusLine: `${statusText}: ${detailText}`,
|
||||
rows: [
|
||||
{
|
||||
id: "artifact-url",
|
||||
label: "Artifact URL",
|
||||
value: workflow?.artifactUrl || "missing",
|
||||
},
|
||||
{
|
||||
id: "fetch",
|
||||
label: "Fetch",
|
||||
value: workflow?.fetched === true ? `ready${workflow?.httpStatus ? ` (${workflow.httpStatus})` : ""}` : "blocked",
|
||||
},
|
||||
{
|
||||
id: "json-workflow",
|
||||
label: "JSON workflow",
|
||||
value: workflow?.jsonWorkflow?.ready === true ? "ready" : "blocked",
|
||||
},
|
||||
{
|
||||
id: "artifact-validation",
|
||||
label: "Artifact validation",
|
||||
value: workflow?.validation?.ready === true ? "ready" : "blocked",
|
||||
},
|
||||
{
|
||||
id: "next-command",
|
||||
label: "Next command",
|
||||
value: workflow?.actionPlan?.nextCommand ?? "none",
|
||||
},
|
||||
{
|
||||
id: "missing",
|
||||
label: "Missing workflow evidence",
|
||||
value: missing.length > 0 ? missing.join(", ") : "none",
|
||||
},
|
||||
],
|
||||
};
|
||||
}
|
||||
|
||||
export function createProjectReleaseReadinessArtifactValidation(artifact = {}) {
|
||||
const artifactObject = objectOrEmpty(artifact);
|
||||
const releaseGate = objectOrEmpty(artifactObject.releaseGate);
|
||||
|
||||
@@ -42,6 +42,7 @@ for (const phrase of [
|
||||
"createProjectReleaseReadinessArtifactValidationActionPlan()",
|
||||
"createProjectReleaseReadinessArtifactValidationSummaryViewModel()",
|
||||
"loadProjectReleaseReadinessArtifactUrlWorkflow()",
|
||||
"createProjectReleaseReadinessArtifactUrlWorkflowSummaryViewModel()",
|
||||
"embedded gate manifest, result matrix, and action plan",
|
||||
"validateWorkflowOverviewReleaseReadinessArtifactJson()",
|
||||
"loadWorkflowOverviewReleaseReadinessArtifactUrl()",
|
||||
@@ -121,6 +122,7 @@ for (const phrase of [
|
||||
"gateActionPlanReady",
|
||||
"loadIniPanelShellWorkflowOverviewReleaseReadinessArtifactUrl()",
|
||||
"loadProjectReleaseReadinessArtifactUrlWorkflow()",
|
||||
"createProjectReleaseReadinessArtifactUrlWorkflowSummaryViewModel()",
|
||||
"build/project-release-readiness.json",
|
||||
"INI panel shell handoff exports",
|
||||
"createIniPanelShellApiSurfaceInventory()",
|
||||
|
||||
@@ -5,6 +5,7 @@ import {
|
||||
createProjectReleaseGateManifest,
|
||||
createProjectReleaseGateResultMatrix,
|
||||
createProjectReleaseReadinessArtifactJsonWorkflow,
|
||||
createProjectReleaseReadinessArtifactUrlWorkflowSummaryViewModel,
|
||||
createProjectReleaseReadinessArtifactValidation,
|
||||
createProjectReleaseReadinessArtifactValidationActionPlan,
|
||||
createProjectReleaseReadinessArtifactValidationSummaryViewModel,
|
||||
@@ -193,6 +194,9 @@ const artifactUrlWorkflow = await loadProjectReleaseReadinessArtifactUrlWorkflow
|
||||
text: async () => JSON.stringify(report),
|
||||
}),
|
||||
});
|
||||
const artifactUrlWorkflowSummary = createProjectReleaseReadinessArtifactUrlWorkflowSummaryViewModel(
|
||||
artifactUrlWorkflow,
|
||||
);
|
||||
assert.equal(
|
||||
artifactValidationSummary.apiName,
|
||||
"project-release-readiness-artifact-validation-summary-view-model",
|
||||
@@ -278,6 +282,24 @@ assert.deepEqual(
|
||||
["next-command", "none"],
|
||||
],
|
||||
);
|
||||
assert.equal(
|
||||
artifactUrlWorkflowSummary.apiName,
|
||||
"project-release-readiness-artifact-url-workflow-summary-view-model",
|
||||
);
|
||||
assert.equal(artifactUrlWorkflowSummary.viewModelVersion, 1);
|
||||
assert.equal(artifactUrlWorkflowSummary.phase, "ready");
|
||||
assert.equal(artifactUrlWorkflowSummary.statusLine, "Ready: Artifact URL workflow complete");
|
||||
assert.deepEqual(
|
||||
artifactUrlWorkflowSummary.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 staleArtifactValidationSummary = createProjectReleaseReadinessArtifactValidationSummaryViewModel(
|
||||
createProjectReleaseReadinessArtifactValidation({}),
|
||||
);
|
||||
@@ -301,6 +323,12 @@ const failedArtifactUrlWorkflow = await loadProjectReleaseReadinessArtifactUrlWo
|
||||
text: async () => "",
|
||||
}),
|
||||
});
|
||||
const missingArtifactUrlWorkflowSummary = createProjectReleaseReadinessArtifactUrlWorkflowSummaryViewModel(
|
||||
missingArtifactUrlWorkflow,
|
||||
);
|
||||
const failedArtifactUrlWorkflowSummary = createProjectReleaseReadinessArtifactUrlWorkflowSummaryViewModel(
|
||||
failedArtifactUrlWorkflow,
|
||||
);
|
||||
assert.equal(staleArtifactValidationSummary.phase, "blocked");
|
||||
assert.match(staleArtifactValidationSummary.statusLine, /^Blocked: apiName, reportVersion/);
|
||||
assert.equal(staleArtifactValidationSummary.rows.find(({ id }) => id === "gate-action-plan")?.value, "missing");
|
||||
@@ -357,5 +385,17 @@ assert.equal(
|
||||
failedArtifactUrlWorkflow.actionPlan.nextCommand,
|
||||
"wasm-port/tests/host/verify_project_release_gate.sh",
|
||||
);
|
||||
assert.equal(missingArtifactUrlWorkflowSummary.phase, "blocked");
|
||||
assert.match(missingArtifactUrlWorkflowSummary.statusLine, /^Blocked: artifact-url, fetch/);
|
||||
assert.equal(
|
||||
missingArtifactUrlWorkflowSummary.rows.find(({ id }) => id === "artifact-url")?.value,
|
||||
"missing",
|
||||
);
|
||||
assert.equal(failedArtifactUrlWorkflowSummary.phase, "blocked");
|
||||
assert.match(failedArtifactUrlWorkflowSummary.statusLine, /^Blocked: artifact-fetch/);
|
||||
assert.equal(
|
||||
failedArtifactUrlWorkflowSummary.rows.find(({ id }) => id === "fetch")?.value,
|
||||
"blocked",
|
||||
);
|
||||
|
||||
console.log("project_release_gate_manifest_node_smoke=ok");
|
||||
|
||||
@@ -38,6 +38,7 @@ import {
|
||||
createProjectReleaseGateManifest,
|
||||
createProjectReleaseGateResultMatrix,
|
||||
createProjectReleaseReadinessArtifactJsonWorkflow,
|
||||
createProjectReleaseReadinessArtifactUrlWorkflowSummaryViewModel,
|
||||
createProjectReleaseReadinessArtifactValidation,
|
||||
createProjectReleaseReadinessArtifactValidationActionPlan,
|
||||
createProjectReleaseReadinessArtifactValidationSummaryViewModel,
|
||||
@@ -97,6 +98,10 @@ const requiredExports = [
|
||||
["createProjectReleaseGateManifest", createProjectReleaseGateManifest],
|
||||
["createProjectReleaseGateResultMatrix", createProjectReleaseGateResultMatrix],
|
||||
["createProjectReleaseReadinessArtifactJsonWorkflow", createProjectReleaseReadinessArtifactJsonWorkflow],
|
||||
[
|
||||
"createProjectReleaseReadinessArtifactUrlWorkflowSummaryViewModel",
|
||||
createProjectReleaseReadinessArtifactUrlWorkflowSummaryViewModel,
|
||||
],
|
||||
["createProjectReleaseReadinessArtifactValidation", createProjectReleaseReadinessArtifactValidation],
|
||||
[
|
||||
"createProjectReleaseReadinessArtifactValidationActionPlan",
|
||||
@@ -368,6 +373,19 @@ assert.equal(
|
||||
})).summaryViewModel.statusLine,
|
||||
"Ready: Artifact evidence complete",
|
||||
);
|
||||
assert.equal(
|
||||
createProjectReleaseReadinessArtifactUrlWorkflowSummaryViewModel(
|
||||
await loadProjectReleaseReadinessArtifactUrlWorkflow({
|
||||
artifactUrl: "/project-release-readiness.json",
|
||||
fetchRef: async () => ({
|
||||
ok: true,
|
||||
status: 200,
|
||||
text: async () => JSON.stringify(releaseReadinessArtifact),
|
||||
}),
|
||||
}),
|
||||
).statusLine,
|
||||
"Ready: Artifact URL workflow complete",
|
||||
);
|
||||
assert.equal(
|
||||
(await loadProjectReleaseReadinessArtifactUrlWorkflow({
|
||||
artifactUrl: "/missing.json",
|
||||
|
||||
Reference in New Issue
Block a user