按text22收束promotion证据

结论:完成 evidence-ready / inventory-ready 双层 promotion candidate 管理,release/SDK gate 已纳入 virtual HAL promotion summary,baseline 保持 28/28/131/0,Python remap、tool DB、external user-M hard block 继续 locked。
This commit is contained in:
2026-06-18 17:20:29 +08:00
parent 014081f1f9
commit 1c94ea4527
29 changed files with 8500 additions and 121 deletions

View File

@@ -683,6 +683,40 @@
font-weight: 700;
margin-right: 4px;
}
.promotion-family-panel {
grid-column: 1 / -1;
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 4px 7px;
border-top: 1px solid #c4c9cc;
padding-top: 4px;
}
.promotion-family-panel div {
border: 1px solid #b5bcc1;
background: #f1f1f1;
padding: 3px 4px;
}
.promotion-candidate-panel {
grid-column: 1 / -1;
display: grid;
grid-template-columns: repeat(4, minmax(0, 1fr));
gap: 4px 7px;
border-top: 1px solid #c4c9cc;
padding-top: 4px;
}
.promotion-candidate-panel div {
min-height: 27px;
border: 1px solid #b5bcc1;
background: #f7f7f7;
padding: 3px 4px;
}
.promotion-candidate-panel strong {
display: block;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
color: var(--text);
}
.status-history {
border-top: 1px solid var(--line);
background: #f2f2f2;
@@ -1709,6 +1743,8 @@ M2
<div><span>Last error</span><strong data-diagnostics="last-error">none</strong></div>
<div><span>Readiness</span><strong data-diagnostics="readiness">unchecked</strong></div>
<div><span>Shortcut</span><strong data-diagnostics="shortcut">-</strong></div>
<div class="promotion-family-panel" data-promotion-family-rows></div>
<div class="promotion-candidate-panel" data-promotion-candidate-summary></div>
<div class="tool-table-mini" data-axis-shell="tool-table">
<table aria-label="Loaded tool table">
<thead>
@@ -2553,6 +2589,99 @@ M2
});
}
function renderPromotionFamilyRows(report = createVirtualHalSimConfigPromotionCandidateReport()) {
const container = document.querySelector("[data-promotion-family-rows]");
if (!container) {
return [];
}
const rows = Array.isArray(report.familyRows) ? report.familyRows : [];
container.textContent = "";
document.body.dataset.promotionFamilyReady = rows.every((row) =>
row.complete === true && row.explicitBrowserDiagnosticsReady === true
) ? "true" : "false";
document.body.dataset.promotionFamilyCount = String(rows.length);
for (const row of rows) {
const item = document.createElement("div");
item.dataset.promotionFamilyRow = row.id ?? "unknown";
item.dataset.promotionFamilyReady = row.complete === true && row.explicitBrowserDiagnosticsReady === true ? "true" : "false";
const label = document.createElement("span");
label.textContent = row.id ?? "unknown";
const value = document.createElement("strong");
value.dataset.promotionFamilyValue = row.id ?? "unknown";
value.textContent = `${row.completeCount ?? 0}/${row.candidateCount ?? 0} ready; sources=${row.sourceFiles?.length ?? 0}`;
item.append(label, value);
container.append(item);
}
return rows;
}
function createVirtualHalPromotionCandidateSummary(
report = createVirtualHalSimConfigPromotionCandidateReport(),
) {
const rows = Array.isArray(report.rows) ? report.rows : [];
const familyRows = Array.isArray(report.familyRows) ? report.familyRows : [];
const preferredCandidate = rows.find((row) => row.id === "qtdragon-multi-joint-on-abort") ?? rows[0] ?? null;
const readyRows = rows.filter((row) => row.complete === true);
const blockedRows = rows.filter((row) => row.blockedKind !== "-");
const explicitBrowserRows = rows.filter((row) => row.targetBrowserEvidence === "explicit-browser-diagnostics");
const sourceFiles = [...new Set(rows.flatMap((row) => row.sourceFiles ?? []))];
const ready = report.complete === true &&
readyRows.length === rows.length &&
blockedRows.length === 0 &&
explicitBrowserRows.length === rows.length &&
report.inventoryBaselineUnchanged === true;
return {
apiName: "real-browser-simulation-promotion-candidate-summary",
summaryVersion: 1,
phase: ready ? "ready" : "blocked",
ready,
candidateCount: rows.length,
readyCandidateCount: readyRows.length,
familyCount: familyRows.length,
sourceFileCount: sourceFiles.length,
preferredCandidateId: preferredCandidate?.id ?? null,
preferredIniPath: preferredCandidate?.iniPath ?? null,
preferredGcodePath: preferredCandidate?.gcodePath ?? null,
blockedCandidateIds: blockedRows.map((row) => row.id),
explicitBrowserDiagnosticsCount: explicitBrowserRows.length,
inventoryBaseline: "executed=28 passed=28 skipped=131 unexpected_fail=0",
sourceFiles,
rows: [
{ id: "candidate-count", label: "Candidates", value: `${readyRows.length}/${rows.length} ready` },
{ id: "family-count", label: "Families", value: `${familyRows.length}` },
{ id: "preferred-candidate", label: "First case", value: preferredCandidate?.id ?? "missing" },
{ id: "source-files", label: "Source files", value: `${sourceFiles.length}` },
{ id: "inventory-baseline", label: "Inventory", value: "28/28 pass; 131 skip unchanged" },
{ id: "blocked-candidates", label: "Hard blocks", value: blockedRows.length === 0 ? "excluded" : blockedRows.map((row) => row.id).join(", ") },
{ id: "browser-evidence", label: "Browser evidence", value: `${explicitBrowserRows.length}/${rows.length} explicit` },
{ id: "preferred-ini", label: "INI", value: preferredCandidate?.iniPath ?? "missing" },
],
};
}
function renderPromotionCandidateSummary(summary = createVirtualHalPromotionCandidateSummary()) {
const container = document.querySelector("[data-promotion-candidate-summary]");
if (!container) {
return summary;
}
container.textContent = "";
document.body.dataset.promotionCandidateReady = summary.ready ? "true" : "false";
document.body.dataset.promotionCandidateCount = String(summary.candidateCount);
document.body.dataset.promotionCandidatePreferred = summary.preferredCandidateId ?? "";
for (const row of summary.rows) {
const item = document.createElement("div");
item.dataset.promotionCandidateSummaryRow = row.id;
const label = document.createElement("span");
label.textContent = row.label;
const value = document.createElement("strong");
value.dataset.promotionCandidateSummaryValue = row.id;
value.textContent = row.value;
item.append(label, value);
container.append(item);
}
return summary;
}
function renderMachineStatusDom(machineStatus) {
const statusMap = {
"spindle-state": machineStatus.spindle.state,
@@ -2591,6 +2720,9 @@ M2
renderVirtualHalDro();
}
renderLimitsHomeState(createVirtualHalLimitsHomeState());
const promotionCandidateReport = createVirtualHalSimConfigPromotionCandidateReport();
renderPromotionFamilyRows(promotionCandidateReport);
renderPromotionCandidateSummary(createVirtualHalPromotionCandidateSummary(promotionCandidateReport));
document.querySelector("[data-axis-machine-control-state]")?.setAttribute("data-state", "ready");
return cloneVirtualHalState();
}
@@ -2642,6 +2774,7 @@ M2
virtualHalSourceCompliance: createVirtualHalSourceComplianceReport(),
virtualHalSimConfigSourceCoverage: createVirtualHalSimConfigSourceCoverageReport(),
virtualHalSimConfigPromotionCandidates: createVirtualHalSimConfigPromotionCandidateReport(),
virtualHalPromotionCandidateSummary: createVirtualHalPromotionCandidateSummary(),
virtualHalSimConfigMacroLoadFixtures: createVirtualHalSimConfigMacroLoadFixtureReport(),
virtualHalCommandScriptFixtures: createVirtualHalCommandScriptFixtureReport(),
virtualHalMotionControllerMatrix: createVirtualHalMotionControllerMatrixReport(),
@@ -4081,6 +4214,8 @@ M2
getVirtualHalSourceComplianceReport: () => createVirtualHalSourceComplianceReport(),
getVirtualHalSimConfigSourceCoverageReport: () => createVirtualHalSimConfigSourceCoverageReport(),
getVirtualHalSimConfigPromotionCandidateReport: () => createVirtualHalSimConfigPromotionCandidateReport(),
getVirtualHalPromotionCandidateSummary: () => renderPromotionCandidateSummary(),
getVirtualHalPromotionFamilyRows: () => renderPromotionFamilyRows(),
getVirtualHalSimConfigMacroLoadFixtureReport: () => createVirtualHalSimConfigMacroLoadFixtureReport(),
getVirtualHalCommandScriptFixtureReport: () => createVirtualHalCommandScriptFixtureReport(),
getVirtualHalMotionControllerMatrixReport: () => createVirtualHalMotionControllerMatrixReport(),

View File

@@ -19,6 +19,7 @@ export {
VIRTUAL_HAL_AXES,
VIRTUAL_HAL_AXISUI_PINS,
VIRTUAL_HAL_MOTION_CONTROLLER_MATRIX_FIXTURES,
VIRTUAL_HAL_SIM_CONFIG_MACRO_LOAD_AUDIT_CANDIDATES,
VIRTUAL_HAL_SIM_CONFIG_MACRO_LOAD_BLOCKED_FIXTURES,
VIRTUAL_HAL_SIM_CONFIG_MACRO_LOAD_FIXTURES,
VIRTUAL_HAL_SIM_CONFIG_PROMOTION_CANDIDATES,