fix: trust green M3 status wiring

This commit is contained in:
Code Queue Review
2026-05-23 10:36:33 +00:00
parent 26a1cf9b6a
commit a0fbd8cdfa
11 changed files with 444 additions and 23 deletions
@@ -49,13 +49,14 @@ const requiredWebAssets = Object.freeze([
"live-status.mjs",
"runtime.mjs",
"gate-summary.mjs",
"wiring-status.mjs",
"workbench-hardware-panel.mjs",
"help.md",
"third_party/marked/marked.esm.js",
"third_party/marked/LICENSE"
]);
const liveIdentityWebAssets = Object.freeze(["index.html", "styles.css", "app.mjs", "live-status.mjs"]);
const liveIdentityWebAssets = Object.freeze(["index.html", "styles.css", "app.mjs", "live-status.mjs", "wiring-status.mjs"]);
const chineseWorkbenchLabels = Object.freeze([
"HWLAB 云工作台",
@@ -1550,6 +1551,7 @@ function readStaticFiles() {
styles: readText("web/hwlab-cloud-web/styles.css"),
app: readText("web/hwlab-cloud-web/app.mjs"),
liveStatus: readText("web/hwlab-cloud-web/live-status.mjs"),
wiringStatus: readText("web/hwlab-cloud-web/wiring-status.mjs"),
runtime: readText("web/hwlab-cloud-web/runtime.mjs"),
panel: readText("web/hwlab-cloud-web/workbench-hardware-panel.mjs"),
help: readText("web/hwlab-cloud-web/help.md")
@@ -1843,7 +1845,7 @@ function defaultHomepageHidesBackstage({ html }) {
return defaultHomepageForbiddenTerms.every((term) => !textHasForbiddenTerm(firstViewportText, term));
}
function defaultWorkspaceIsSanitized({ html, app }) {
function defaultWorkspaceIsSanitized({ html, app, wiringStatus }) {
const defaultShellText = visibleTextFromHtml(defaultFirstViewportHtml(html));
const userFacingBodies = [
functionBody(app, "codeAgentStatusMessage"),
@@ -1858,7 +1860,8 @@ function defaultWorkspaceIsSanitized({ html, app }) {
!/OPENAI_API_KEY|hwlab-code-agent-provider|Secret|secretRef|m3-route-required|waiting-for-dev-live|BLOCKED 凭证缺口|SOURCE fixture|DEV-LIVE/u.test(userFacingBodies) &&
/服务受阻/u.test(functionBody(app, "renderAgentChatStatus")) &&
/Code Agent 服务暂不可用/u.test(functionBody(app, "codeAgentBlockedSummary")) &&
/等待可信记录/u.test(functionBody(app, "renderWiringList"))
/wiringPresentationFromSummary/u.test(functionBody(app, "renderWiringList")) &&
/等待可信记录/u.test(functionBody(wiringStatus, "wiringPresentationFromSummary"))
);
}