补充 host runtime boundary release gate 文档
This commit is contained in:
100
wasm-port/tests/docs/node/verify_host_runtime_boundary_docs.mjs
Normal file
100
wasm-port/tests/docs/node/verify_host_runtime_boundary_docs.mjs
Normal file
@@ -0,0 +1,100 @@
|
||||
import assert from "node:assert/strict";
|
||||
import { existsSync, readFileSync } from "node:fs";
|
||||
import { dirname, resolve } from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
|
||||
const __dirname = dirname(fileURLToPath(import.meta.url));
|
||||
const root = resolve(__dirname, "../../..");
|
||||
|
||||
function literalRegExp(text) {
|
||||
return new RegExp(text.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"));
|
||||
}
|
||||
|
||||
function parseTsv(text) {
|
||||
const [headerLine, ...lines] = text.trim().split(/\r?\n/);
|
||||
const headers = headerLine.split("\t");
|
||||
return lines.map((line) => {
|
||||
const cells = line.split("\t");
|
||||
return Object.fromEntries(headers.map((header, index) => [header, cells[index] ?? ""]));
|
||||
});
|
||||
}
|
||||
|
||||
const docText = readFileSync(resolve(root, "docs/host-runtime-boundary-handoff.md"), "utf8");
|
||||
const fullProcessText = readFileSync(resolve(root, "docs/full-process-boundary-design.md"), "utf8");
|
||||
const simHandoffText = readFileSync(resolve(root, "docs/sim-configs-coverage-handoff.md"), "utf8");
|
||||
const inventoryTestText = readFileSync(
|
||||
resolve(root, "tests/wasm/node/verify_sim_configs_inventory_wasm.mjs"),
|
||||
"utf8",
|
||||
);
|
||||
const hostSmokeText = readFileSync(resolve(root, "tests/host/verify_host_smokes.sh"), "utf8");
|
||||
const readmeText = readFileSync(resolve(root, "README.md"), "utf8");
|
||||
const trackerText = readFileSync(resolve(root, "../PROJECT_COMPLETION_TRACKER.md"), "utf8");
|
||||
|
||||
for (const phrase of [
|
||||
"Host/runtime boundary release handoff",
|
||||
"runtime-boundary-host-readiness-rollup.tsv",
|
||||
"runtime-boundary-promotion-blockers.tsv",
|
||||
"runtime-boundary-opt-in-probe-dispatch-rollup.tsv",
|
||||
"runtime-boundary-native-evidence-acceptance-gate.tsv",
|
||||
"blocked-runtime-promotion-lock.tsv",
|
||||
"host_readiness_status=host_blocked_for_all_opt_in_native_probes",
|
||||
"missing_host_requirements=halcmd,halrun,linuxcnc,milltask",
|
||||
"dispatch_status=dispatch_blocked_for_all_opt_in_native_probes",
|
||||
"current_probe_status=skipped_missing_host_runtime",
|
||||
"native_evidence_status=pending_until_native_pass",
|
||||
"evidence_acceptance_allowed=0",
|
||||
"ENABLE_MILLTURN_USER_M_RUNTIME_PROBE=1",
|
||||
"ENABLE_TOOL_DB_RUNTIME_PROBE=1",
|
||||
"ENABLE_PYTHON_REMAP_RUNTIME_PROBE=1",
|
||||
"L4-USER-M-PROCESS",
|
||||
"L4-TOOL-DB",
|
||||
"L4-PYTHON-REMAP",
|
||||
"host_runtime_boundary_docs_node_smoke=ok",
|
||||
]) {
|
||||
assert.match(docText, literalRegExp(phrase));
|
||||
}
|
||||
|
||||
for (const phrase of [
|
||||
"runtime-boundary-host-readiness-rollup.tsv",
|
||||
"runtime-boundary-opt-in-probe-dispatch-rollup.tsv",
|
||||
"runtime-boundary-native-evidence-acceptance-gate.tsv",
|
||||
]) {
|
||||
assert.match(fullProcessText, literalRegExp(phrase));
|
||||
assert.match(inventoryTestText, literalRegExp(phrase));
|
||||
assert.match(docText, literalRegExp(phrase));
|
||||
}
|
||||
|
||||
assert.match(simHandoffText, /L4-PYTHON-REMAP/);
|
||||
assert.match(hostSmokeText, /verify_host_runtime_boundary_docs\.sh/);
|
||||
assert.match(readmeText, /docs\/host-runtime-boundary-handoff\.md/);
|
||||
assert.match(trackerText, /Host\/runtime boundary/);
|
||||
|
||||
const hostRollupPath = resolve(
|
||||
root,
|
||||
"build/wasm/sim-configs-inventory/runtime-boundary-host-readiness-rollup.tsv",
|
||||
);
|
||||
if (existsSync(hostRollupPath)) {
|
||||
const [row] = parseTsv(readFileSync(hostRollupPath, "utf8"));
|
||||
assert.equal(row.host_readiness_status, "host_blocked_for_all_opt_in_native_probes");
|
||||
assert.equal(row.family_count, "3");
|
||||
assert.equal(row.host_ready_family_count, "0");
|
||||
assert.equal(row.host_blocked_family_count, "3");
|
||||
assert.equal(row.missing_host_requirements, "halcmd,halrun,linuxcnc,milltask");
|
||||
assert.equal(row.execution_enabled, "0");
|
||||
assert.equal(row.promotion_allowed, "0");
|
||||
}
|
||||
|
||||
const dispatchRollupPath = resolve(
|
||||
root,
|
||||
"build/wasm/sim-configs-inventory/runtime-boundary-opt-in-probe-dispatch-rollup.tsv",
|
||||
);
|
||||
if (existsSync(dispatchRollupPath)) {
|
||||
const [row] = parseTsv(readFileSync(dispatchRollupPath, "utf8"));
|
||||
assert.equal(row.dispatch_status, "dispatch_blocked_for_all_opt_in_native_probes");
|
||||
assert.equal(row.dispatch_allowed_count, "0");
|
||||
assert.equal(row.dispatch_blocked_count, "3");
|
||||
assert.equal(row.execution_enabled, "0");
|
||||
assert.equal(row.promotion_allowed, "0");
|
||||
}
|
||||
|
||||
console.log("host_runtime_boundary_docs_node_smoke=ok");
|
||||
6
wasm-port/tests/docs/node/verify_host_runtime_boundary_docs.sh
Executable file
6
wasm-port/tests/docs/node/verify_host_runtime_boundary_docs.sh
Executable file
@@ -0,0 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
ROOT_DIR="$(cd "$(dirname "$0")/../../.." && pwd)"
|
||||
|
||||
node "$ROOT_DIR/tests/docs/node/verify_host_runtime_boundary_docs.mjs"
|
||||
@@ -68,7 +68,7 @@ for (const reason of [
|
||||
assert.match(inventoryTestText, /sim_configs_wasm_node_inventory_skip_/);
|
||||
assert.match(hostSmokeText, /verify_sim_configs_inventory_wasm\.sh/);
|
||||
assert.match(hostSmokeText, /verify_sim_configs_coverage_docs\.sh/);
|
||||
assert.match(trackerText, /sim-config coverage/);
|
||||
assert.match(trackerText, /Sim config coverage|sim-config coverage/);
|
||||
|
||||
const skipSummaryPath = resolve(root, "build/wasm/sim-configs-inventory/skip-summary.tsv");
|
||||
if (existsSync(skipSummaryPath)) {
|
||||
|
||||
@@ -16,6 +16,7 @@ SKIP_TP_BUILD=1 "$ROOT_DIR/tests/wasm/node/verify_tp_wasm.sh"
|
||||
"$ROOT_DIR/tests/sdk/node/verify_sdk_surface.sh"
|
||||
"$ROOT_DIR/tests/docs/node/verify_opfs_session_docs.sh"
|
||||
"$ROOT_DIR/tests/docs/node/verify_sim_configs_coverage_docs.sh"
|
||||
"$ROOT_DIR/tests/docs/node/verify_host_runtime_boundary_docs.sh"
|
||||
"$ROOT_DIR/tests/ui/node/verify_ui_node_smokes.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_interp_browser.sh"
|
||||
|
||||
Reference in New Issue
Block a user