Skip to content

armgit / Pulse

Public Imported from GitHub
0

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.

Do not infer failing versions from upgrade transitions

pulse-triage[bot]bbc300116b4a
diff --git a/.github/scripts/issue-version-triage.cjs b/.github/scripts/issue-version-triage.cjs
index 01c379b4fc..7acff75ffa 100644
--- a/.github/scripts/issue-version-triage.cjs
+++ b/.github/scripts/issue-version-triage.cjs
@@ -186,6 +186,16 @@ function normalizeVersion(value) {
return match ? match[1] : null;
}
+function declaredVersionIsTransition(value) {
+ const first = normalizeVersion(value);
+ if (!first) return false;
+ const remaining = value.slice(value.indexOf(first) + first.length);
+ // A source -> target sequence is not a declaration of the failing runtime.
+ // Neither endpoint proves that the upgrade completed or which version was
+ // observed after recovery. Do not infer either one, or mine another field.
+ return /^[ \t]*(?:[-=]>|[→←↔]|&(?:rarr|larr|harr|#8594|#x2192);|to\b)[ \t]*(?:v?\d|(?:pulse(?:[ \t]+pro)?|server)[ \t]+v?\d|(?:[a-z0-9._/-]+\/)?pulse(?:-pro)?[:_-]v?\d|unknown\b|latest\b)/i.test(remaining);
+}
+
function inlineDeclarationText(tokens) {
return (tokens || []).map((token) => {
// A link's visible label is evidence; its destination and title are not.
@@ -206,6 +216,7 @@ function normalizeLegacyVersionValue(value, body) {
const text = blocks.length === 1 && blocks[0].type === "paragraph"
? inlineDeclarationText(blocks[0].tokens) : raw;
const visible = text.trim().replace(/^[`*_]+/, "");
+ if (declaredVersionIsTransition(visible)) return null;
// Failed-install forms explicitly accept an attempted server archive. Its
// packaging suffix is not part of the release version. Recognise only the
// Community and Pro server archive names; companion binaries and signatures
@@ -236,13 +247,14 @@ function extractTitlePulseVersion(title) {
const declared = text.match(new RegExp(
String.raw`\bpulse(?:[ \t]+pro)?[ \t]+(?:version[ \t]*[:=]?[ \t]*)?(${version})`, "i"
)) || text.match(new RegExp(String.raw`\bpulse(?:-pro)?:(${version})`, "i"));
- if (declared) return normalizeVersion(declared[1]);
+ if (declared) return declaredVersionIsTransition(text.slice(declared.index))
+ ? null : normalizeVersion(declared[1]);
// Retain legacy version-first titles and the neutral "Bug on v..." form.
// Do not search through another product's name to reach its version.
const neutral = text.replace(/^\[(?:bug|v6 pre-release)\][ \t]*:?[ \t]*/i, "");
const leading = neutral.match(new RegExp(String.raw`^(?:bug[ \t]+on[ \t]+)?(${version})`, "i"));
- return leading ? normalizeVersion(leading[1]) : null;
+ return leading && !declaredVersionIsTransition(neutral) ? normalizeVersion(leading[1]) : null;
}
function extractPulseVersion(title, body) {
diff --git a/.github/scripts/issue-version-triage.test.cjs b/.github/scripts/issue-version-triage.test.cjs
index f18ce5b7d1..c901bc2a6e 100644
--- a/.github/scripts/issue-version-triage.test.cjs
+++ b/.github/scripts/issue-version-triage.test.cjs
@@ -2285,6 +2285,74 @@ test("title fallback retains explicit Pulse and neutral version-leading declarat
assert.equal(extractPulseVersion("Upgrade from Pulse 6.4.5 to Pulse 6.5.0", "Legacy report."), null);
});
+test("version-field transitions do not assert a failing source or target release", () => {
+ const { extractPulseVersion } = triage.internals;
+ for (const value of [
+ "6.5.0 → 6.6.0-rc.1",
+ "v6.5.0->v6.6.0-rc.1",
+ "6.5.0 => unknown",
+ "6.5.0 to latest",
+ "6.5.0 → 6.6.0-rc.1",
+ "**6.5.0** to **6.6.0-rc.1**",
+ "`6.5.0 → 6.6.0-rc.1` (recovered to 6.5.0)",
+ "[6.5.0](https://example.invalid/6.4.5) → [6.6.0-rc.1](https://example.invalid/6.4.5)",
+ "server 6.5.0 → server 6.6.0-rc.1",
+ "rcourtman/pulse:6.5.0 → rcourtman/pulse:6.6.0-rc.1",
+ "pulse-pro-v6.5.0-linux-amd64.tar.gz → pulse-pro-v6.6.0-rc.1-linux-amd64.tar.gz",
+ ]) {
+ for (const field of ["### Pulse version\n", "Pulse version: ", "- **Pulse version**: "]) {
+ for (const newline of ["\n", "\r\n"]) {
+ const body = `${field}${value}\n\n### Agent version\n6.5.0\n\n` +
+ "### Upgrade attempt and recovery\nRecovered to 6.5.0; failing executable unknown.";
+ assert.equal(extractPulseVersion("Pulse 6.4.5 upgrade failed",
+ body.replaceAll("\n", newline)), null, body);
+ }
+ }
+ }
+});
+
+test("title transitions stay ambiguous without discarding a separately declared failing runtime", () => {
+ const { extractPulseVersion } = triage.internals;
+ for (const title of [
+ "Pulse 6.5.0 → 6.6.0-rc.1 failed",
+ "[Bug]: v6.5.0 to v6.6.0-rc.1 failed",
+ "[Bug]: rcourtman/pulse:6.5.0 => rcourtman/pulse:6.6.0-rc.1",
+ "6.5.0 → unknown after recovery",
+ ]) {
+ assert.equal(extractPulseVersion(title, "Legacy report."), null, title);
+ assert.equal(extractPulseVersion(title, "### Pulse version\n6.6.0-rc.1"), "6.6.0-rc.1", title);
+ }
+ for (const [value, expected] of [
+ ["6.6.0-rc.1 (upgraded from 6.5.0)", "6.6.0-rc.1"],
+ ["6.5.0 to reproduce the backup failure", "6.5.0"],
+ ["rcourtman/pulse:6.6.0-rc.1; agent 6.5.0", "6.6.0-rc.1"],
+ ]) {
+ assert.equal(extractPulseVersion("Upgrade from v6.4.5", `### Pulse version\n${value}`), expected);
+ }
+ assert.equal(extractPulseVersion("TrueNAS 25.04.0 → 25.10.0 fails in Pulse 6.5.0",
+ "Legacy report."), "6.5.0");
+});
+
+test("transition metadata consumer preserves Community state without inferring a release or contacting the reporter", async () => {
+ for (const [title, body] of [
+ ["Upgrade failed", "### Pulse version\n6.5.0 → 6.6.0-rc.1\n### Agent version\n6.5.0"],
+ ["Pulse 6.5.0 to 6.6.0-rc.1 failed", "Legacy report."],
+ ]) {
+ const { github, calls } = createGithub();
+ const issue = { number: 2928, title, body,
+ labels: ["bug", "affects-6.5.0", "needs-human", "release-blocker", "needs-decomposition",
+ "needs-retest-on-latest", "operator-reviewed"].map(name => ({ name })) };
+ await syncLabels({ github, context: createContext({ issue }), core: createCore() });
+ assert.deepEqual(calls.addLabels.map(call => call.labels), [["needs-version-info"]]);
+ assert.deepEqual(calls.removeLabel.map(call => call.name), ["affects-6.5.0"]);
+ assert.deepEqual(calls.createLabel.map(call => call.name), ["needs-version-info"]);
+ assert.deepEqual(calls.createComment, []);
+ assert.deepEqual(calls.getLatestRelease, []);
+ assert.deepEqual(calls.paginate, []);
+ assert.equal(calls.getIssue.length, 2);
+ }
+});
+
test("title-version label consumer corrects only its own metadata without contact or release inference", async () => {
for (const [title, body, version] of [
["[Bug]: vSphere 8.0.3 enrichment fails", "Legacy report.", null],
diff --git a/docs/ISSUE_TRIAGE.md b/docs/ISSUE_TRIAGE.md
index 2a17c2825c..a0944f8abc 100644
--- a/docs/ISSUE_TRIAGE.md
+++ b/docs/ISSUE_TRIAGE.md
@@ -57,6 +57,9 @@ version or asset, route, original time and timezone, last recorded updater or
installer result, what stopped, and recovery already performed. Keep the version
running at failure separate from the version observed after recovery; accept
unknowns and use evidence already supplied anywhere in the thread.
+Automatic version labels do not choose an endpoint from a source-to-target
+sequence such as `6.5.0 → 6.6.0-rc.1`, even in the version field or title. Triage
+uses the full chronology; an ambiguous label is not a reason to re-request facts.
A verified download signature establishes artifact authenticity, not completed
installation, successful rollback or a healthy running service. `Broken pipe`