diff --git a/lib/update.js b/lib/update.js index bd59afe..9f76f78 100644 --- a/lib/update.js +++ b/lib/update.js @@ -107,11 +107,14 @@ export function latestStableVersion(versions) { return best; } -/** 正式版已经追上的测试版不再列出。1.1.11-beta 始终下线。 */ +/** 正式版已经追上的旧测试版标签不再列出。1.1.11-beta 始终下线。 + * 正式/测试是并行通道(测试带红队等),beta 分支 tip 始终保留,避免 1.1.25 正式把 1.1.25-beta 整通道藏掉。 */ export function hideListedVersion(item, stableVersion = "") { if (!item || withdrawnVersion(item)) return true; const beta = item.channel === "beta" || isBetaName(item.version) || isBetaName(item.ref) || isBetaName(item.id); if (!beta) return false; + // 并行测试通道 tip:始终可见。 + if (item.ref === BETA_REF || item.kind === "head") return false; const ceiling = String(stableVersion || "").replace(/^v/i, ""); if (!ceiling || isBetaName(ceiling)) return false; const ver = String(item.version || item.ref || item.id || "").replace(/^v/i, ""); diff --git a/package.json b/package.json index 42ffe33..03b548e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "dsh-purge", - "version": "1.1.25", + "version": "1.1.26", "description": "DeepSeek Harness 网络安全红队工具:本机官方 Harness 受控评测与清洗,不同模型可换不同提示词;默认提示词面向国模「小码酱」。求 Star ⭐", "type": "module", "main": "lib/index.js", diff --git a/release-notes.md b/release-notes.md index 1314850..e5c5882 100644 --- a/release-notes.md +++ b/release-notes.md @@ -1,3 +1,14 @@ +# 1.1.26 + +## 中文 + +- **修复测试通道被正式版同号藏掉**:`1.1.25` 正式发布后,`1.1.25-beta.*` 因「正式已追上」逻辑整通道不可见;现 **beta 分支 tip 始终列出**(正式/测试并行,测试带红队)。 +- 已追上的旧 beta **标签**仍会隐藏;`1.1.11-beta` 仍下线。 + +## English + +- **Fix beta lane hidden by same-number stable**: after `1.1.25` stable, `1.1.25-beta.*` vanished via the “stable caught up” filter; the **beta branch tip always stays listed** (parallel channels; beta carries red-team). +- Older caught-up beta **tags** still hide; `1.1.11-beta` stays withdrawn. # 1.1.25 ## 中文 diff --git a/scripts/test-update-guards.mjs b/scripts/test-update-guards.mjs index 82d2338..e234d13 100644 --- a/scripts/test-update-guards.mjs +++ b/scripts/test-update-guards.mjs @@ -40,17 +40,18 @@ const caughtUp = [ ]; const ceiling = latestStableVersion(caughtUp); assert.equal(ceiling, "1.1.12"); -assert.equal(hideListedVersion(caughtUp[2], ceiling), true); -assert.equal(hideListedVersion(caughtUp[3], ceiling), true); +assert.equal(hideListedVersion(caughtUp[2], ceiling), true); // 已追上的旧 beta 标签仍隐藏 +assert.equal(hideListedVersion(caughtUp[3], ceiling), false); // beta 分支 tip 始终保留(并行通道) assert.equal(hideListedVersion(caughtUp[4], ceiling), false); assert.equal(hideListedVersion({ ref: "v1.1.11-beta.1", version: "1.1.11-beta.1", channel: "beta" }, ""), true); const visible = caughtUp.filter((item) => !hideListedVersion(item, ceiling)); -assert.deepEqual(visible.map((item) => item.ref), ["master", "v1.1.12", "v1.1.13-beta.1"]); +assert.deepEqual(visible.map((item) => item.ref), ["master", "v1.1.12", "beta", "v1.1.13-beta.1"]); const staleSha = "423a91614baa747b56749003d054fedb8e725714"; const shown = markCurrent(visible, { channel: "stable", pin: "" }, "1.1.12", staleSha); assert.equal(shown.find((item) => item.ref === "master").current, true); assert.equal(shown.find((item) => item.ref === "v1.1.12").current, false); +assert.equal(shown.find((item) => item.ref === "beta").current, false); assert.equal(shown.find((item) => item.ref === "v1.1.13-beta.1").current, false); console.log("ok: update guards");