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.

Keep declared server versions separate from image aliases and companions

pulse-triage[bot]e8c9d7561fde
diff --git a/.github/scripts/issue-version-triage.cjs b/.github/scripts/issue-version-triage.cjs
index 7acff75ffa..71c791e403 100644
--- a/.github/scripts/issue-version-triage.cjs
+++ b/.github/scripts/issue-version-triage.cjs
@@ -216,13 +216,13 @@ 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
// cannot establish the attempted server executable's version.
const filename = visible.match(/^pulse-[^\s`*_]+/i)?.[0];
if (filename && /\.(?:tar\.gz|tgz|zip|exe|sha256|sig|sshsig)(?:\.|$)/i.test(filename)) {
+ if (declaredVersionIsTransition(visible)) return null;
const archive = filename.match(
/^pulse-(?:pro-)?v?(\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?)\.(?:tar\.gz|tgz)$/i
);
@@ -232,8 +232,16 @@ function normalizeLegacyVersionValue(value, body) {
}
// 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|(?:pulse|server(?:[ \t]*\+[ \t]*pulse-agent)?)[ \t]+v?\d+\.\d+\.\d+\b|(?:[a-z0-9._/-]+\/)?pulse(?:-pro)?:|pulse[-_])/i.test(visible)
- ? normalizeVersion(visible) : null;
+ // The complete version must follow its server prefix immediately. An
+ // unversioned/incomplete image or a companion binary cannot borrow an
+ // agent/platform number later in the value (or one in the registry name).
+ const declared = visible.match(
+ /^(?:(?:pulse|server(?:[ \t]*\+[ \t]*pulse-agent)?)[ \t]+|(?:[a-z0-9._/-]+\/)?pulse(?:-pro)?:[ \t]*|pulse(?:-pro)?[-_])?v?(\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?)\b/i
+ );
+ if (!declared) return null;
+ const version = declared[1];
+ return declaredVersionIsTransition(version + visible.slice(declared[0].length))
+ ? null : normalizeVersion(version);
}
function extractTitlePulseVersion(title) {
diff --git a/.github/scripts/issue-version-triage.test.cjs b/.github/scripts/issue-version-triage.test.cjs
index c901bc2a6e..d258258b31 100644
--- a/.github/scripts/issue-version-triage.test.cjs
+++ b/.github/scripts/issue-version-triage.test.cjs
@@ -2478,3 +2478,74 @@ test("the silent consumer uses linked declarations without invented tasks or rep
assert.equal(calls.getIssue.length, 2);
}
});
+
+test("unversioned server images and companion binaries cannot borrow a later version", () => {
+ const values = [
+ "rcourtman/pulse:latest; agent 6.5.0",
+ "license.pulserelay.pro/pulse-pro:latest; TrueNAS 25.10.3",
+ "rcourtman/pulse:6.6; agent 6.5.0",
+ "pulse:unknown; server 6.5.0 after recovery",
+ "pulse:latest (previously 6.4.5)",
+ "registry.6.4.5.invalid/pulse:latest; agent 6.5.0",
+ "pulse-agent v6.5.0",
+ "pulse-agent-helper 6.5.0",
+ "pulse-agent-runner:6.5.0",
+ "pulse-mcp 6.5.0",
+ "pulse-provider-msp 6.5.0",
+ "pulse-pro-agent v6.5.0",
+ ];
+ for (const value of values) {
+ 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.4.5`;
+ assert.equal(triage.internals.extractPulseVersion("Pulse 6.4.5 upgrade failed",
+ body.replaceAll("\n", newline)), null, body);
+ }
+ }
+ }
+});
+
+test("a complete server token supplies its own version, not a registry or later number", () => {
+ for (const [value, expected] of [
+ ["v6.6.0-rc.6; agent 6.5.0", "6.6.0-rc.6"],
+ ["Pulse v6.6.0-rc.6; TrueNAS 25.10.3", "6.6.0-rc.6"],
+ ["server + pulse-agent v6.3.2", "6.3.2"],
+ ["pulse-v6.6.0-rc.6", "6.6.0-rc.6"],
+ ["pulse_v6.6.0-rc.6", "6.6.0-rc.6"],
+ ["pulse-pro-v6.6.0-rc.6", "6.6.0-rc.6"],
+ ["registry.6.4.5.invalid/pulse:6.6.0-rc.6; agent 6.5.0", "6.6.0-rc.6"],
+ ["registry.6.4.5.invalid/pulse-pro:v6.6.0-rc.6", "6.6.0-rc.6"],
+ ["**[registry.6.4.5.invalid/pulse:6.6.0-rc.6](https://example.invalid/6.5.0)**", "6.6.0-rc.6"],
+ ["registry.6.4.5.invalid/pulse:6.5.0 → 6.6.0-rc.6", null],
+ ["registry.6.4.5.invalid/pulse-pro:6.5.0 to latest", null],
+ ]) {
+ assert.equal(triage.internals.extractPulseVersion("Upgrade from v6.4.5",
+ `### Pulse version\n${value}\n\n### Agent version\n6.4.5`), expected, value);
+ }
+});
+
+test("silent triage retires borrowed versions without changing Community disposition", async () => {
+ for (const action of ["opened", "edited", "reopened"]) {
+ for (const [value, borrowedVersion] of [
+ ["rcourtman/pulse:latest; agent 6.5.0", "6.5.0"],
+ ["license.pulserelay.pro/pulse-pro:latest; TrueNAS 25.10.3", "25.10.3"],
+ ["pulse-agent v6.5.0", "6.5.0"],
+ ["rcourtman/pulse:6.6; agent 6.5.0", "6.5.0"],
+ ]) {
+ const { github, calls } = createGithub();
+ const preserved = ["bug", "needs-human", "release-blocker", "needs-decomposition",
+ "needs-retest-on-latest", "operator-reviewed"];
+ const issue = { number: 2929, title: "Pulse 6.4.5 upgrade failed",
+ body: `### Pulse version\n${value}\n\n### Agent version\n6.4.5`,
+ labels: [...preserved, `affects-${borrowedVersion}`].map(name => ({ name })) };
+ await syncLabels({ github, context: createContext({ action, issue }), core: createCore() });
+ assert.deepEqual(calls.addLabels.map(call => call.labels), [["needs-version-info"]], value);
+ assert.deepEqual(calls.removeLabel.map(call => call.name), [`affects-${borrowedVersion}`], value);
+ assert.deepEqual(calls.createLabel.map(call => call.name), ["needs-version-info"], value);
+ assert.deepEqual(calls.createComment, []);
+ assert.deepEqual(calls.getLatestRelease, []);
+ assert.deepEqual(calls.paginate, []);
+ assert.equal(calls.getIssue.length, 2);
+ }
+ }
+});