Add runtime boundary promotion gates

This commit is contained in:
2026-06-11 15:03:54 +08:00
parent 1ab5571ae1
commit 949d5d2756
9 changed files with 3563 additions and 70 deletions

View File

@@ -90,14 +90,23 @@
"native_source_proof_alignment",
"runtime_native_alignment_artifacts",
"native_runtime_probe_summary",
"runtime_probe_gate_alignment",
"native_runtime_probe_execution_plan",
"native_runtime_probe_pass_evidence_contract",
"runtime_boundary_promotion_readiness",
"runtime_boundary_promotion_blockers",
"runtime_boundary_post_native_pass_gates",
"runtime_boundary_host_preflight",
"user_m_transition_contract",
"user_m_native_runtime_state_plan",
"user_m_native_runtime_readiness",
"user_m_native_runtime_probe_gate",
"tool_db_transaction_contract",
"tool_db_native_runtime_readiness",
"tool_db_native_runtime_probe_gate",
"python_runtime_contract",
"python_native_runtime_readiness",
"python_native_runtime_probe_gate",
"python_native_runtime_state_plan",
"python_native_runtime_fixture_plan",
"runtime_contract_summary",
@@ -769,6 +778,97 @@
}
}
async function verifyBrowserToolDbNativeRuntimeProbeGate() {
const rows = parseTsv(
await fetchText("../../build/wasm/sim-configs-inventory/tool-db-process-native-runtime-probe-gate.tsv"),
);
if (rows.length !== 1) {
throw new Error(`browser_tool_db_native_runtime_probe_gate: row count drift ${rows.length}`);
}
const row = rows[0];
if (
row.path !== "axis/db_demo/base.ngc" ||
row.ini !== "axis/db_demo/db_nonran.ini" ||
row.blocked !== "L4-TOOL-DB" ||
row.db_program !== "./db_nonran.py" ||
row.required_runtime !== "linuxcnc_tooldata_db_process"
) {
throw new Error("tool DB runtime probe gate identity drift");
}
if (row.python3_sufficient !== "0" || row.tool_table_fallback_sufficient !== "0") {
throw new Error("tool DB runtime probe gate must reject python3-only and tbl fallback proof");
}
for (const field of [
"python3_available",
"db_program_source_ready",
"linuxcnc_python_modules_ready",
"protocol_contract_ready",
"runtime_ready",
"source_proof_ready",
]) {
if (!["0", "1"].includes(row[field])) {
throw new Error(`tool DB runtime probe gate invalid ${field} ${row[field]}`);
}
}
if (
row.db_program_source_ready !== "1" ||
row.linuxcnc_python_modules_ready !== "1" ||
row.protocol_contract_ready !== "1" ||
row.source_proof_ready !== "1"
) {
throw new Error("tool DB runtime probe gate source readiness drift");
}
for (const requirement of [
"python3",
"linuxcnc",
"milltask",
"halcmd",
"axis/db_demo/db_nonran.py",
"linuxcnc.so",
"tooldb.py",
]) {
if (!row.runtime_requirements.includes(`${requirement}:`)) {
throw new Error(`tool DB runtime probe gate missing ${requirement}`);
}
}
for (const phase of [
"startup_handshake",
"initial_get_all",
"spindle_load_notify",
"tool_offset_notify",
"spindle_unload_notify",
]) {
if (!row.protocol_transactions.includes(`${phase}:`)) {
throw new Error(`tool DB runtime probe gate missing transaction ${phase}`);
}
}
if (
row.required_native_proof !== "native_db_process_protocol_probe_required" ||
row.proof_status !== "pending" ||
row.execution_enabled !== "0" ||
row.promotion_allowed !== "0"
) {
throw new Error("tool DB runtime probe gate must remain pending and disabled");
}
if (!row.notes.includes("fallback_not_sufficient")) {
throw new Error("tool DB runtime probe gate must record fallback insufficiency");
}
if (row.runtime_ready === "1") {
if (
row.missing_requirements !== "-" ||
row.gate_status !== "ready_to_implement_protocol_probe"
) {
throw new Error("ready tool DB runtime probe gate drift");
}
} else if (
row.missing_requirements === "-" ||
row.gate_status !== "blocked_missing_host_runtime"
) {
throw new Error("missing-runtime tool DB probe gate drift");
}
}
async function verifyBrowserPythonRuntimeContract() {
const rows = parseTsv(
await fetchText("../../build/wasm/sim-configs-inventory/python-remap-runtime-contract.tsv"),
@@ -920,6 +1020,91 @@
}
}
async function verifyBrowserPythonNativeRuntimeProbeGate() {
const rows = parseTsv(
await fetchText("../../build/wasm/sim-configs-inventory/python-remap-native-runtime-probe-gate.tsv"),
);
if (rows.length !== 1) {
throw new Error(`browser_python_native_runtime_probe_gate: row count drift ${rows.length}`);
}
const row = rows[0];
if (
row.family !== "axis/remap/stop-lookahead/nc_files" ||
row.blocked !== "L4-PYTHON-REMAP" ||
row.fixture_id !== "stop_lookahead_python_runtime_lifecycle" ||
row.required_runtime !== "linuxcnc_python_remap_runtime"
) {
throw new Error(`${row.family}: Python runtime probe gate identity drift`);
}
if (row.python3_sufficient !== "0") {
throw new Error(`${row.family}: python3 alone must not satisfy Python remap readiness`);
}
for (const field of [
"python3_available",
"linuxcnc_available",
"runtime_owner_sources_ready",
"representative_modules_ready",
"runtime_ready",
"source_proof_ready",
]) {
if (!["0", "1"].includes(row[field])) {
throw new Error(`${row.family}: invalid ${field} ${row[field]}`);
}
}
if (
row.runtime_owner_sources_ready !== "1" ||
row.representative_modules_ready !== "1" ||
row.source_proof_ready !== "1"
) {
throw new Error(`${row.family}: Python runtime probe gate source readiness drift`);
}
for (const requirement of [
"python3",
"linuxcnc",
"src/emc/rs274ngc/interp_python.cc",
"src/emc/pythonplugin/python_plugin.cc",
"axis/remap/stop-lookahead/python/remap.py",
"axis/remap/stop-lookahead/python/toplevel.py",
]) {
if (!row.runtime_requirements.includes(`${requirement}:`)) {
throw new Error(`${row.family}: Python runtime probe gate missing ${requirement}`);
}
}
for (const modulePath of [
"axis/remap/stop-lookahead/python/remap.py",
"axis/remap/stop-lookahead/python/toplevel.py",
]) {
if (!row.representative_module_imports.includes(`import:${modulePath}`)) {
throw new Error(`${row.family}: Python runtime probe gate missing representative import ${modulePath}`);
}
}
if (
row.required_native_proof !== "linuxcnc_python_runtime_lifecycle_probe_required" ||
row.proof_status !== "pending" ||
row.execution_enabled !== "0" ||
row.promotion_allowed !== "0"
) {
throw new Error(`${row.family}: Python runtime probe gate must remain pending and disabled`);
}
if (!row.notes.includes("python3_alone_not_sufficient")) {
throw new Error(`${row.family}: Python runtime probe gate must record python3-only guard`);
}
if (row.runtime_ready === "1") {
if (
row.missing_requirements !== "-" ||
row.gate_status !== "ready_to_implement_lifecycle_probe"
) {
throw new Error(`${row.family}: ready Python runtime probe gate drift`);
}
} else if (
row.missing_requirements === "-" ||
row.gate_status !== "blocked_missing_host_runtime"
) {
throw new Error(`${row.family}: missing-runtime Python probe gate drift`);
}
}
async function verifyBrowserPythonNativeRuntimeStatePlan() {
const rows = parseTsv(
await fetchText("../../build/wasm/sim-configs-inventory/python-remap-native-runtime-state-plan.tsv"),
@@ -1232,6 +1417,8 @@
boundaryKind: "external_user_m_process",
target: "axis/vismach/millturn/example.ngc",
runtimeProbe: "linuxcnc_millturn_user_m_runtime_probe",
requiredNativeProof: "native_runtime_state_probe_required",
optInEnv: "ENABLE_MILLTURN_USER_M_RUNTIME_PROBE=1",
},
],
[
@@ -1240,6 +1427,8 @@
boundaryKind: "tool_database_process",
target: "axis/db_demo/base.ngc",
runtimeProbe: "linuxcnc_tool_db_runtime_probe",
requiredNativeProof: "native_db_process_protocol_probe_required",
optInEnv: "ENABLE_TOOL_DB_RUNTIME_PROBE=1",
},
],
[
@@ -1248,6 +1437,8 @@
boundaryKind: "python_runtime",
target: "axis/remap/stop-lookahead/nc_files",
runtimeProbe: "linuxcnc_python_remap_runtime_probe",
requiredNativeProof: "linuxcnc_python_runtime_lifecycle_probe_required",
optInEnv: "ENABLE_PYTHON_REMAP_RUNTIME_PROBE=1",
},
],
]);
@@ -1264,7 +1455,9 @@
if (
row.boundary_kind !== expectedRow.boundaryKind ||
row.target !== expectedRow.target ||
row.runtime_probe !== expectedRow.runtimeProbe
row.runtime_probe !== expectedRow.runtimeProbe ||
row.required_native_proof !== expectedRow.requiredNativeProof ||
row.opt_in_env !== expectedRow.optInEnv
) {
throw new Error(`${row.boundary_class}: native runtime probe metadata drift`);
}
@@ -1289,6 +1482,25 @@
if (row.runtime_ready === "0" && row.probe_status !== "skipped_missing_host_runtime") {
throw new Error(`${row.boundary_class}: non-ready runtime must remain skipped`);
}
if (row.runtime_ready === "0" && !row.probe_note.includes("missing_host_runtime")) {
throw new Error(`${row.boundary_class}: missing-runtime probe note drift`);
}
if (
row.probe_status === "ready_disabled_by_default" &&
!row.probe_note.includes(`set_${row.opt_in_env.split("=")[0]}`)
) {
throw new Error(`${row.boundary_class}: ready-disabled probe note drift`);
}
if (
row.probe_status.startsWith("runtime_") &&
row.probe_status.endsWith("_passed") &&
!row.probe_note.includes("without_promotion")
) {
throw new Error(`${row.boundary_class}: passed probe note drift`);
}
if (row.probe_note === "-") {
throw new Error(`${row.boundary_class}: native runtime probe lacks note`);
}
if (row.execution_enabled !== "0" || row.promotion_allowed !== "0") {
throw new Error(`${row.boundary_class}: native runtime probe must not enable execution or promotion`);
}
@@ -1298,6 +1510,288 @@
}
}
async function verifyBrowserRuntimeProbeGateAlignment() {
const rows = parseTsv(
await fetchText("../../build/wasm/sim-configs-inventory/runtime-probe-gate-alignment.tsv"),
);
const expected = new Map([
[
"L4-USER-M-PROCESS",
{
boundaryKind: "external_user_m_process",
target: "axis/vismach/millturn/example.ngc",
gateArtifact: "user-m-process-native-runtime-probe-gate.tsv",
requiredNativeProof: "native_runtime_state_probe_required",
},
],
[
"L4-TOOL-DB",
{
boundaryKind: "tool_database_process",
target: "axis/db_demo/base.ngc",
gateArtifact: "tool-db-process-native-runtime-probe-gate.tsv",
requiredNativeProof: "native_db_process_protocol_probe_required",
},
],
[
"L4-PYTHON-REMAP",
{
boundaryKind: "python_runtime",
target: "axis/remap/stop-lookahead/nc_files",
gateArtifact: "python-remap-native-runtime-probe-gate.tsv",
requiredNativeProof: "linuxcnc_python_runtime_lifecycle_probe_required",
},
],
]);
if (rows.length !== expected.size) {
throw new Error(`browser_runtime_probe_gate_alignment: row count drift ${rows.length}`);
}
for (const row of rows) {
const expectedRow = expected.get(row.boundary_class);
if (!expectedRow) {
throw new Error(`browser_runtime_probe_gate_alignment: unexpected ${row.boundary_class}`);
}
if (
row.boundary_kind !== expectedRow.boundaryKind ||
row.target !== expectedRow.target ||
row.gate_artifact !== expectedRow.gateArtifact ||
row.gate_required_native_proof !== expectedRow.requiredNativeProof ||
row.native_required_native_proof !== expectedRow.requiredNativeProof
) {
throw new Error(`${row.boundary_class}: runtime probe gate alignment metadata drift`);
}
if (!/^ENABLE_[A-Z0-9_]+=1$/.test(row.native_opt_in_env)) {
throw new Error(`${row.boundary_class}: runtime probe gate alignment opt-in drift`);
}
if (row.gate_runtime_ready !== row.native_runtime_ready) {
throw new Error(`${row.boundary_class}: gate/native runtime readiness drift`);
}
if (row.gate_source_proof_ready !== "1" || row.native_source_proof_ready !== "1") {
throw new Error(`${row.boundary_class}: runtime probe gate source proof drift`);
}
for (const field of [
"missing_requirements_match",
"required_native_proof_match",
"execution_disabled_match",
"promotion_disabled_match",
"status_compatible",
"alignment_ok",
]) {
if (row[field] !== "1") {
throw new Error(`${row.boundary_class}: runtime probe gate ${field} failed`);
}
}
if (!row.notes.includes("before_promotion")) {
throw new Error(`${row.boundary_class}: runtime probe gate alignment notes drift`);
}
}
}
async function verifyBrowserNativeRuntimeProbeExecutionPlan() {
const rows = parseTsv(
await fetchText("../../build/wasm/sim-configs-inventory/native-runtime-probe-execution-plan.tsv"),
);
const expected = new Map([
[
"L4-USER-M-PROCESS",
{
boundaryKind: "external_user_m_process",
target: "axis/vismach/millturn/example.ngc",
runtimeProbe: "linuxcnc_millturn_user_m_runtime_probe",
requiredNativeProof: "native_runtime_state_probe_required",
optInEnv: "ENABLE_MILLTURN_USER_M_RUNTIME_PROBE=1",
script: "wasm-port/tests/native/probe_millturn_user_m_runtime.sh",
expectedPassStatus: "runtime_state_probe_passed",
},
],
[
"L4-TOOL-DB",
{
boundaryKind: "tool_database_process",
target: "axis/db_demo/base.ngc",
runtimeProbe: "linuxcnc_tool_db_runtime_probe",
requiredNativeProof: "native_db_process_protocol_probe_required",
optInEnv: "ENABLE_TOOL_DB_RUNTIME_PROBE=1",
script: "wasm-port/tests/native/probe_tool_db_runtime.sh",
expectedPassStatus: "runtime_protocol_probe_passed",
},
],
[
"L4-PYTHON-REMAP",
{
boundaryKind: "python_runtime",
target: "axis/remap/stop-lookahead/nc_files",
runtimeProbe: "linuxcnc_python_remap_runtime_probe",
requiredNativeProof: "linuxcnc_python_runtime_lifecycle_probe_required",
optInEnv: "ENABLE_PYTHON_REMAP_RUNTIME_PROBE=1",
script: "wasm-port/tests/native/probe_python_remap_runtime.sh",
expectedPassStatus: "runtime_lifecycle_probe_passed",
},
],
]);
if (rows.length !== expected.size) {
throw new Error(`browser_native_runtime_probe_execution_plan: row count drift ${rows.length}`);
}
for (const row of rows) {
const expectedRow = expected.get(row.boundary_class);
if (!expectedRow) {
throw new Error(`browser_native_runtime_probe_execution_plan: unexpected ${row.boundary_class}`);
}
if (
row.boundary_kind !== expectedRow.boundaryKind ||
row.target !== expectedRow.target ||
row.runtime_probe !== expectedRow.runtimeProbe ||
row.required_native_proof !== expectedRow.requiredNativeProof ||
row.opt_in_env !== expectedRow.optInEnv ||
row.expected_pass_status !== expectedRow.expectedPassStatus
) {
throw new Error(`${row.boundary_class}: native runtime execution plan metadata drift`);
}
if (row.execution_command !== `${expectedRow.optInEnv} bash ${expectedRow.script}`) {
throw new Error(`${row.boundary_class}: native runtime execution command drift`);
}
if (row.source_proof_ready !== "1" || row.gate_alignment_ok !== "1") {
throw new Error(`${row.boundary_class}: native runtime execution plan is not source/alignment ready`);
}
if (row.execution_enabled !== "0" || row.promotion_allowed !== "0") {
throw new Error(`${row.boundary_class}: native runtime execution plan must not enable execution or promotion`);
}
for (const requirement of [
`native:${expectedRow.expectedPassStatus}`,
"node:inventory_gate_alignment_after_native_pass",
"browser:smoke_gate_alignment_after_node_pass",
"manual:promotion_lock_update_required",
]) {
if (!row.promotion_requires.includes(requirement)) {
throw new Error(`${row.boundary_class}: native runtime execution plan missing ${requirement}`);
}
}
if (row.current_probe_status === row.expected_pass_status) {
if (row.plan_status !== "native_probe_passed_waiting_for_node_browser_promotion_proof") {
throw new Error(`${row.boundary_class}: passed execution plan status drift`);
}
} else if (row.runtime_ready === "1") {
if (row.plan_status !== "ready_to_run_opt_in_probe" || row.missing_requirements !== "-") {
throw new Error(`${row.boundary_class}: ready execution plan status drift`);
}
} else if (
row.plan_status !== "blocked_missing_host_runtime" ||
row.missing_requirements === "-"
) {
throw new Error(`${row.boundary_class}: blocked execution plan status drift`);
}
if (!row.notes.includes("no_automatic_promotion")) {
throw new Error(`${row.boundary_class}: native runtime execution plan notes drift`);
}
}
}
async function verifyBrowserNativeRuntimeProbePassEvidenceContract() {
const rows = parseTsv(
await fetchText("../../build/wasm/sim-configs-inventory/native-runtime-probe-pass-evidence-contract.tsv"),
);
const expected = new Map([
[
"L4-USER-M-PROCESS",
{
boundaryKind: "external_user_m_process",
target: "axis/vismach/millturn/example.ngc",
runtimeProbe: "linuxcnc_millturn_user_m_runtime_probe",
expectedPassStatus: "runtime_state_probe_passed",
evidence: [
"millturn_user_m_runtime_probe_status=runtime_state_probe_passed",
"millturn_user_m_M128_runtime_state_ok=1",
"millturn_user_m_M129_runtime_state_ok=1",
],
},
],
[
"L4-TOOL-DB",
{
boundaryKind: "tool_database_process",
target: "axis/db_demo/base.ngc",
runtimeProbe: "linuxcnc_tool_db_runtime_probe",
expectedPassStatus: "runtime_protocol_probe_passed",
evidence: [
"tool_db_runtime_probe_status=runtime_protocol_probe_passed",
"tool_db_protocol_version=v2.1",
"tool_db_runtime_protocol_probe_ok=1",
"tool_db_persistence_state_ok=1",
],
},
],
[
"L4-PYTHON-REMAP",
{
boundaryKind: "python_runtime",
target: "axis/remap/stop-lookahead/nc_files",
runtimeProbe: "linuxcnc_python_remap_runtime_probe",
expectedPassStatus: "runtime_lifecycle_probe_passed",
evidence: [
"python_remap_runtime_probe_status=runtime_lifecycle_probe_passed",
"python_remap_lifecycle_generator_first_yield=2",
"python_remap_runtime_lifecycle_probe_ok=1",
],
},
],
]);
if (rows.length !== expected.size) {
throw new Error(`browser_native_runtime_probe_pass_evidence_contract: row count drift ${rows.length}`);
}
for (const row of rows) {
const expectedRow = expected.get(row.boundary_class);
if (!expectedRow) {
throw new Error(`browser_native_runtime_probe_pass_evidence_contract: unexpected ${row.boundary_class}`);
}
if (
row.boundary_kind !== expectedRow.boundaryKind ||
row.target !== expectedRow.target ||
row.runtime_probe !== expectedRow.runtimeProbe ||
row.expected_pass_status !== expectedRow.expectedPassStatus ||
row.stdout_log === "-"
) {
throw new Error(`${row.boundary_class}: native pass evidence metadata drift`);
}
for (const evidence of expectedRow.evidence) {
if (!row.expected_evidence_keys.includes(evidence)) {
throw new Error(`${row.boundary_class}: native pass evidence missing ${evidence}`);
}
}
if (row.execution_enabled !== "0" || row.promotion_allowed !== "0") {
throw new Error(`${row.boundary_class}: native pass evidence contract must not enable execution or promotion`);
}
if (row.current_probe_status === row.expected_pass_status) {
if (
row.evidence_required_now !== "1" ||
row.observed_evidence_ready !== "1" ||
row.missing_evidence_keys !== "-" ||
row.evidence_status !== "native_pass_evidence_observed"
) {
throw new Error(`${row.boundary_class}: native pass evidence must be observed after pass`);
}
} else if (
row.evidence_required_now !== "0" ||
row.observed_evidence_ready !== "0" ||
row.missing_evidence_keys !== "-" ||
row.evidence_status !== "pending_until_native_pass"
) {
throw new Error(`${row.boundary_class}: native pass evidence must remain pending before pass`);
}
if (
!row.notes.includes("no_automatic_promotion") &&
!row.notes.includes("before_node_browser_promotion")
) {
throw new Error(`${row.boundary_class}: native pass evidence notes drift`);
}
}
}
async function verifyBrowserRuntimeBoundaryContractSummary() {
const rows = parseTsv(
await fetchText("../../build/wasm/sim-configs-inventory/runtime-boundary-contract-summary.tsv"),
@@ -1442,6 +1936,346 @@
}
}
async function verifyBrowserRuntimeBoundaryPromotionReadiness() {
const rows = parseTsv(
await fetchText("../../build/wasm/sim-configs-inventory/runtime-boundary-promotion-readiness.tsv"),
);
const expected = new Map([
[
"L4-USER-M-PROCESS",
{
boundaryKind: "external_user_m_process",
target: "axis/vismach/millturn/example.ngc",
blocked: "L4-USER-M-PROCESS",
expectedPassStatus: "runtime_state_probe_passed",
},
],
[
"L4-TOOL-DB",
{
boundaryKind: "tool_database_process",
target: "axis/db_demo/base.ngc",
blocked: "L4-TOOL-DB",
expectedPassStatus: "runtime_protocol_probe_passed",
},
],
[
"L4-PYTHON-REMAP",
{
boundaryKind: "python_runtime",
target: "axis/remap/stop-lookahead/nc_files",
blocked: "L4-PYTHON-REMAP",
expectedPassStatus: "runtime_lifecycle_probe_passed",
},
],
]);
if (rows.length !== expected.size) {
throw new Error(`browser_runtime_boundary_promotion_readiness: row count drift ${rows.length}`);
}
for (const row of rows) {
const expectedRow = expected.get(row.boundary_class);
if (!expectedRow) {
throw new Error(`browser_runtime_boundary_promotion_readiness: unexpected ${row.boundary_class}`);
}
if (
row.boundary_kind !== expectedRow.boundaryKind ||
row.target !== expectedRow.target ||
row.blocked !== expectedRow.blocked ||
row.expected_pass_status !== expectedRow.expectedPassStatus ||
row.native_evidence_status === "-"
) {
throw new Error(`${row.boundary_class}: promotion readiness metadata drift`);
}
if (
row.node_inventory_gate_complete !== "0" ||
row.browser_smoke_gate_complete !== "0" ||
row.promotion_lock_active !== "1" ||
row.manual_lock_update_required !== "1" ||
row.promotion_ready !== "0" ||
row.execution_enabled !== "0" ||
row.promotion_allowed !== "0"
) {
throw new Error(`${row.boundary_class}: promotion readiness must remain locked`);
}
if (row.current_probe_status === row.expected_pass_status) {
if (row.native_pass_ready !== "1" || row.blocking_reason === "awaiting_native_runtime_probe_pass") {
throw new Error(`${row.boundary_class}: passed promotion readiness state drift`);
}
} else if (
row.native_pass_ready !== "0" ||
row.blocking_reason !== "awaiting_native_runtime_probe_pass"
) {
throw new Error(`${row.boundary_class}: pending promotion readiness state drift`);
}
if (!row.notes.includes("no_automatic_promotion")) {
throw new Error(`${row.boundary_class}: promotion readiness notes drift`);
}
}
}
async function verifyBrowserRuntimeBoundaryPromotionBlockers() {
const rows = parseTsv(
await fetchText("../../build/wasm/sim-configs-inventory/runtime-boundary-promotion-blockers.tsv"),
);
const expected = new Map([
[
"L4-USER-M-PROCESS",
{
boundaryKind: "external_user_m_process",
target: "axis/vismach/millturn/example.ngc",
blocked: "L4-USER-M-PROCESS",
},
],
[
"L4-TOOL-DB",
{
boundaryKind: "tool_database_process",
target: "axis/db_demo/base.ngc",
blocked: "L4-TOOL-DB",
},
],
[
"L4-PYTHON-REMAP",
{
boundaryKind: "python_runtime",
target: "axis/remap/stop-lookahead/nc_files",
blocked: "L4-PYTHON-REMAP",
},
],
]);
if (rows.length !== expected.size) {
throw new Error(`browser_runtime_boundary_promotion_blockers: row count drift ${rows.length}`);
}
for (const row of rows) {
const expectedRow = expected.get(row.boundary_class);
if (!expectedRow) {
throw new Error(`browser_runtime_boundary_promotion_blockers: unexpected ${row.boundary_class}`);
}
if (
row.boundary_kind !== expectedRow.boundaryKind ||
row.target !== expectedRow.target ||
row.blocked !== expectedRow.blocked
) {
throw new Error(`${row.boundary_class}: promotion blocker metadata drift`);
}
if (
row.promotion_ready !== "0" ||
row.execution_enabled !== "0" ||
row.promotion_allowed !== "0" ||
row.blocker_keys === "-" ||
row.next_unblock_action === "-"
) {
throw new Error(`${row.boundary_class}: promotion blocker summary must remain blocked and actionable`);
}
if (!/^[1-9][0-9]*$/.test(row.blocker_count)) {
throw new Error(`${row.boundary_class}: invalid promotion blocker count`);
}
for (const blocker of [
"node_inventory_gate_not_complete",
"browser_smoke_gate_not_complete",
"promotion_lock_active",
"manual_lock_update_required",
]) {
if (!row.blocker_keys.includes(blocker)) {
throw new Error(`${row.boundary_class}: promotion blocker missing ${blocker}`);
}
}
if (
row.missing_runtime_requirements !== "-" &&
!row.blocker_keys.includes("host_runtime_requirements_missing")
) {
throw new Error(`${row.boundary_class}: host runtime blocker missing`);
}
if (!row.notes.includes("no_automatic_promotion")) {
throw new Error(`${row.boundary_class}: promotion blocker notes drift`);
}
}
}
async function verifyBrowserRuntimeBoundaryPostNativePassGates() {
const rows = parseTsv(
await fetchText("../../build/wasm/sim-configs-inventory/runtime-boundary-post-native-pass-gates.tsv"),
);
const expected = new Map([
[
"L4-USER-M-PROCESS",
{
boundaryKind: "external_user_m_process",
target: "axis/vismach/millturn/example.ngc",
blocked: "L4-USER-M-PROCESS",
nodeProof: "not_user_m_event_only",
browserProof: "no_full_process_claim",
},
],
[
"L4-TOOL-DB",
{
boundaryKind: "tool_database_process",
target: "axis/db_demo/base.ngc",
blocked: "L4-TOOL-DB",
nodeProof: "not_tbl_fallback",
browserProof: "opfs_persistence_only",
},
],
[
"L4-PYTHON-REMAP",
{
boundaryKind: "python_runtime",
target: "axis/remap/stop-lookahead/nc_files",
blocked: "L4-PYTHON-REMAP",
nodeProof: "not_js_semantics",
browserProof: "no_full_process_claim",
},
],
]);
if (rows.length !== expected.size) {
throw new Error(`browser_runtime_boundary_post_native_pass_gates: row count drift ${rows.length}`);
}
for (const row of rows) {
const expectedRow = expected.get(row.boundary_class);
if (!expectedRow) {
throw new Error(`browser_runtime_boundary_post_native_pass_gates: unexpected ${row.boundary_class}`);
}
if (
row.boundary_kind !== expectedRow.boundaryKind ||
row.target !== expectedRow.target ||
row.blocked !== expectedRow.blocked
) {
throw new Error(`${row.boundary_class}: post-native-pass gate metadata drift`);
}
if (
!row.required_node_proof.includes(expectedRow.nodeProof) ||
!row.required_browser_proof.includes(expectedRow.browserProof)
) {
throw new Error(`${row.boundary_class}: post-native-pass proof requirement drift`);
}
if (
row.manual_lock_update_required !== "1" ||
row.promotion_lock_active !== "1" ||
row.execution_enabled !== "0" ||
row.promotion_allowed !== "0"
) {
throw new Error(`${row.boundary_class}: post-native-pass gate must remain locked`);
}
if (row.native_evidence_ready === "1") {
if (
row.native_pass_ready !== "1" ||
row.node_gate_status !== "pending_node_inventory_promotion_gate" ||
row.browser_gate_status !== "blocked_until_node_gate_complete" ||
row.gate_status !== "waiting_for_node_browser_manual_promotion"
) {
throw new Error(`${row.boundary_class}: post-native-pass ready state drift`);
}
} else if (
row.node_gate_status !== "blocked_until_native_pass_evidence" ||
row.browser_gate_status !== "blocked_until_node_gate_complete" ||
row.gate_status !== "blocked_before_native_pass"
) {
throw new Error(`${row.boundary_class}: post-native-pass blocked state drift`);
}
if (!row.notes.includes("no_automatic_promotion")) {
throw new Error(`${row.boundary_class}: post-native-pass notes drift`);
}
}
}
async function verifyBrowserRuntimeBoundaryHostPreflight() {
const rows = parseTsv(
await fetchText("../../build/wasm/sim-configs-inventory/runtime-boundary-host-preflight.tsv"),
);
const expected = new Map([
[
"L4-USER-M-PROCESS",
{
boundaryKind: "external_user_m_process",
target: "axis/vismach/millturn/example.ngc",
blocked: "L4-USER-M-PROCESS",
requiredRuntime: "linuxcnc_task_hal_tcl_user_m_process",
optInEnv: "ENABLE_MILLTURN_USER_M_RUNTIME_PROBE=1",
script: "probe_millturn_user_m_runtime.sh",
missingToken: "linuxcnc",
},
],
[
"L4-TOOL-DB",
{
boundaryKind: "tool_database_process",
target: "axis/db_demo/base.ngc",
blocked: "L4-TOOL-DB",
requiredRuntime: "linuxcnc_tooldata_db_process",
optInEnv: "ENABLE_TOOL_DB_RUNTIME_PROBE=1",
script: "probe_tool_db_runtime.sh",
missingToken: "milltask",
},
],
[
"L4-PYTHON-REMAP",
{
boundaryKind: "python_runtime",
target: "axis/remap/stop-lookahead/nc_files",
blocked: "L4-PYTHON-REMAP",
requiredRuntime: "linuxcnc_python_remap_runtime",
optInEnv: "ENABLE_PYTHON_REMAP_RUNTIME_PROBE=1",
script: "probe_python_remap_runtime.sh",
missingToken: "linuxcnc",
},
],
]);
if (rows.length !== expected.size) {
throw new Error(`browser_runtime_boundary_host_preflight: row count drift ${rows.length}`);
}
for (const row of rows) {
const expectedRow = expected.get(row.boundary_class);
if (!expectedRow) {
throw new Error(`browser_runtime_boundary_host_preflight: unexpected ${row.boundary_class}`);
}
if (
row.boundary_kind !== expectedRow.boundaryKind ||
row.target !== expectedRow.target ||
row.blocked !== expectedRow.blocked ||
row.required_runtime !== expectedRow.requiredRuntime ||
row.opt_in_env !== expectedRow.optInEnv
) {
throw new Error(`${row.boundary_class}: host preflight metadata drift`);
}
if (
row.source_proof_ready !== "1" ||
row.required_native_proof === "-" ||
row.runtime_requirements === "-" ||
!row.runtime_requirements.includes(`${expectedRow.missingToken}:`)
) {
throw new Error(`${row.boundary_class}: host preflight readiness evidence drift`);
}
if (row.execution_command !== `${row.opt_in_env} bash wasm-port/tests/native/${expectedRow.script}`) {
throw new Error(`${row.boundary_class}: host preflight execution command drift`);
}
if (row.execution_enabled !== "0" || row.promotion_allowed !== "0") {
throw new Error(`${row.boundary_class}: host preflight must not enable execution or promotion`);
}
if (row.runtime_ready === "1") {
if (row.missing_requirements !== "-" || row.preflight_status !== "ready_to_run_opt_in_native_probe") {
throw new Error(`${row.boundary_class}: ready host preflight drift`);
}
} else if (
!row.missing_requirements.includes(expectedRow.missingToken) ||
row.preflight_status !== "blocked_missing_host_runtime"
) {
throw new Error(`${row.boundary_class}: blocked host preflight drift`);
}
if (!row.notes.includes("no_automatic_promotion")) {
throw new Error(`${row.boundary_class}: host preflight notes drift`);
}
}
}
async function verifyBrowserNextBoundaryRecommendations() {
const rows = parseTsv(
await fetchText("../../build/wasm/sim-configs-inventory/next-boundary-recommendations.tsv"),
@@ -2086,17 +2920,26 @@
await verifyBrowserUserMNativeRuntimeProbeGate();
await verifyBrowserToolDbTransactionPlan();
await verifyBrowserToolDbNativeRuntimeReadiness();
await verifyBrowserToolDbNativeRuntimeProbeGate();
await verifyBrowserPythonRuntimeContract();
await verifyBrowserPythonNativeRuntimeReadiness();
await verifyBrowserPythonNativeRuntimeProbeGate();
await verifyBrowserPythonNativeRuntimeStatePlan();
await verifyBrowserPythonNativeRuntimeFixturePlan();
await verifyBrowserNativeProofAlignment();
const runtimeNativeAlignmentSummaryRows =
await verifyBrowserRuntimeNativeAlignmentSummary();
await verifyBrowserNativeRuntimeProbeSummary();
await verifyBrowserRuntimeProbeGateAlignment();
await verifyBrowserNativeRuntimeProbeExecutionPlan();
await verifyBrowserNativeRuntimeProbePassEvidenceContract();
await verifyBrowserRuntimeBoundaryContractSummary();
await verifyBrowserRuntimeNativeAlignmentDetails(runtimeNativeAlignmentSummaryRows);
await verifyBrowserBlockedRuntimePromotionLock();
await verifyBrowserRuntimeBoundaryPromotionReadiness();
await verifyBrowserRuntimeBoundaryPromotionBlockers();
await verifyBrowserRuntimeBoundaryPostNativePassGates();
await verifyBrowserRuntimeBoundaryHostPreflight();
await verifyBrowserNextBoundaryRecommendations();
const interp = await createLinuxCncInterpSdk({

View File

@@ -9,6 +9,9 @@ INI_BOUNDARY_SUMMARY="$ROOT_DIR/build/wasm/sim-configs-inventory/ini-boundary-su
NATIVE_PROOF_ALIGNMENT_SUMMARY="$ROOT_DIR/build/wasm/sim-configs-inventory/native-proof-alignment-summary.tsv"
NATIVE_RUNTIME_PROBE_SUMMARY="$ROOT_DIR/build/wasm/sim-configs-inventory/native-runtime-probe-summary.tsv"
RUNTIME_BOUNDARY_NATIVE_ALIGNMENT_SUMMARY="$ROOT_DIR/build/wasm/sim-configs-inventory/runtime-boundary-native-alignment-summary.tsv"
RUNTIME_PROBE_GATE_ALIGNMENT="$ROOT_DIR/build/wasm/sim-configs-inventory/runtime-probe-gate-alignment.tsv"
NATIVE_RUNTIME_PROBE_EXECUTION_PLAN="$ROOT_DIR/build/wasm/sim-configs-inventory/native-runtime-probe-execution-plan.tsv"
NATIVE_RUNTIME_PROBE_PASS_EVIDENCE_CONTRACT="$ROOT_DIR/build/wasm/sim-configs-inventory/native-runtime-probe-pass-evidence-contract.tsv"
RUNTIME_BOUNDARY_CONTRACT_SUMMARY="$ROOT_DIR/build/wasm/sim-configs-inventory/runtime-boundary-contract-summary.tsv"
USER_M_PROCESS_NATIVE_STATE_ALIGNMENT="$ROOT_DIR/build/wasm/sim-configs-inventory/user-m-process-native-state-alignment.tsv"
USER_M_PROCESS_NATIVE_TRANSITION_ALIGNMENT="$ROOT_DIR/build/wasm/sim-configs-inventory/user-m-process-native-transition-alignment.tsv"
@@ -18,13 +21,19 @@ USER_M_PROCESS_NATIVE_RUNTIME_PROBE_GATE="$ROOT_DIR/build/wasm/sim-configs-inven
USER_M_PROCESS_TRANSITION_PLAN="$ROOT_DIR/build/wasm/sim-configs-inventory/user-m-process-transition-plan.tsv"
TOOL_DB_PROCESS_NATIVE_PROTOCOL_ALIGNMENT="$ROOT_DIR/build/wasm/sim-configs-inventory/tool-db-process-native-protocol-alignment.tsv"
TOOL_DB_PROCESS_NATIVE_RUNTIME_READINESS="$ROOT_DIR/build/wasm/sim-configs-inventory/tool-db-process-native-runtime-readiness.tsv"
TOOL_DB_PROCESS_NATIVE_RUNTIME_PROBE_GATE="$ROOT_DIR/build/wasm/sim-configs-inventory/tool-db-process-native-runtime-probe-gate.tsv"
TOOL_DB_PROCESS_TRANSACTION_PLAN="$ROOT_DIR/build/wasm/sim-configs-inventory/tool-db-process-transaction-plan.tsv"
PYTHON_REMAP_NATIVE_RUNTIME_ALIGNMENT="$ROOT_DIR/build/wasm/sim-configs-inventory/python-remap-native-runtime-alignment.tsv"
PYTHON_REMAP_NATIVE_RUNTIME_READINESS="$ROOT_DIR/build/wasm/sim-configs-inventory/python-remap-native-runtime-readiness.tsv"
PYTHON_REMAP_NATIVE_RUNTIME_PROBE_GATE="$ROOT_DIR/build/wasm/sim-configs-inventory/python-remap-native-runtime-probe-gate.tsv"
PYTHON_REMAP_NATIVE_RUNTIME_STATE_PLAN="$ROOT_DIR/build/wasm/sim-configs-inventory/python-remap-native-runtime-state-plan.tsv"
PYTHON_REMAP_NATIVE_RUNTIME_FIXTURE_PLAN="$ROOT_DIR/build/wasm/sim-configs-inventory/python-remap-native-runtime-fixture-plan.tsv"
PYTHON_REMAP_RUNTIME_CONTRACT="$ROOT_DIR/build/wasm/sim-configs-inventory/python-remap-runtime-contract.tsv"
BLOCKED_RUNTIME_PROMOTION_LOCK="$ROOT_DIR/build/wasm/sim-configs-inventory/blocked-runtime-promotion-lock.tsv"
RUNTIME_BOUNDARY_PROMOTION_READINESS="$ROOT_DIR/build/wasm/sim-configs-inventory/runtime-boundary-promotion-readiness.tsv"
RUNTIME_BOUNDARY_PROMOTION_BLOCKERS="$ROOT_DIR/build/wasm/sim-configs-inventory/runtime-boundary-promotion-blockers.tsv"
RUNTIME_BOUNDARY_POST_NATIVE_PASS_GATES="$ROOT_DIR/build/wasm/sim-configs-inventory/runtime-boundary-post-native-pass-gates.tsv"
RUNTIME_BOUNDARY_HOST_PREFLIGHT="$ROOT_DIR/build/wasm/sim-configs-inventory/runtime-boundary-host-preflight.tsv"
BOUNDARY_PHASE_COMPLETION_SUMMARY="$ROOT_DIR/build/wasm/sim-configs-inventory/boundary-phase-completion-summary.tsv"
NEXT_BOUNDARY_RECOMMENDATIONS="$ROOT_DIR/build/wasm/sim-configs-inventory/next-boundary-recommendations.tsv"
INVENTORY_SCRIPT="$ROOT_DIR/tests/wasm/node/verify_sim_configs_inventory_wasm.mjs"
@@ -49,6 +58,9 @@ for artifact in \
"$INI_BOUNDARY_SUMMARY" \
"$NATIVE_PROOF_ALIGNMENT_SUMMARY" \
"$RUNTIME_BOUNDARY_NATIVE_ALIGNMENT_SUMMARY" \
"$RUNTIME_PROBE_GATE_ALIGNMENT" \
"$NATIVE_RUNTIME_PROBE_EXECUTION_PLAN" \
"$NATIVE_RUNTIME_PROBE_PASS_EVIDENCE_CONTRACT" \
"$RUNTIME_BOUNDARY_CONTRACT_SUMMARY" \
"$USER_M_PROCESS_NATIVE_STATE_ALIGNMENT" \
"$USER_M_PROCESS_NATIVE_TRANSITION_ALIGNMENT" \
@@ -58,14 +70,20 @@ for artifact in \
"$USER_M_PROCESS_TRANSITION_PLAN" \
"$TOOL_DB_PROCESS_NATIVE_PROTOCOL_ALIGNMENT" \
"$TOOL_DB_PROCESS_NATIVE_RUNTIME_READINESS" \
"$TOOL_DB_PROCESS_NATIVE_RUNTIME_PROBE_GATE" \
"$TOOL_DB_PROCESS_TRANSACTION_PLAN" \
"$PYTHON_REMAP_NATIVE_RUNTIME_ALIGNMENT" \
"$PYTHON_REMAP_NATIVE_RUNTIME_READINESS" \
"$PYTHON_REMAP_NATIVE_RUNTIME_PROBE_GATE" \
"$PYTHON_REMAP_NATIVE_RUNTIME_STATE_PLAN" \
"$PYTHON_REMAP_NATIVE_RUNTIME_FIXTURE_PLAN" \
"$PYTHON_REMAP_RUNTIME_CONTRACT" \
"$NATIVE_RUNTIME_PROBE_SUMMARY" \
"$BLOCKED_RUNTIME_PROMOTION_LOCK" \
"$RUNTIME_BOUNDARY_PROMOTION_READINESS" \
"$RUNTIME_BOUNDARY_PROMOTION_BLOCKERS" \
"$RUNTIME_BOUNDARY_POST_NATIVE_PASS_GATES" \
"$RUNTIME_BOUNDARY_HOST_PREFLIGHT" \
"$BOUNDARY_PHASE_COMPLETION_SUMMARY" \
"$NEXT_BOUNDARY_RECOMMENDATIONS"; do
if [[ ! -f "$artifact" || "$INVENTORY_SCRIPT" -nt "$artifact" ]]; then
@@ -78,6 +96,27 @@ fi
if [[ -f "$NATIVE_RUNTIME_PROBE_SOURCE_SUMMARY" && "$NATIVE_RUNTIME_PROBE_SOURCE_SUMMARY" -nt "$NATIVE_RUNTIME_PROBE_SUMMARY" ]]; then
INVENTORY_REQUIRED=1
fi
if [[ -f "$NATIVE_RUNTIME_PROBE_SOURCE_SUMMARY" && "$NATIVE_RUNTIME_PROBE_SOURCE_SUMMARY" -nt "$RUNTIME_PROBE_GATE_ALIGNMENT" ]]; then
INVENTORY_REQUIRED=1
fi
if [[ -f "$NATIVE_RUNTIME_PROBE_SOURCE_SUMMARY" && "$NATIVE_RUNTIME_PROBE_SOURCE_SUMMARY" -nt "$NATIVE_RUNTIME_PROBE_EXECUTION_PLAN" ]]; then
INVENTORY_REQUIRED=1
fi
if [[ -f "$NATIVE_RUNTIME_PROBE_SOURCE_SUMMARY" && "$NATIVE_RUNTIME_PROBE_SOURCE_SUMMARY" -nt "$NATIVE_RUNTIME_PROBE_PASS_EVIDENCE_CONTRACT" ]]; then
INVENTORY_REQUIRED=1
fi
if [[ -f "$NATIVE_RUNTIME_PROBE_SOURCE_SUMMARY" && "$NATIVE_RUNTIME_PROBE_SOURCE_SUMMARY" -nt "$RUNTIME_BOUNDARY_PROMOTION_READINESS" ]]; then
INVENTORY_REQUIRED=1
fi
if [[ -f "$NATIVE_RUNTIME_PROBE_SOURCE_SUMMARY" && "$NATIVE_RUNTIME_PROBE_SOURCE_SUMMARY" -nt "$RUNTIME_BOUNDARY_PROMOTION_BLOCKERS" ]]; then
INVENTORY_REQUIRED=1
fi
if [[ -f "$NATIVE_RUNTIME_PROBE_SOURCE_SUMMARY" && "$NATIVE_RUNTIME_PROBE_SOURCE_SUMMARY" -nt "$RUNTIME_BOUNDARY_POST_NATIVE_PASS_GATES" ]]; then
INVENTORY_REQUIRED=1
fi
if [[ -f "$NATIVE_RUNTIME_PROBE_SOURCE_SUMMARY" && "$NATIVE_RUNTIME_PROBE_SOURCE_SUMMARY" -nt "$RUNTIME_BOUNDARY_HOST_PREFLIGHT" ]]; then
INVENTORY_REQUIRED=1
fi
if [[ "$INVENTORY_REQUIRED" == "1" ]]; then
SKIP_INTERP_BUILD=1 "$ROOT_DIR/tests/wasm/node/verify_sim_configs_inventory_wasm.sh"
fi

View File

@@ -77,11 +77,13 @@ print_kv millturn_user_m_promotion_allowed 0
if [[ "$source_ready" != "1" ]]; then
print_kv millturn_user_m_runtime_probe_status "blocked_missing_source"
print_kv millturn_user_m_runtime_probe_note "missing_source_requirements_keep_user_m_process_blocked"
exit 0
fi
if [[ "$runtime_ready" != "1" ]]; then
print_kv millturn_user_m_runtime_probe_status "skipped_missing_host_runtime"
print_kv millturn_user_m_runtime_probe_note "missing_host_runtime_requirements_keep_user_m_process_blocked"
exit 0
fi

View File

@@ -75,11 +75,13 @@ print_kv python_remap_promotion_allowed 0
if [[ "$source_ready" != "1" ]]; then
print_kv python_remap_runtime_probe_status "blocked_missing_source"
print_kv python_remap_runtime_probe_note "missing_source_requirements_keep_python_remap_blocked"
exit 0
fi
if [[ "$runtime_ready" != "1" ]]; then
print_kv python_remap_runtime_probe_status "skipped_missing_host_runtime"
print_kv python_remap_runtime_probe_note "missing_host_runtime_requirements_keep_python_remap_blocked"
exit 0
fi

View File

@@ -74,11 +74,13 @@ print_kv tool_db_promotion_allowed 0
if [[ "$source_ready" != "1" ]]; then
print_kv tool_db_runtime_probe_status "blocked_missing_source"
print_kv tool_db_runtime_probe_note "missing_source_requirements_keep_tool_db_process_blocked"
exit 0
fi
if [[ "$runtime_ready" != "1" ]]; then
print_kv tool_db_runtime_probe_status "skipped_missing_host_runtime"
print_kv tool_db_runtime_probe_note "missing_host_runtime_requirements_keep_tool_db_process_blocked"
exit 0
fi

View File

@@ -200,6 +200,8 @@ check_native_runtime_probe_summary_row() {
local boundary_kind="$2"
local target="$3"
local runtime_probe="$4"
local expected_required_native_proof="$5"
local expected_opt_in_env="$6"
local summary_file="$BUILD_DIR/native-runtime-probe-summary.tsv"
local row
@@ -224,17 +226,28 @@ check_native_runtime_probe_summary_row() {
local runtime_ready
local source_proof_ready
local required_native_proof
local opt_in_env
local probe_status
local execution_enabled
local promotion_allowed
local missing_requirements
local probe_note
local stdout_log
IFS=$'\t' read -r _ _ _ _ runtime_ready source_proof_ready probe_status execution_enabled promotion_allowed missing_requirements stdout_log <<< "$row"
IFS=$'\t' read -r _ _ _ _ required_native_proof opt_in_env runtime_ready source_proof_ready probe_status execution_enabled promotion_allowed missing_requirements probe_note stdout_log <<< "$row"
if [[ "$source_proof_ready" != "1" ]]; then
echo "$target runtime probe lacks source proof readiness: $source_proof_ready" >&2
exit 1
fi
if [[ "$required_native_proof" != "$expected_required_native_proof" ]]; then
echo "$target runtime probe required native proof drift: $required_native_proof" >&2
exit 1
fi
if [[ "$opt_in_env" != "$expected_opt_in_env" ]]; then
echo "$target runtime probe opt-in env drift: $opt_in_env" >&2
exit 1
fi
if [[ "$execution_enabled" != "0" || "$promotion_allowed" != "0" ]]; then
echo "$target runtime probe unexpectedly enables execution or promotion" >&2
exit 1
@@ -247,10 +260,26 @@ check_native_runtime_probe_summary_row() {
echo "$target runtime probe is not ready but did not skip: $probe_status" >&2
exit 1
fi
if [[ "$runtime_ready" == "0" && "$probe_note" != *"missing_host_runtime"* ]]; then
echo "$target runtime probe missing-runtime note drift: $probe_note" >&2
exit 1
fi
if [[ "$runtime_ready" == "1" && "$missing_requirements" != "-" ]]; then
echo "$target runtime probe is ready but lists missing requirements: $missing_requirements" >&2
exit 1
fi
if [[ "$probe_status" == "ready_disabled_by_default" && "$probe_note" != *"set_${opt_in_env%%=*}"* ]]; then
echo "$target runtime probe ready-disabled note drift: $probe_note" >&2
exit 1
fi
if [[ "$probe_status" == runtime_*_passed && "$probe_note" != *"without_promotion"* ]]; then
echo "$target runtime probe passed note drift: $probe_note" >&2
exit 1
fi
if [[ "$probe_note" == "-" || -z "$probe_note" ]]; then
echo "$target runtime probe lacks note" >&2
exit 1
fi
if [[ ! -f "$BUILD_DIR/$stdout_log" ]]; then
echo "$target runtime summary references missing stdout log: $stdout_log" >&2
exit 1
@@ -266,7 +295,7 @@ check_native_runtime_probe_summary() {
fi
local expected_header
expected_header=$'boundary_class\tboundary_kind\ttarget\truntime_probe\truntime_ready\tsource_proof_ready\tprobe_status\texecution_enabled\tpromotion_allowed\tmissing_requirements\tstdout_log'
expected_header=$'boundary_class\tboundary_kind\ttarget\truntime_probe\trequired_native_proof\topt_in_env\truntime_ready\tsource_proof_ready\tprobe_status\texecution_enabled\tpromotion_allowed\tmissing_requirements\tprobe_note\tstdout_log'
if [[ "$(sed -n '1p' "$summary_file")" != "$expected_header" ]]; then
echo "native runtime probe summary header drift: $summary_file" >&2
exit 1
@@ -283,17 +312,23 @@ check_native_runtime_probe_summary() {
L4-USER-M-PROCESS \
external_user_m_process \
axis/vismach/millturn/example.ngc \
linuxcnc_millturn_user_m_runtime_probe
linuxcnc_millturn_user_m_runtime_probe \
native_runtime_state_probe_required \
ENABLE_MILLTURN_USER_M_RUNTIME_PROBE=1
check_native_runtime_probe_summary_row \
L4-TOOL-DB \
tool_database_process \
axis/db_demo/base.ngc \
linuxcnc_tool_db_runtime_probe
linuxcnc_tool_db_runtime_probe \
native_db_process_protocol_probe_required \
ENABLE_TOOL_DB_RUNTIME_PROBE=1
check_native_runtime_probe_summary_row \
L4-PYTHON-REMAP \
python_runtime \
axis/remap/stop-lookahead/nc_files \
linuxcnc_python_remap_runtime_probe
linuxcnc_python_remap_runtime_probe \
linuxcnc_python_runtime_lifecycle_probe_required \
ENABLE_PYTHON_REMAP_RUNTIME_PROBE=1
}
check_source_probe_coverage
@@ -609,6 +644,7 @@ grep -Fq "millturn_user_m_runtime_requirements=" "$MILLTURN_USER_M_RUNTIME_STDOU
grep -Fq "millturn_user_m_source_proof_ready=1" "$MILLTURN_USER_M_RUNTIME_STDOUT"
grep -Fq "millturn_user_m_execution_enabled=0" "$MILLTURN_USER_M_RUNTIME_STDOUT"
grep -Fq "millturn_user_m_promotion_allowed=0" "$MILLTURN_USER_M_RUNTIME_STDOUT"
grep -Fq "millturn_user_m_runtime_probe_note=" "$MILLTURN_USER_M_RUNTIME_STDOUT"
if grep -Fq "millturn_user_m_runtime_ready=1" "$MILLTURN_USER_M_RUNTIME_STDOUT"; then
grep -Eq "millturn_user_m_runtime_probe_status=(ready_disabled_by_default|runtime_state_probe_passed)" \
"$MILLTURN_USER_M_RUNTIME_STDOUT"
@@ -648,6 +684,7 @@ grep -Fq "tool_db_runtime_requirements=" "$TOOL_DB_RUNTIME_STDOUT"
grep -Fq "tool_db_source_proof_ready=1" "$TOOL_DB_RUNTIME_STDOUT"
grep -Fq "tool_db_execution_enabled=0" "$TOOL_DB_RUNTIME_STDOUT"
grep -Fq "tool_db_promotion_allowed=0" "$TOOL_DB_RUNTIME_STDOUT"
grep -Fq "tool_db_runtime_probe_note=" "$TOOL_DB_RUNTIME_STDOUT"
if grep -Fq "tool_db_runtime_ready=1" "$TOOL_DB_RUNTIME_STDOUT"; then
grep -Eq "tool_db_runtime_probe_status=(ready_disabled_by_default|runtime_protocol_probe_passed)" \
"$TOOL_DB_RUNTIME_STDOUT"
@@ -697,6 +734,7 @@ grep -Fq "python_remap_runtime_modules=axis/remap/stop-lookahead/python/remap.py
grep -Fq "python_remap_source_proof_ready=1" "$PYTHON_REMAP_RUNTIME_STDOUT"
grep -Fq "python_remap_execution_enabled=0" "$PYTHON_REMAP_RUNTIME_STDOUT"
grep -Fq "python_remap_promotion_allowed=0" "$PYTHON_REMAP_RUNTIME_STDOUT"
grep -Fq "python_remap_runtime_probe_note=" "$PYTHON_REMAP_RUNTIME_STDOUT"
if grep -Fq "python_remap_runtime_ready=1" "$PYTHON_REMAP_RUNTIME_STDOUT"; then
grep -Eq "python_remap_runtime_probe_status=(ready_disabled_by_default|runtime_lifecycle_probe_passed)" \
"$PYTHON_REMAP_RUNTIME_STDOUT"

File diff suppressed because it is too large Load Diff