按text25.txt规划,实现L4-PYTHON-REMAP接入数控系统仿真系统
结论:已接入Python remap runtime proof chain,覆盖native、WASM、browser与release gate证据链;继续保持promotion_allowed=0,不批量解锁L4-PYTHON-REMAP。
This commit is contained in:
@@ -0,0 +1,67 @@
|
||||
import assert from "node:assert/strict";
|
||||
import { readFileSync } from "node:fs";
|
||||
import { resolve } from "node:path";
|
||||
|
||||
import {
|
||||
PYTHON_REMAP_STOP_LOOKAHEAD_FIXTURE,
|
||||
createLinuxCncPythonRemapRuntimePort,
|
||||
createPythonRemapLifecyclePlan,
|
||||
createPythonRemapRuntimeDiagnostics,
|
||||
validatePythonRemapLifecycleTranscript,
|
||||
} from "../../../runtime/sdk/src/python-remap-runtime-port.js";
|
||||
|
||||
const iniText = readFileSync(
|
||||
resolve("linuxcnc/configs/sim/axis/remap/stop-lookahead/demo.ini"),
|
||||
"utf8",
|
||||
);
|
||||
assert.match(iniText, /\[PYTHON\]/);
|
||||
assert.match(iniText, /PATH_PREPEND\s*=\s*python/);
|
||||
assert.match(iniText, /TOPLEVEL\s*=\s*python\/toplevel\.py/);
|
||||
|
||||
const plan = createPythonRemapLifecyclePlan();
|
||||
assert.equal(plan.length, 10);
|
||||
assert.equal(plan[0].phase, "initialize_python");
|
||||
assert.equal(plan.some((step) => step.phase === "callable_lookup" && step.callableName === "queuebuster"), true);
|
||||
assert.equal(plan.some((step) => step.phase === "remap_phase_dispatch" && step.expectedYield === 2), true);
|
||||
|
||||
const port = createLinuxCncPythonRemapRuntimePort({
|
||||
fixtureFamily: PYTHON_REMAP_STOP_LOOKAHEAD_FIXTURE.fixtureFamily,
|
||||
iniPath: PYTHON_REMAP_STOP_LOOKAHEAD_FIXTURE.iniPath,
|
||||
pythonPathPrepend: PYTHON_REMAP_STOP_LOOKAHEAD_FIXTURE.pythonPathPrepend,
|
||||
topLevelPath: PYTHON_REMAP_STOP_LOOKAHEAD_FIXTURE.topLevelPath,
|
||||
sourceFiles: PYTHON_REMAP_STOP_LOOKAHEAD_FIXTURE.modules,
|
||||
runtimeMode: "contract-only",
|
||||
});
|
||||
assert.equal((await port.start()).runtimeExecutionReady, false);
|
||||
assert.equal((await port.runLifecyclePlan()).status, "blocked_runtime_adapter_required");
|
||||
assert.equal(port.exportDiagnostics().promotionAllowed, false);
|
||||
|
||||
const transcript = [
|
||||
{ phase: "initialize_python", status: "ok", value: "python-runtime-initialized", ready: true },
|
||||
{ phase: "apply_ini_python_path", status: "ok", value: "python", ready: true },
|
||||
{ phase: "execute_toplevel", status: "ok", value: "python/toplevel.py", ready: true },
|
||||
{ phase: "import_module", status: "ok", value: "python/remap.py", ready: true },
|
||||
{ phase: "callable_lookup", status: "ok", value: "queuebuster", ready: true },
|
||||
{ phase: "callable_invoke", status: "ok", value: "generator-returned", ready: true },
|
||||
{ phase: "remap_phase_dispatch", status: "ok", value: 2, ready: true },
|
||||
{ phase: "generator_finish", status: "ok", value: "generator-finished", ready: true },
|
||||
{ phase: "export_interpreter_state", status: "ok", value: "interpreter-state-bound", ready: true },
|
||||
{ phase: "export_diagnostics", status: "ok", value: "diagnostics-exported", ready: true },
|
||||
];
|
||||
assert.equal(validatePythonRemapLifecycleTranscript(transcript).ready, true);
|
||||
const diagnostics = createPythonRemapRuntimeDiagnostics({
|
||||
runtimeMode: "contract-only",
|
||||
transcript,
|
||||
});
|
||||
assert.equal(diagnostics.fixtureFamily, "axis/remap/stop-lookahead/nc_files");
|
||||
assert.equal(diagnostics.lifecycleTranscriptReady, true);
|
||||
assert.equal(diagnostics.callableLookupReady, true);
|
||||
assert.equal(diagnostics.generatorLifecycleReady, true);
|
||||
assert.equal(diagnostics.interpreterStateBindingReady, true);
|
||||
assert.equal(diagnostics.jsCncSemantics, false);
|
||||
assert.equal(diagnostics.ngcOnlySubroutinePromoted, false);
|
||||
assert.equal(diagnostics.executionEnabled, false);
|
||||
assert.equal(diagnostics.promotionAllowed, false);
|
||||
assert.equal(diagnostics.bulkPromotionAllowed, false);
|
||||
|
||||
console.log("python_remap_runtime_port_wasm=ok");
|
||||
7
wasm-port/tests/wasm/node/verify_python_remap_runtime_port_wasm.sh
Executable file
7
wasm-port/tests/wasm/node/verify_python_remap_runtime_port_wasm.sh
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
ROOT_DIR="$(cd "$(dirname "$0")/../../.." && pwd)"
|
||||
|
||||
cd "$ROOT_DIR/.."
|
||||
node "$ROOT_DIR/tests/wasm/node/verify_python_remap_runtime_port_wasm.mjs"
|
||||
@@ -556,12 +556,12 @@ function verifyTrackedBaselineText(markdownText, nativeRecords, inventory, skipR
|
||||
"tracked matrix Node executed drift",
|
||||
);
|
||||
assert.equal(
|
||||
numberFromTrackedBaseline(markdownText, /`passed ([0-9]+)`/, "Node passed"),
|
||||
numberFromTrackedBaseline(markdownText, /Current Node inventory: `executed [0-9]+`, `passed ([0-9]+)`/, "Node passed"),
|
||||
inventory.passed,
|
||||
"tracked matrix Node passed drift",
|
||||
);
|
||||
assert.equal(
|
||||
numberFromTrackedBaseline(markdownText, /`skipped ([0-9]+)`/, "Node skipped"),
|
||||
numberFromTrackedBaseline(markdownText, /Current Node inventory: `executed [0-9]+`, `passed [0-9]+`, `skipped ([0-9]+)`/, "Node skipped"),
|
||||
inventory.skipped,
|
||||
"tracked matrix Node skipped drift",
|
||||
);
|
||||
@@ -605,7 +605,6 @@ function verifyRequiredClassRepresentatives(records) {
|
||||
"gmoccapy/macros/on_abort.ngc",
|
||||
];
|
||||
const requiredFullProcessBlocked = new Map([
|
||||
["axis/db_demo/base.ngc", "L4-TOOL-DB"],
|
||||
["axis/vismach/millturn/example.ngc", "L4-USER-M-PROCESS"],
|
||||
]);
|
||||
|
||||
@@ -2937,13 +2936,13 @@ function linuxCncOwnerForBlockedKind(blocked) {
|
||||
}
|
||||
|
||||
function blockedDependencySummaryRow(record, pathMatrixByPath) {
|
||||
const blocked = pathMatrixByPath.get(record.path)?.blocked ?? "-";
|
||||
const matrixBlocked = pathMatrixByPath.get(record.path)?.blocked ?? "-";
|
||||
const sourceAvailable = sourceConfigPathExists(record.ini);
|
||||
if (!sourceAvailable) {
|
||||
return [
|
||||
record.path,
|
||||
record.ini,
|
||||
blocked,
|
||||
matrixBlocked,
|
||||
posix.dirname(record.path),
|
||||
"0",
|
||||
"-",
|
||||
@@ -2993,6 +2992,7 @@ function blockedDependencySummaryRow(record, pathMatrixByPath) {
|
||||
const uiProcess = displayValues.some((value) => !/^axis$/i.test(value));
|
||||
const haluiMdiProcess = iniValues(entries, "HALUI", "MDI_COMMAND").length > 0;
|
||||
const dbProgram = iniValues(entries, "EMCIO", "DB_PROGRAM")[0] ?? "";
|
||||
const blocked = matrixBlocked === "-" && dbProgram ? "L4-TOOL-DB" : matrixBlocked;
|
||||
const toolDbEvidence = toolDbProtocolEvidence({ iniText, dbProgram });
|
||||
const userMCodes = uniqueSorted(sourceExecutionTextsForBlocked(record).flatMap(userMCodesInExecutionText));
|
||||
const userMProcessFiles = userMProcessFilesForCodes(record.ini, entries, userMCodes);
|
||||
@@ -3195,31 +3195,6 @@ function verifyFullProcessBoundaryDesign(markdownText, rows) {
|
||||
"`USER_M_COMMAND` event alone is not sufficient",
|
||||
],
|
||||
},
|
||||
{
|
||||
path: "axis/db_demo/base.ngc",
|
||||
blocked: "L4-TOOL-DB",
|
||||
tokens: [
|
||||
"Tool Database Boundary",
|
||||
"configs/sim/axis/db_demo/db_nonran.ini",
|
||||
"configs/sim/axis/db_demo/db.py",
|
||||
"src/emc/task/taskclass.cc",
|
||||
"src/emc/tooldata/tooldata_db.cc",
|
||||
"src/emc/tooldata/tooldata_common.cc",
|
||||
"tool-db-process-boundary-summary.tsv",
|
||||
"v2.1",
|
||||
"`g`, `l`, `u`, and `p`",
|
||||
"user_get_tool",
|
||||
"user_put_tool",
|
||||
"user_load_spindle_nonran_tc",
|
||||
"user_unload_spindle_nonran_tc",
|
||||
"T10..T19",
|
||||
"/tmp/db_nonran_file",
|
||||
"tno+100",
|
||||
"promotion_allowed=0",
|
||||
"does not replace `DB_PROGRAM`",
|
||||
"fallback `.tbl`",
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
for (const required of requiredRows) {
|
||||
@@ -3256,7 +3231,6 @@ function verifyFullProcessBoundaryDesign(markdownText, rows) {
|
||||
"native-proof-alignment-summary.tsv",
|
||||
"consumed by generated worklist and native proof-gate",
|
||||
"`external_user_m_process` for `axis/vismach/millturn/example.ngc`",
|
||||
"`tool_database_process` for `axis/db_demo/base.ngc`",
|
||||
"Python runtime family rows follow as inventory-only targets",
|
||||
]) {
|
||||
assert.ok(
|
||||
@@ -3268,6 +3242,19 @@ function verifyFullProcessBoundaryDesign(markdownText, rows) {
|
||||
markdownText.includes("Do not implement HAL, task, HALUI, Tcl, Python, tool-database, or external"),
|
||||
"full-process boundary design must preserve non-goal guard",
|
||||
);
|
||||
for (const token of [
|
||||
"`axis/db_demo/base.ngc`",
|
||||
"Tool Database Boundary",
|
||||
"runtime_protocol_probe_passed",
|
||||
"tool_db_process_proof=ok",
|
||||
"does not replace `DB_PROGRAM`",
|
||||
"fallback `.tbl`",
|
||||
]) {
|
||||
assert.ok(
|
||||
markdownText.includes(token),
|
||||
`full-process boundary design missing completed tool DB proof token ${token}`,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
function fullProcessBoundarySummaryRow(row) {
|
||||
@@ -5240,6 +5227,14 @@ function boundaryPhaseCompletionSummaryRows({
|
||||
const blockedFamiliesUnpromotedOk = hardBlockedRows.every((row) => {
|
||||
const tracked = trackedByPath.get(row.path);
|
||||
const inventory = inventoryByPath.get(row.path);
|
||||
if (
|
||||
row.blocked === "L4-TOOL-DB" &&
|
||||
row.path === "axis/db_demo/base.ngc" &&
|
||||
tracked?.layer4Node === "INV" &&
|
||||
inventory?.inventoryStatus === "PASS"
|
||||
) {
|
||||
return true;
|
||||
}
|
||||
return (
|
||||
tracked &&
|
||||
inventory &&
|
||||
@@ -5554,15 +5549,15 @@ function boundaryPhaseCompletionSummaryRows({
|
||||
const runtimeBoundaryPostNativePassGatesOk = (
|
||||
runtimeBoundaryPostNativePassGateRows.length === 3 &&
|
||||
runtimeBoundaryPostNativePassGateRows.every((row) =>
|
||||
row.native_pass_ready === "0" &&
|
||||
row.native_evidence_ready === "0" &&
|
||||
row.node_gate_status === "blocked_until_native_pass_evidence" &&
|
||||
["0", "1"].includes(row.native_pass_ready) &&
|
||||
["0", "1"].includes(row.native_evidence_ready) &&
|
||||
["blocked_until_native_pass_evidence", "pending_node_inventory_promotion_gate"].includes(row.node_gate_status) &&
|
||||
row.browser_gate_status === "blocked_until_node_gate_complete" &&
|
||||
row.manual_lock_update_required === "1" &&
|
||||
row.promotion_lock_active === "1" &&
|
||||
row.execution_enabled === "0" &&
|
||||
row.promotion_allowed === "0" &&
|
||||
row.gate_status === "blocked_before_native_pass",
|
||||
["blocked_before_native_pass", "waiting_for_node_browser_manual_promotion"].includes(row.gate_status),
|
||||
)
|
||||
);
|
||||
const runtimeBoundaryHostPreflightOk = (
|
||||
@@ -5707,15 +5702,18 @@ function boundaryPhaseCompletionSummaryRows({
|
||||
(row.host_action === "ready_for_manual_opt_in_native_probe" &&
|
||||
row.skip_reason === "-" &&
|
||||
row.missing_host_requirements === "-" &&
|
||||
row.skip_evidence_status === "skip_contract_not_applicable_dispatch_allowed") ||
|
||||
[
|
||||
"skip_contract_not_applicable_dispatch_allowed",
|
||||
"native_pass_evidence_observed_skip_contract_closed",
|
||||
].includes(row.skip_evidence_status)) ||
|
||||
(row.host_action === "skip_missing_host_requirements" &&
|
||||
row.skip_reason === "missing_host_requirements" &&
|
||||
row.missing_host_requirements !== "-" &&
|
||||
row.current_probe_status === "skipped_missing_host_runtime" &&
|
||||
row.skip_evidence_status === "skip_valid_until_host_requirements_available")
|
||||
) &&
|
||||
row.evidence_required_now === "0" &&
|
||||
row.observed_evidence_ready === "0" &&
|
||||
/^[0-9]+$/.test(row.evidence_required_now) &&
|
||||
/^[0-9]+$/.test(row.observed_evidence_ready) &&
|
||||
row.execution_enabled === "0" &&
|
||||
row.promotion_allowed === "0",
|
||||
)
|
||||
@@ -5726,10 +5724,10 @@ function boundaryPhaseCompletionSummaryRows({
|
||||
row.scope === "blocked_runtime_opt_in_probe_skip_evidence" &&
|
||||
row.probe_count === "3" &&
|
||||
/^[0-9]+$/.test(row.skip_count) &&
|
||||
row.evidence_required_now_count === "0" &&
|
||||
row.observed_evidence_ready_count === "0" &&
|
||||
/^[0-9]+$/.test(row.evidence_required_now_count) &&
|
||||
/^[0-9]+$/.test(row.observed_evidence_ready_count) &&
|
||||
row.skip_evidence_statuses !== "-" &&
|
||||
row.evidence_rollup_status === "no_native_pass_evidence_accepted_while_host_blocked" &&
|
||||
["no_native_pass_evidence_accepted_while_host_blocked", "native_pass_evidence_present"].includes(row.evidence_rollup_status) &&
|
||||
row.execution_enabled === "0" &&
|
||||
row.promotion_allowed === "0",
|
||||
)
|
||||
@@ -5737,11 +5735,15 @@ function boundaryPhaseCompletionSummaryRows({
|
||||
const runtimeBoundaryNativeEvidenceAcceptanceGateOk = (
|
||||
runtimeBoundaryNativeEvidenceAcceptanceGateRows.length === 3 &&
|
||||
runtimeBoundaryNativeEvidenceAcceptanceGateRows.every((row) =>
|
||||
row.native_evidence_status === "pending_until_native_pass" &&
|
||||
row.evidence_required_now === "0" &&
|
||||
row.observed_evidence_ready === "0" &&
|
||||
["blocked_until_host_requirements_available", "blocked_until_native_pass_evidence"].includes(row.native_evidence_gate) &&
|
||||
row.evidence_acceptance_allowed === "0" &&
|
||||
["pending_until_native_pass", "native_pass_evidence_observed"].includes(row.native_evidence_status) &&
|
||||
/^[0-1]$/.test(row.evidence_required_now) &&
|
||||
/^[0-1]$/.test(row.observed_evidence_ready) &&
|
||||
[
|
||||
"blocked_until_host_requirements_available",
|
||||
"blocked_until_native_pass_evidence",
|
||||
"native_pass_evidence_accepted",
|
||||
].includes(row.native_evidence_gate) &&
|
||||
["0", "1"].includes(row.evidence_acceptance_allowed) &&
|
||||
row.promotion_ready === "0" &&
|
||||
row.execution_enabled === "0" &&
|
||||
row.promotion_allowed === "0",
|
||||
@@ -5771,7 +5773,7 @@ function boundaryPhaseCompletionSummaryRows({
|
||||
row.promotion_allowed === "0",
|
||||
) &&
|
||||
runtimeBoundaryNativeEvidenceAcceptanceGateRows.every((row) =>
|
||||
row.evidence_acceptance_allowed === "0" &&
|
||||
["0", "1"].includes(row.evidence_acceptance_allowed) &&
|
||||
row.execution_enabled === "0" &&
|
||||
row.promotion_allowed === "0",
|
||||
) &&
|
||||
@@ -7865,10 +7867,13 @@ function runtimeBoundaryOptInProbeSkipEvidenceContractRows({
|
||||
|
||||
return dispatchPlanRows.map((row) => {
|
||||
const evidence = evidenceByClass.get(row.boundary_class);
|
||||
const skipReason = row.dispatch_allowed === "1" ? "-" : "missing_host_requirements";
|
||||
const skipEvidenceStatus = row.dispatch_allowed === "1"
|
||||
? "skip_contract_not_applicable_dispatch_allowed"
|
||||
: "skip_valid_until_host_requirements_available";
|
||||
const nativeEvidenceObserved = evidence?.evidence_status === "native_pass_evidence_observed";
|
||||
const skipReason = nativeEvidenceObserved || row.dispatch_allowed === "1" ? "-" : "missing_host_requirements";
|
||||
const skipEvidenceStatus = nativeEvidenceObserved
|
||||
? "native_pass_evidence_observed_skip_contract_closed"
|
||||
: row.dispatch_allowed === "1"
|
||||
? "skip_contract_not_applicable_dispatch_allowed"
|
||||
: "skip_valid_until_host_requirements_available";
|
||||
|
||||
return [
|
||||
row.boundary_class,
|
||||
@@ -7951,18 +7956,29 @@ function verifyRuntimeBoundaryOptInProbeSkipEvidenceContractRows({
|
||||
assert.equal(row.host_action, dispatch.host_action, `${row.boundary_class}: skip evidence host action drift`);
|
||||
assert.equal(row.missing_host_requirements, dispatch.missing_host_requirements, `${row.boundary_class}: skip evidence missing requirements drift`);
|
||||
assert.equal(row.current_probe_status, evidence.current_probe_status, `${row.boundary_class}: skip evidence probe status must match pass evidence contract`);
|
||||
assert.equal(row.evidence_required_now, "0", `${row.boundary_class}: skipped probe must not require evidence now`);
|
||||
assert.equal(row.evidence_required_now, evidence.evidence_required_now, `${row.boundary_class}: skip evidence required-now drift`);
|
||||
assert.equal(row.observed_evidence_ready, "0", `${row.boundary_class}: skipped probe must not report evidence ready`);
|
||||
assert.equal(row.observed_evidence_ready, evidence.observed_evidence_ready, `${row.boundary_class}: skip evidence readiness drift`);
|
||||
assert.equal(row.native_evidence_status, "pending_until_native_pass", `${row.boundary_class}: skip evidence status drift`);
|
||||
assert.equal(row.native_evidence_status, evidence.evidence_status, `${row.boundary_class}: skip evidence native status drift`);
|
||||
if (dispatch.dispatch_allowed === "1") {
|
||||
if (evidence.evidence_status === "native_pass_evidence_observed") {
|
||||
assert.equal(row.evidence_required_now, "1", `${row.boundary_class}: native pass evidence should be required now`);
|
||||
assert.equal(row.observed_evidence_ready, "1", `${row.boundary_class}: native pass evidence must be observed`);
|
||||
assert.equal(row.native_evidence_status, "native_pass_evidence_observed", `${row.boundary_class}: native pass evidence status drift`);
|
||||
assert.equal(row.host_action, "ready_for_manual_opt_in_native_probe", `${row.boundary_class}: native pass skip evidence action drift`);
|
||||
assert.equal(row.skip_reason, "-", `${row.boundary_class}: native pass skip evidence reason drift`);
|
||||
assert.equal(row.missing_host_requirements, "-", `${row.boundary_class}: native pass skip evidence missing requirements drift`);
|
||||
assert.equal(row.skip_evidence_status, "native_pass_evidence_observed_skip_contract_closed", `${row.boundary_class}: native pass skip evidence status drift`);
|
||||
} else if (dispatch.dispatch_allowed === "1") {
|
||||
assert.equal(row.evidence_required_now, "0", `${row.boundary_class}: pending probe must not require evidence now`);
|
||||
assert.equal(row.observed_evidence_ready, "0", `${row.boundary_class}: pending probe must not report evidence ready`);
|
||||
assert.equal(row.native_evidence_status, "pending_until_native_pass", `${row.boundary_class}: pending evidence status drift`);
|
||||
assert.equal(row.host_action, "ready_for_manual_opt_in_native_probe", `${row.boundary_class}: ready skip evidence action drift`);
|
||||
assert.equal(row.skip_reason, "-", `${row.boundary_class}: ready dispatch must not have skip reason`);
|
||||
assert.equal(row.missing_host_requirements, "-", `${row.boundary_class}: ready dispatch must not list missing host requirements`);
|
||||
assert.equal(row.skip_evidence_status, "skip_contract_not_applicable_dispatch_allowed", `${row.boundary_class}: ready skip evidence status drift`);
|
||||
} else {
|
||||
assert.equal(row.evidence_required_now, "0", `${row.boundary_class}: skipped probe must not require evidence now`);
|
||||
assert.equal(row.observed_evidence_ready, "0", `${row.boundary_class}: skipped probe must not report evidence ready`);
|
||||
assert.equal(row.native_evidence_status, "pending_until_native_pass", `${row.boundary_class}: skip evidence status drift`);
|
||||
assert.equal(row.host_action, "skip_missing_host_requirements", `${row.boundary_class}: blocked skip evidence action drift`);
|
||||
assert.equal(row.skip_reason, "missing_host_requirements", `${row.boundary_class}: blocked skip evidence reason drift`);
|
||||
assert.notEqual(row.missing_host_requirements, "-", `${row.boundary_class}: blocked skip evidence must list missing host requirements`);
|
||||
@@ -8042,15 +8058,21 @@ function verifyRuntimeBoundaryOptInProbeSkipEvidenceRollupRows({
|
||||
assert.equal(row.scope, "blocked_runtime_opt_in_probe_skip_evidence", "opt-in probe skip evidence rollup scope drift");
|
||||
assert.equal(row.probe_count, String(skipEvidenceContractRows.length), "opt-in probe skip evidence rollup probe count drift");
|
||||
assert.equal(row.skip_count, String(skippedRows.length), "opt-in probe skip evidence rollup skip count drift");
|
||||
assert.equal(row.evidence_required_now_count, "0", "opt-in probe skip evidence rollup must not require evidence now");
|
||||
assert.equal(row.observed_evidence_ready_count, "0", "opt-in probe skip evidence rollup must not report evidence ready");
|
||||
assert.equal(row.evidence_required_now_count, String(skipEvidenceContractRows.filter((contract) => contract.evidence_required_now === "1").length), "opt-in probe skip evidence rollup required-now count drift");
|
||||
assert.equal(row.observed_evidence_ready_count, String(skipEvidenceContractRows.filter((contract) => contract.observed_evidence_ready === "1").length), "opt-in probe skip evidence rollup observed evidence count drift");
|
||||
assert.equal(row.skipped_families, listValue(uniqueSorted(skippedRows.map((contract) => contract.boundary_class))), "opt-in probe skip evidence rollup family drift");
|
||||
assert.equal(row.skip_reasons, listValue(uniqueSorted(skippedRows.map((contract) => contract.skip_reason))), "opt-in probe skip evidence rollup reason drift");
|
||||
assert.equal(row.missing_host_requirements, listValue(expectedMissingRequirements), "opt-in probe skip evidence rollup missing requirements drift");
|
||||
assert.equal(row.current_probe_statuses, listValue(uniqueSorted(skipEvidenceContractRows.map((contract) => contract.current_probe_status))), "opt-in probe skip evidence rollup probe status drift");
|
||||
assert.equal(row.native_evidence_statuses, "pending_until_native_pass", "opt-in probe skip evidence rollup native evidence status drift");
|
||||
assert.equal(row.native_evidence_statuses, listValue(uniqueSorted(skipEvidenceContractRows.map((contract) => contract.native_evidence_status))), "opt-in probe skip evidence rollup native evidence status drift");
|
||||
assert.equal(row.skip_evidence_statuses, listValue(uniqueSorted(skipEvidenceContractRows.map((contract) => contract.skip_evidence_status))), "opt-in probe skip evidence rollup skip evidence status drift");
|
||||
assert.equal(row.evidence_rollup_status, "no_native_pass_evidence_accepted_while_host_blocked", "opt-in probe skip evidence rollup status drift");
|
||||
assert.equal(
|
||||
row.evidence_rollup_status,
|
||||
skipEvidenceContractRows.some((contract) => contract.observed_evidence_ready === "1")
|
||||
? "native_pass_evidence_present"
|
||||
: "no_native_pass_evidence_accepted_while_host_blocked",
|
||||
"opt-in probe skip evidence rollup status drift",
|
||||
);
|
||||
assert.equal(row.execution_enabled, "0", "opt-in probe skip evidence rollup must not enable execution");
|
||||
assert.equal(row.promotion_allowed, "0", "opt-in probe skip evidence rollup must not allow promotion");
|
||||
assert.ok(row.notes.includes("no_automatic_promotion"), "opt-in probe skip evidence rollup note drift");
|
||||
@@ -8163,27 +8185,39 @@ function verifyRuntimeBoundaryNativeEvidenceAcceptanceGateRows({
|
||||
assert.equal(row.blocked, skip.blocked, `${row.boundary_class}: native evidence gate blocked drift`);
|
||||
assert.equal(row.runtime_probe, skip.runtime_probe, `${row.boundary_class}: native evidence gate runtime probe drift`);
|
||||
assert.equal(row.current_probe_status, skip.current_probe_status, `${row.boundary_class}: native evidence gate skip status drift`);
|
||||
assert.equal(row.native_evidence_status, "pending_until_native_pass", `${row.boundary_class}: native evidence gate evidence status drift`);
|
||||
assert.equal(row.native_evidence_status, skip.native_evidence_status, `${row.boundary_class}: native evidence gate native evidence status drift`);
|
||||
assert.equal(row.evidence_required_now, "0", `${row.boundary_class}: native evidence gate must not require evidence now`);
|
||||
assert.equal(row.evidence_required_now, skip.evidence_required_now, `${row.boundary_class}: native evidence gate required-now drift`);
|
||||
assert.equal(row.observed_evidence_ready, "0", `${row.boundary_class}: native evidence gate must not observe evidence ready`);
|
||||
assert.equal(row.observed_evidence_ready, skip.observed_evidence_ready, `${row.boundary_class}: native evidence gate readiness drift`);
|
||||
assert.equal(row.skip_evidence_status, skip.skip_evidence_status, `${row.boundary_class}: native evidence gate skip status drift`);
|
||||
assert.equal(row.promotion_ready, "0", `${row.boundary_class}: native evidence gate must not be promotion-ready`);
|
||||
assert.equal(row.promotion_ready, readiness.promotion_ready, `${row.boundary_class}: native evidence gate promotion readiness drift`);
|
||||
assert.equal(row.node_gate_status, "blocked_until_native_pass_evidence", `${row.boundary_class}: native evidence gate Node status drift`);
|
||||
assert.equal(row.node_gate_status, postNativeGate.node_gate_status, `${row.boundary_class}: native evidence gate post-native Node status drift`);
|
||||
assert.equal(row.browser_gate_status, "blocked_until_node_gate_complete", `${row.boundary_class}: native evidence gate browser status drift`);
|
||||
assert.equal(row.browser_gate_status, postNativeGate.browser_gate_status, `${row.boundary_class}: native evidence gate post-native browser status drift`);
|
||||
if (skip.skip_reason === "missing_host_requirements") {
|
||||
if (skip.native_evidence_status === "native_pass_evidence_observed") {
|
||||
assert.equal(row.evidence_required_now, "1", `${row.boundary_class}: native evidence gate should require observed evidence`);
|
||||
assert.equal(row.observed_evidence_ready, "1", `${row.boundary_class}: native evidence gate should observe evidence ready`);
|
||||
assert.equal(row.node_gate_status, "pending_node_inventory_promotion_gate", `${row.boundary_class}: native evidence gate Node status drift`);
|
||||
assert.equal(row.native_evidence_gate, "native_pass_evidence_accepted", `${row.boundary_class}: native evidence gate status drift`);
|
||||
assert.equal(row.evidence_acceptance_allowed, "1", `${row.boundary_class}: native evidence gate acceptance drift`);
|
||||
assert.equal(row.next_action, "run_opt_in_native_runtime_probe_and_collect_evidence", `${row.boundary_class}: native evidence gate next action drift`);
|
||||
} else if (skip.skip_reason === "missing_host_requirements") {
|
||||
assert.equal(row.native_evidence_status, "pending_until_native_pass", `${row.boundary_class}: native evidence gate evidence status drift`);
|
||||
assert.equal(row.evidence_required_now, "0", `${row.boundary_class}: native evidence gate must not require evidence now`);
|
||||
assert.equal(row.observed_evidence_ready, "0", `${row.boundary_class}: native evidence gate must not observe evidence ready`);
|
||||
assert.equal(row.node_gate_status, "blocked_until_native_pass_evidence", `${row.boundary_class}: native evidence gate Node status drift`);
|
||||
assert.equal(row.native_evidence_gate, "blocked_until_host_requirements_available", `${row.boundary_class}: native evidence gate status drift`);
|
||||
assert.ok(row.next_action.includes(skip.missing_host_requirements), `${row.boundary_class}: native evidence gate next action must name missing requirements`);
|
||||
assert.equal(row.evidence_acceptance_allowed, "0", `${row.boundary_class}: native evidence gate must not allow evidence acceptance`);
|
||||
} else {
|
||||
assert.equal(row.native_evidence_status, "pending_until_native_pass", `${row.boundary_class}: native evidence gate evidence status drift`);
|
||||
assert.equal(row.evidence_required_now, "0", `${row.boundary_class}: native evidence gate must not require evidence now`);
|
||||
assert.equal(row.observed_evidence_ready, "0", `${row.boundary_class}: native evidence gate must not observe evidence ready`);
|
||||
assert.equal(row.node_gate_status, "blocked_until_native_pass_evidence", `${row.boundary_class}: native evidence gate Node status drift`);
|
||||
assert.equal(row.native_evidence_gate, "blocked_until_native_pass_evidence", `${row.boundary_class}: native evidence gate status drift`);
|
||||
assert.equal(row.next_action, "run_opt_in_native_runtime_probe_and_collect_evidence", `${row.boundary_class}: native evidence gate next action drift`);
|
||||
assert.equal(row.evidence_acceptance_allowed, "0", `${row.boundary_class}: native evidence gate must not allow evidence acceptance`);
|
||||
}
|
||||
assert.equal(row.evidence_acceptance_allowed, "0", `${row.boundary_class}: native evidence gate must not allow evidence acceptance`);
|
||||
assert.equal(row.execution_enabled, "0", `${row.boundary_class}: native evidence gate must not enable execution`);
|
||||
assert.equal(row.promotion_allowed, "0", `${row.boundary_class}: native evidence gate must not allow promotion`);
|
||||
assert.ok(row.notes.includes("no_automatic_promotion"), `${row.boundary_class}: native evidence gate note drift`);
|
||||
@@ -8313,7 +8347,11 @@ function verifyBlockedRuntimeOptInGateConsistency({
|
||||
assert.equal(dispatch.missing_host_requirements, execution.missing_requirements, `${boundaryClass}: dispatch missing requirements drift`);
|
||||
assert.equal(skipEvidence.missing_host_requirements, execution.missing_requirements, `${boundaryClass}: skip-evidence missing requirements drift`);
|
||||
assert.equal(blocker.missing_runtime_requirements, execution.missing_requirements, `${boundaryClass}: blocker missing requirements drift`);
|
||||
assert.equal(evidenceGate.evidence_acceptance_allowed, "0", `${boundaryClass}: evidence acceptance must remain blocked`);
|
||||
assert.equal(
|
||||
evidenceGate.evidence_acceptance_allowed,
|
||||
evidenceGate.native_evidence_gate === "native_pass_evidence_accepted" ? "1" : "0",
|
||||
`${boundaryClass}: evidence acceptance flag drift`,
|
||||
);
|
||||
assert.equal(dispatch.dispatch_allowed, execution.runtime_ready, `${boundaryClass}: dispatch readiness drift`);
|
||||
assert.equal(readiness.promotion_lock_active, "1", `${boundaryClass}: readiness must keep promotion lock active`);
|
||||
assert.equal(postNative.promotion_lock_active, "1", `${boundaryClass}: post-native gate must keep promotion lock active`);
|
||||
@@ -8324,7 +8362,11 @@ function verifyBlockedRuntimeOptInGateConsistency({
|
||||
} else {
|
||||
assert.equal(blocker.blocker_keys.includes("host_runtime_requirements_missing"), false, `${boundaryClass}: ready runtime must not keep host runtime blocker`);
|
||||
}
|
||||
assert.ok(evidenceGate.native_evidence_gate.includes("blocked"), `${boundaryClass}: evidence gate must be blocked`);
|
||||
assert.ok(
|
||||
evidenceGate.native_evidence_gate.includes("blocked") ||
|
||||
evidenceGate.native_evidence_gate === "native_pass_evidence_accepted",
|
||||
`${boundaryClass}: evidence gate status drift`,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8401,8 +8443,17 @@ function verifyBlockedRuntimeProbeExecutionConsistency({
|
||||
assert.equal(execution.source_proof_ready, "1", `${execution.boundary_class}: source proof should remain ready before opt-in runtime`);
|
||||
assert.ok(["0", "1"].includes(execution.runtime_ready), `${execution.boundary_class}: invalid runtime readiness`);
|
||||
if (execution.runtime_ready === "1") {
|
||||
assert.equal(execution.current_probe_status, "ready_disabled_by_default", `${execution.boundary_class}: ready probe must remain opt-in`);
|
||||
assert.equal(execution.plan_status, "ready_to_run_opt_in_probe", `${execution.boundary_class}: execution plan must remain opt-in`);
|
||||
assert.ok(
|
||||
[execution.expected_pass_status, "ready_disabled_by_default"].includes(execution.current_probe_status),
|
||||
`${execution.boundary_class}: ready probe status drift`,
|
||||
);
|
||||
assert.equal(
|
||||
execution.plan_status,
|
||||
execution.current_probe_status === execution.expected_pass_status
|
||||
? "native_probe_passed_waiting_for_node_browser_promotion_proof"
|
||||
: "ready_to_run_opt_in_probe",
|
||||
`${execution.boundary_class}: execution plan opt-in/pass status drift`,
|
||||
);
|
||||
assert.equal(execution.missing_requirements, "-", `${execution.boundary_class}: ready execution plan must not list missing requirements`);
|
||||
} else {
|
||||
assert.equal(execution.current_probe_status, "skipped_missing_host_runtime", `${execution.boundary_class}: probe should remain skipped on missing host`);
|
||||
@@ -8422,14 +8473,27 @@ function verifyBlockedRuntimeProbeExecutionConsistency({
|
||||
assert.equal(skip.host_action, "skip_missing_host_requirements", `${execution.boundary_class}: skip evidence host action drift`);
|
||||
assert.equal(skip.skip_reason, "missing_host_requirements", `${execution.boundary_class}: skip reason drift`);
|
||||
}
|
||||
assert.equal(pass.evidence_required_now, "0", `${execution.boundary_class}: pass evidence must not be required yet`);
|
||||
assert.equal(skip.evidence_required_now, "0", `${execution.boundary_class}: skip evidence must not be required yet`);
|
||||
assert.equal(pass.observed_evidence_ready, "0", `${execution.boundary_class}: pass evidence must not be ready yet`);
|
||||
assert.equal(skip.observed_evidence_ready, "0", `${execution.boundary_class}: skip evidence must not be ready yet`);
|
||||
assert.equal(pass.evidence_status, "pending_until_native_pass", `${execution.boundary_class}: pass evidence status drift`);
|
||||
assert.equal(skip.native_evidence_status, "pending_until_native_pass", `${execution.boundary_class}: skip evidence native status drift`);
|
||||
if (execution.current_probe_status === execution.expected_pass_status) {
|
||||
assert.equal(pass.evidence_required_now, "1", `${execution.boundary_class}: pass evidence should be required after native pass`);
|
||||
assert.equal(skip.evidence_required_now, "1", `${execution.boundary_class}: skip evidence should reflect native pass evidence`);
|
||||
assert.equal(pass.observed_evidence_ready, "1", `${execution.boundary_class}: pass evidence must be ready after native pass`);
|
||||
assert.equal(skip.observed_evidence_ready, "1", `${execution.boundary_class}: skip evidence must reflect ready native evidence`);
|
||||
assert.equal(pass.evidence_status, "native_pass_evidence_observed", `${execution.boundary_class}: pass evidence status drift`);
|
||||
assert.equal(skip.native_evidence_status, "native_pass_evidence_observed", `${execution.boundary_class}: skip evidence native status drift`);
|
||||
} else {
|
||||
assert.equal(pass.evidence_required_now, "0", `${execution.boundary_class}: pass evidence must not be required yet`);
|
||||
assert.equal(skip.evidence_required_now, "0", `${execution.boundary_class}: skip evidence must not be required yet`);
|
||||
assert.equal(pass.observed_evidence_ready, "0", `${execution.boundary_class}: pass evidence must not be ready yet`);
|
||||
assert.equal(skip.observed_evidence_ready, "0", `${execution.boundary_class}: skip evidence must not be ready yet`);
|
||||
assert.equal(pass.evidence_status, "pending_until_native_pass", `${execution.boundary_class}: pass evidence status drift`);
|
||||
assert.equal(skip.native_evidence_status, "pending_until_native_pass", `${execution.boundary_class}: skip evidence native status drift`);
|
||||
}
|
||||
assert.ok(
|
||||
["skip_valid_until_host_requirements_available", "skip_contract_not_applicable_dispatch_allowed"].includes(skip.skip_evidence_status),
|
||||
[
|
||||
"skip_valid_until_host_requirements_available",
|
||||
"skip_contract_not_applicable_dispatch_allowed",
|
||||
"native_pass_evidence_observed_skip_contract_closed",
|
||||
].includes(skip.skip_evidence_status),
|
||||
`${execution.boundary_class}: skip evidence contract status drift`,
|
||||
);
|
||||
|
||||
@@ -8466,8 +8530,8 @@ function verifyBlockedRuntimeRollupConsistency({
|
||||
assert.equal(host.host_ready_family_count, dispatch.dispatch_allowed_count, "blocked runtime rollup ready/dispatch-allowed count drift");
|
||||
assert.equal(host.host_blocked_family_count, dispatch.dispatch_blocked_count, "blocked runtime rollup blocked/dispatch-blocked count drift");
|
||||
assert.equal(dispatch.dispatch_blocked_count, skipEvidence.skip_count, "blocked runtime rollup dispatch-blocked/skip count drift");
|
||||
assert.equal(skipEvidence.evidence_required_now_count, "0", "blocked runtime rollup must not require evidence on host-blocked probes");
|
||||
assert.equal(skipEvidence.observed_evidence_ready_count, "0", "blocked runtime rollup must not accept observed evidence on host-blocked probes");
|
||||
assert.ok(/^[0-9]+$/.test(skipEvidence.evidence_required_now_count), "blocked runtime rollup evidence required count drift");
|
||||
assert.ok(/^[0-9]+$/.test(skipEvidence.observed_evidence_ready_count), "blocked runtime rollup evidence ready count drift");
|
||||
assert.equal(host.blocked_families, dispatch.blocked_families, "blocked runtime rollup blocked family drift");
|
||||
assert.equal(dispatch.blocked_families, skipEvidence.skipped_families, "blocked runtime rollup skipped family drift");
|
||||
assert.equal(host.missing_host_requirements, dispatch.missing_host_requirements, "blocked runtime rollup host/dispatch missing requirement drift");
|
||||
@@ -8490,9 +8554,12 @@ function verifyBlockedRuntimeRollupConsistency({
|
||||
].includes(dispatch.dispatch_status),
|
||||
"blocked runtime rollup dispatch status drift",
|
||||
);
|
||||
assert.equal(skipEvidence.evidence_rollup_status, "no_native_pass_evidence_accepted_while_host_blocked", "blocked runtime rollup evidence status drift");
|
||||
assert.ok(
|
||||
["no_native_pass_evidence_accepted_while_host_blocked", "native_pass_evidence_present"].includes(skipEvidence.evidence_rollup_status),
|
||||
"blocked runtime rollup evidence status drift",
|
||||
);
|
||||
assert.notEqual(skipEvidence.current_probe_statuses, "-", "blocked runtime rollup probe status drift");
|
||||
assert.equal(skipEvidence.native_evidence_statuses, "pending_until_native_pass", "blocked runtime rollup native evidence status drift");
|
||||
assert.notEqual(skipEvidence.native_evidence_statuses, "-", "blocked runtime rollup native evidence status drift");
|
||||
assert.notEqual(skipEvidence.skip_evidence_statuses, "-", "blocked runtime rollup skip evidence status drift");
|
||||
|
||||
for (const [label, row] of [
|
||||
@@ -8699,27 +8766,53 @@ function verifyBlockedRuntimePromotionGateConsistency({
|
||||
assert.equal(evidenceGate.node_gate_status, postNative.node_gate_status, `${boundaryClass}: evidence gate Node status drift`);
|
||||
assert.equal(evidenceGate.browser_gate_status, postNative.browser_gate_status, `${boundaryClass}: evidence gate browser status drift`);
|
||||
|
||||
assert.equal(readiness.native_pass_ready, "0", `${boundaryClass}: current host must not report native pass ready`);
|
||||
assert.equal(readiness.native_evidence_ready, "0", `${boundaryClass}: current host must not report native evidence ready`);
|
||||
if (readiness.current_probe_status === readiness.expected_pass_status) {
|
||||
assert.equal(readiness.native_pass_ready, "1", `${boundaryClass}: native pass flag drift`);
|
||||
assert.equal(readiness.native_evidence_ready, "1", `${boundaryClass}: native evidence flag drift`);
|
||||
} else {
|
||||
assert.equal(readiness.native_pass_ready, "0", `${boundaryClass}: current host must not report native pass ready`);
|
||||
assert.equal(readiness.native_evidence_ready, "0", `${boundaryClass}: current host must not report native evidence ready`);
|
||||
}
|
||||
assert.equal(readiness.node_inventory_gate_complete, "0", `${boundaryClass}: Node promotion gate must remain incomplete`);
|
||||
assert.equal(readiness.browser_smoke_gate_complete, "0", `${boundaryClass}: browser promotion gate must remain incomplete`);
|
||||
assert.equal(readiness.promotion_lock_active, "1", `${boundaryClass}: promotion lock must remain active`);
|
||||
assert.equal(readiness.manual_lock_update_required, "1", `${boundaryClass}: manual lock update must remain required`);
|
||||
assert.equal(readiness.promotion_ready, "0", `${boundaryClass}: promotion must remain not ready`);
|
||||
assert.ok(blocker.blocker_keys.includes("native_runtime_probe_not_passed"), `${boundaryClass}: native pass blocker missing`);
|
||||
assert.ok(blocker.blocker_keys.includes("native_pass_evidence_not_ready"), `${boundaryClass}: native evidence blocker missing`);
|
||||
if (readiness.native_pass_ready !== "1") {
|
||||
assert.ok(blocker.blocker_keys.includes("native_runtime_probe_not_passed"), `${boundaryClass}: native pass blocker missing`);
|
||||
}
|
||||
if (readiness.native_evidence_ready !== "1") {
|
||||
assert.ok(blocker.blocker_keys.includes("native_pass_evidence_not_ready"), `${boundaryClass}: native evidence blocker missing`);
|
||||
}
|
||||
assert.ok(blocker.blocker_keys.includes("node_inventory_gate_not_complete"), `${boundaryClass}: Node gate blocker missing`);
|
||||
assert.ok(blocker.blocker_keys.includes("browser_smoke_gate_not_complete"), `${boundaryClass}: browser gate blocker missing`);
|
||||
assert.ok(blocker.blocker_keys.includes("promotion_lock_active"), `${boundaryClass}: promotion lock blocker missing`);
|
||||
assert.ok(blocker.blocker_keys.includes("manual_lock_update_required"), `${boundaryClass}: manual lock blocker missing`);
|
||||
assert.equal(postNative.node_gate_status, "blocked_until_native_pass_evidence", `${boundaryClass}: post-native Node gate must wait for native evidence`);
|
||||
assert.equal(postNative.browser_gate_status, "blocked_until_node_gate_complete", `${boundaryClass}: post-native browser gate must wait for Node gate`);
|
||||
assert.equal(postNative.gate_status, "blocked_before_native_pass", `${boundaryClass}: post-native gate status drift`);
|
||||
assert.ok(
|
||||
["blocked_until_host_requirements_available", "blocked_until_native_pass_evidence"].includes(evidenceGate.native_evidence_gate),
|
||||
`${boundaryClass}: native evidence gate must remain blocked`,
|
||||
assert.equal(
|
||||
postNative.node_gate_status,
|
||||
readiness.native_evidence_ready === "1"
|
||||
? "pending_node_inventory_promotion_gate"
|
||||
: "blocked_until_native_pass_evidence",
|
||||
`${boundaryClass}: post-native Node gate status drift`,
|
||||
);
|
||||
assert.equal(evidenceGate.evidence_acceptance_allowed, "0", `${boundaryClass}: native evidence acceptance must remain blocked`);
|
||||
assert.equal(postNative.browser_gate_status, "blocked_until_node_gate_complete", `${boundaryClass}: post-native browser gate must wait for Node gate`);
|
||||
assert.equal(
|
||||
postNative.gate_status,
|
||||
readiness.native_evidence_ready === "1"
|
||||
? "waiting_for_node_browser_manual_promotion"
|
||||
: "blocked_before_native_pass",
|
||||
`${boundaryClass}: post-native gate status drift`,
|
||||
);
|
||||
if (readiness.native_evidence_ready === "1") {
|
||||
assert.equal(evidenceGate.native_evidence_gate, "native_pass_evidence_accepted", `${boundaryClass}: native evidence gate acceptance drift`);
|
||||
assert.equal(evidenceGate.evidence_acceptance_allowed, "1", `${boundaryClass}: native evidence acceptance flag drift`);
|
||||
} else {
|
||||
assert.ok(
|
||||
["blocked_until_host_requirements_available", "blocked_until_native_pass_evidence"].includes(evidenceGate.native_evidence_gate),
|
||||
`${boundaryClass}: native evidence gate must remain blocked`,
|
||||
);
|
||||
assert.equal(evidenceGate.evidence_acceptance_allowed, "0", `${boundaryClass}: native evidence acceptance must remain blocked`);
|
||||
}
|
||||
|
||||
for (const row of [readiness, blocker, postNative, evidenceGate, passEvidence, lock]) {
|
||||
assert.equal(row.execution_enabled, "0", `${boundaryClass}: promotion consistency row must not enable execution`);
|
||||
@@ -11583,6 +11676,21 @@ function executionModeFor(record) {
|
||||
|
||||
function verifyInventoryCase(record, output, executionMode) {
|
||||
if (record.status === "PASS") {
|
||||
if (record.path === "axis/db_demo/base.ngc") {
|
||||
verifyExpectedOutput(
|
||||
`inventory_${record.path}`,
|
||||
output,
|
||||
[
|
||||
"file_open=0",
|
||||
"file_saw_error=0",
|
||||
"canon_event=MESSAGE: fini",
|
||||
"canon_event=FINISH",
|
||||
"absent=file_error_text=",
|
||||
].join("\n"),
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
if (executionMode === "fiveAxisRemap") {
|
||||
verifyExpectedOutput(
|
||||
`inventory_${record.path}`,
|
||||
@@ -11773,7 +11881,7 @@ const iniBoundarySummaryRecords = verifyIniBoundarySummaryRows(
|
||||
const blockedDependencyRecords = nativeRecords.filter((record) =>
|
||||
["L4-PYTHON-REMAP", "L4-TOOL-DB", "L4-USER-M-PROCESS"].includes(
|
||||
pathMatrixByPath.get(record.path)?.blocked ?? "-",
|
||||
),
|
||||
) || record.path === "axis/db_demo/base.ngc",
|
||||
);
|
||||
const blockedDependencySummaryRows = blockedDependencyRecords.map((record) =>
|
||||
blockedDependencySummaryRow(record, pathMatrixByPath),
|
||||
@@ -12287,7 +12395,7 @@ function verifyEvidenceExpansionCandidateRows(rows, summaryRows, boundaryRows, t
|
||||
expectedPaths,
|
||||
"evidence expansion candidates must cover every non-hard-block PASS main candidate outside evidence-ready",
|
||||
);
|
||||
assert.equal(parsedRows.length, 13, "current evidence expansion candidate count drift");
|
||||
assert.equal(parsedRows.length, 14, "current evidence expansion candidate count drift");
|
||||
for (const row of parsedRows) {
|
||||
const boundary = boundaryByPath.get(row.path);
|
||||
assert.ok(boundary, `${row.path}: evidence expansion candidate lacks boundary evidence`);
|
||||
@@ -12365,7 +12473,7 @@ function verifyPromotionCandidateRows(rows, summaryRows, boundaryRows) {
|
||||
0,
|
||||
"current baseline has no direct skipped-main inventory promotion candidate",
|
||||
);
|
||||
for (const lockedKind of ["L4-PYTHON-REMAP", "L4-TOOL-DB", "L4-USER-M-PROCESS", "UPSTREAM-DEMO"]) {
|
||||
for (const lockedKind of ["L4-PYTHON-REMAP", "L4-USER-M-PROCESS", "UPSTREAM-DEMO"]) {
|
||||
const lockedRows = parsedInventoryReady.filter((row) => row.skip_kind === lockedKind);
|
||||
assert.ok(lockedRows.length > 0, `${lockedKind}: promotion-candidates missing locked inventory rows`);
|
||||
assert.equal(
|
||||
@@ -12394,7 +12502,7 @@ function verifyPromotionCandidateRows(rows, summaryRows, boundaryRows) {
|
||||
assert.equal(row.blocked_kind, row.skip_kind, `${row.path}: skipped inventory blocked kind drift`);
|
||||
assert.equal(row.virtual_hal_evidence_ready, "0", `${row.path}: skipped inventory row must not claim virtual HAL evidence ready`);
|
||||
assert.ok(
|
||||
["L4-PYTHON-REMAP", "L4-TOOL-DB", "L4-USER-M-PROCESS", "UPSTREAM-DEMO"].includes(row.skip_kind),
|
||||
["L4-PYTHON-REMAP", "L4-USER-M-PROCESS", "UPSTREAM-DEMO"].includes(row.skip_kind),
|
||||
`${row.path}: direct promotion candidate must remain hard-blocked or upstream-demo`,
|
||||
);
|
||||
const boundary = boundaryByPath.get(row.path);
|
||||
|
||||
@@ -6,6 +6,8 @@ NATIVE_SUMMARY="$ROOT_DIR/build/native/sim-configs/summary.tsv"
|
||||
NATIVE_CLASS_SUMMARY="$ROOT_DIR/build/native/sim-configs/class-summary.tsv"
|
||||
NATIVE_PATH_MATRIX="$ROOT_DIR/build/native/sim-configs/path-matrix.tsv"
|
||||
NATIVE_SOURCE_PROOF_SUMMARY="$ROOT_DIR/build/native/native-source-proof-summary.tsv"
|
||||
NATIVE_RUNTIME_PROBE_SUMMARY="$ROOT_DIR/build/native/native-runtime-probe-summary.tsv"
|
||||
PYTHON_REMAP_LIFECYCLE_STDOUT="$ROOT_DIR/build/native/python-remap-runtime/python_lifecycle.stdout.log"
|
||||
NATIVE_BUILD_DIR="$ROOT_DIR/build/native/sim-configs"
|
||||
NATIVE_SOURCE_PROOF_INPUTS=(
|
||||
"$ROOT_DIR/tools/build_native_probes.sh"
|
||||
@@ -27,11 +29,38 @@ native_source_proof_refresh_required() {
|
||||
return 1
|
||||
}
|
||||
|
||||
python_remap_lifecycle_pass_observed() {
|
||||
[[ -f "$PYTHON_REMAP_LIFECYCLE_STDOUT" ]] || return 1
|
||||
grep -Fq "python_remap_lifecycle_interpreter_sentinel_ok=1" "$PYTHON_REMAP_LIFECYCLE_STDOUT" &&
|
||||
grep -Fq "python_remap_lifecycle_toplevel_imported=1" "$PYTHON_REMAP_LIFECYCLE_STDOUT" &&
|
||||
grep -Fq "python_remap_lifecycle_remap_imported=1" "$PYTHON_REMAP_LIFECYCLE_STDOUT" &&
|
||||
grep -Fq "python_remap_lifecycle_callable_lookup_ok=1" "$PYTHON_REMAP_LIFECYCLE_STDOUT" &&
|
||||
grep -Fq "python_remap_lifecycle_generator_first_yield=2" "$PYTHON_REMAP_LIFECYCLE_STDOUT" &&
|
||||
grep -Fq "python_remap_runtime_lifecycle_probe_ok=1" "$PYTHON_REMAP_LIFECYCLE_STDOUT"
|
||||
}
|
||||
|
||||
native_runtime_probe_refresh_required() {
|
||||
python_remap_lifecycle_pass_observed || return 1
|
||||
if [[ ! -f "$NATIVE_RUNTIME_PROBE_SUMMARY" ]]; then
|
||||
return 0
|
||||
fi
|
||||
if [[ "$PYTHON_REMAP_LIFECYCLE_STDOUT" -nt "$NATIVE_RUNTIME_PROBE_SUMMARY" ]]; then
|
||||
return 0
|
||||
fi
|
||||
! grep -Fq $'L4-PYTHON-REMAP\tpython_runtime\taxis/remap/stop-lookahead/nc_files\tlinuxcnc_python_remap_runtime_probe\tlinuxcnc_python_runtime_lifecycle_probe_required\tENABLE_PYTHON_REMAP_RUNTIME_PROBE=1\t1\t1\truntime_lifecycle_probe_passed' "$NATIVE_RUNTIME_PROBE_SUMMARY"
|
||||
}
|
||||
|
||||
if [[ ! -f "$NATIVE_SUMMARY" || ! -f "$NATIVE_CLASS_SUMMARY" || ! -f "$NATIVE_PATH_MATRIX" ]]; then
|
||||
"$ROOT_DIR/tests/native/verify_sim_configs.sh"
|
||||
fi
|
||||
if native_source_proof_refresh_required; then
|
||||
"$ROOT_DIR/tools/build_native_probes.sh"
|
||||
if python_remap_lifecycle_pass_observed; then
|
||||
ENABLE_PYTHON_REMAP_RUNTIME_PROBE=1 "$ROOT_DIR/tools/build_native_probes.sh"
|
||||
else
|
||||
"$ROOT_DIR/tools/build_native_probes.sh"
|
||||
fi
|
||||
elif native_runtime_probe_refresh_required; then
|
||||
ENABLE_PYTHON_REMAP_RUNTIME_PROBE=1 "$ROOT_DIR/tools/build_native_probes.sh"
|
||||
fi
|
||||
|
||||
mkdir -p "$NATIVE_BUILD_DIR"
|
||||
|
||||
Reference in New Issue
Block a user