Preserve explicitly shared server and agent versions in legacy reports

The complete live-backlog comparison caught the existing report #1788's shared server + pulse-agent v6.3.2 declaration. Keep that explicit field value rather than marking supplied evidence unknown; retain unknown and adjacent-field boundaries. Add a regression for the real report's version format.

Change-source: pulse-maintainer
Contract-Neutral: Preserves valid input compatibility in the existing silent issue metadata parser; no form, label, contact, product API or subsystem contract change.
This commit is contained in:
pulse-triage[bot]
2026-10-10 03:12:03 +01:00
parent 50a1e466c6
commit 92cf192103
2 changed files with 10 additions and 2 deletions
+2 -2
View File
@@ -69,9 +69,9 @@ function normalizeVersion(value) {
function normalizeLegacyVersionValue(value) {
const visible = String(value).trim().replace(/^[`*_]+/, "");
// Recognise conventional version, image and release-asset values, without
// Keep an explicitly shared server/agent version (as in #1788), without
// mining a sentence such as "unknown; agent version 6.5.0" for a number.
return /^(?:v?\d+\.\d+\.\d+\b|(?:[a-z0-9._/-]+\/)?pulse:|pulse[-_])/i.test(visible)
return /^(?:v?\d+\.\d+\.\d+\b|server(?:[ \t]*\+[ \t]*pulse-agent)?[ \t]+v?\d+\.\d+\.\d+\b|(?:[a-z0-9._/-]+\/)?pulse:|pulse[-_])/i.test(visible)
? normalizeVersion(visible) : null;
}
@@ -606,6 +606,14 @@ test("legacy version formats still classify actual version values", () => {
}
});
test("legacy joint server-agent versions remain reporter evidence", () => {
const { extractPulseVersion } = triage.internals;
const body = "**Pulse version:** server + pulse-agent v6.3.2 (Docker, `rcourtman/pulse:v6.3.2`)\n**Host OS:** Unraid 7.3.2\n**Agent:** Unified Agent v6.3.2, x86_64";
assert.equal(extractPulseVersion("[Bug]: Unraid missing disks", body), "6.3.2");
assert.equal(extractPulseVersion("Bug", "Pulse version: server V6.5.0"), "6.5.0");
assert.equal(extractPulseVersion("Bug", "Pulse version: unknown; server + pulse-agent v6.3.2"), null);
});
test("legacy unknown-version sync cannot fabricate release evidence or contact", async () => {
for (const body of [
"Pulse version: unknown\n### Agent version\n6.5.0",