Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.
Go aialertsdashboarddockerdocker-monitoringgohomelabinfrastructure-monitoringkubernetesmonitoringmspproxmoxproxmox-backup-serverproxmox-mail-gatewayproxmox-veself-hostedtruenastypescriptvspherewebhooks
Keep formatted empty responses out of topic review
pulse-triage[bot]0696163d6916
diff --git a/.github/scripts/issue-version-triage.cjs b/.github/scripts/issue-version-triage.cjsindex 31700858f8..b671c22681 100644--- a/.github/scripts/issue-version-triage.cjs+++ b/.github/scripts/issue-version-triage.cjs@@ -146,7 +146,13 @@ function classifyAdditionalActionableTopics(body) {const value = additionalActionableTopicsValue(body);if (value === null) return null;- const normalized = value+ // Ordinary inline formatting does not turn "None" into a second topic.+ // Keep block evidence, images and any qualifying text intact for review;+ // only a single paragraph can supply an explicit no-topic response.+ const blocks = lexer(value, { gfm: true });+ const text = blocks.length === 1 && blocks[0].type === "paragraph"+ ? inlineDeclarationText(blocks[0].tokens) : value;+ const normalized = text.trim().toLowerCase().replace(/[.!]+$/g, "");@@ -154,6 +160,7 @@ function classifyAdditionalActionableTopics(body) {return !new Set(["_no response_",+ "no response","n/a","na","no",@@ -169,14 +176,14 @@ function normalizeVersion(value) {return match ? match[1] : null;}-function inlineVersionText(tokens) {+function inlineDeclarationText(tokens) {return (tokens || []).map((token) => {- // A release link's label is evidence; its destination and title are not.+ // A link's visible label is evidence; its destination and title are not.// Unwrap only ordinary inline formatting, not images, struck-out values// or HTML. Code spans keep their literal text rather than parsing links// or comments inside them.if (["link", "strong", "em"].includes(token.type)) {- return inlineVersionText(token.tokens);+ return inlineDeclarationText(token.tokens);}if (["codespan", "escape"].includes(token.type)) return token.text;return token.raw || "";@@ -187,7 +194,7 @@ function normalizeLegacyVersionValue(value) {const raw = String(value).trim();const blocks = lexer(raw, { gfm: true });const text = blocks.length === 1 && blocks[0].type === "paragraph"- ? inlineVersionText(blocks[0].tokens) : raw;+ ? inlineDeclarationText(blocks[0].tokens) : raw;const visible = text.trim().replace(/^[`*_]+/, "");// Failed-install forms explicitly accept an attempted server archive. Its// packaging suffix is not part of the release version. Recognise only thediff --git a/.github/scripts/issue-version-triage.test.cjs b/.github/scripts/issue-version-triage.test.cjsindex e8ef68125d..c9b3016e98 100644--- a/.github/scripts/issue-version-triage.test.cjs+++ b/.github/scripts/issue-version-triage.test.cjs@@ -523,6 +523,79 @@ test("topic classification reads later paragraphs after an empty first line", ()}});+const formattedNoTopicResponses = [+ "**None**",+ "*None.*",+ "__N/A__",+ "`none known`",+ "**_No response_**",+ '[None](https://example.invalid/context "not another topic")',+];++test("visible no-topic responses stay empty through ordinary inline formatting", () => {+ for (const value of formattedNoTopicResponses) {+ const body = `### Additional actionable topics\n${value}\n\n### Pulse version\n6.5.0`;+ assert.equal(triage.internals.classifyAdditionalActionableTopics(body), false, value);+ }+});++test("no-topic formatting cannot discard qualifiers, block evidence or images", () => {+ for (const value of [+ "**None**, except the saved target changes after switching organisation.",+ "None\n\n**The backup issue also affects another host.**",+ "None\n\n```text\n### Pulse version\n6.5.0\n```",+ "- **None**\n- The saved target also changes.",+ "",+ "~~None~~",+ "`**None**`",+ "\\*None\\*",+ ]) {+ const body = `### Additional actionable topics\n${value}\n\n### Pulse version\n6.5.0`;+ assert.equal(triage.internals.classifyAdditionalActionableTopics(body), true, value);+ }+});++test("formatted no-topic edits preserve completed reviews without public contact", async () => {+ const labels = ["enhancement", "needs-human", "needs-retest-on-latest"];+ const body = value => `### Additional actionable topics\n${value}\n\n### Desired outcome\nKeep the current workflow.`;+ for (const value of formattedNoTopicResponses) {+ for (const reviewed of [false, true]) {+ for (const action of ["opened", "edited"]) {+ const { github, calls } = createGithub();+ const issueLabels = reviewed ? [...labels, "needs-decomposition"] : labels;+ const issue = { number: 2926, title: "Existing feature request", body: body(value),+ labels: issueLabels.map(name => ({ name })) };+ await syncLabels({ github, core: createCore(), context: createContext({+ action, issue, previousBody: body("None"),+ }) });+ assert.deepEqual(calls.addLabels, [], `${action}: ${value}`);+ assert.deepEqual(calls.removeLabel, [], value);+ assert.deepEqual(calls.createLabel, [], value);+ assert.deepEqual(calls.createComment, [], value);+ assert.deepEqual(calls.getLatestRelease, [], value);+ assert.deepEqual(calls.paginate, [], value);+ }+ }+ }+});++test("a qualified revision after a formatted empty response still requires review", async () => {+ for (const value of formattedNoTopicResponses) {+ const { github, calls } = createGithub();+ const body = topic => `### Additional actionable topics\n${topic}\n\n### Pulse version\n6.5.0`;+ const issue = { number: 2927, title: "Existing report", body: body(`${value}, except backup identity is also wrong.`),+ labels: ["enhancement", "needs-human"].map(name => ({ name })) };+ await syncLabels({ github, core: createCore(), context: createContext({+ action: "edited", issue, previousBody: body(value),+ }) });+ assert.deepEqual(calls.addLabels.map(call => call.labels), [["needs-decomposition"]], value);+ assert.deepEqual(calls.removeLabel, [], value);+ assert.deepEqual(calls.createComment, [], value);+ assert.deepEqual(calls.getLatestRelease, [], value);+ assert.deepEqual(calls.paginate, [], value);+ }+});+test("topic classification stops at form fields but retains topic subheadings", () => {const { classifyAdditionalActionableTopics } = triage.internals;for (const newline of ["\n", "\r\n"]) {