Skip to content

Commit d396747

Browse files
authored
fix: retry failed release RTT rows (#17)
1 parent 9c45b73 commit d396747

6 files changed

Lines changed: 22 additions & 11 deletions

scripts/resolve-openclaw-channel-package.mjs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,16 +114,19 @@ const explicitVersions = readListEnv("INPUT_VERSIONS");
114114
const versionLimit = readPositiveIntegerEnv("INPUT_VERSION_LIMIT", DEFAULT_VERSION_LIMIT);
115115
const channelRows = releaseRows(await readChannelRttRows());
116116
const measured = new Set(
117-
channelRows.map(
118-
(row) => `${row.channel?.id}\0${row.package?.spec}\0${row.package?.version}`,
119-
),
117+
channelRows
118+
.filter((row) => row.run?.status === "pass")
119+
.map(
120+
(row) => `${row.channel?.id}\0${row.package?.spec}\0${row.package?.version}`,
121+
),
120122
);
121123

122124
const queue = [];
123125
for (const channelId of channelIds) {
124126
const channel = channelConfig.get(channelId);
125127
const measuredVersions = channelRows
126128
.filter((row) => row.channel?.id === channelId)
129+
.filter((row) => row.run?.status === "pass")
127130
.map((row) => row.package.version)
128131
.filter((version) => parseVersion(version));
129132
const latestMeasured = measuredVersions.sort(compareVersions).at(-1);

scripts/resolve-openclaw-channel-package.test.mjs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ test("queues explicit channel release versions even when already measured", asyn
9494
]);
9595
});
9696

97-
test("does not auto-requeue imported channel release versions", async () => {
97+
test("auto-requeues failed channel release versions", async () => {
9898
const workspace = await makeWorkspace();
9999
await writeJsonl(path.join(workspace, "data/channels/slack/2026.5.16-beta.6.jsonl"), [
100100
row("2026.5.16-beta.6", "slack", "fail"),
@@ -119,6 +119,7 @@ test("does not auto-requeue imported channel release versions", async () => {
119119
);
120120
const matrix = JSON.parse(outputs.matrix);
121121
assert.deepEqual(matrix.map((entry) => `${entry.channel}:${entry.version}`), [
122+
"slack:2026.5.16-beta.6",
122123
"whatsapp:2026.5.16-beta.6",
123124
"slack:2026.5.16-beta.7",
124125
"whatsapp:2026.5.16-beta.7",

scripts/resolve-openclaw-discord-package.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ if (requestedVersions.length > 0) {
178178
.slice(0, rssBackfillLimit);
179179
} else {
180180
const measured = new Set(
181-
discordRows.map((row) => `${row.package.spec}\0${row.package.version}`),
181+
successfulDiscordRows.map((row) => `${row.package.spec}\0${row.package.version}`),
182182
);
183183
queue = (await npmVersions())
184184
.filter((version) => typeof version === "string" && parseVersion(version))

scripts/resolve-openclaw-discord-package.test.mjs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ test("queues missing Discord releases from the Telegram baseline", async () => {
115115
assert.deepEqual(JSON.parse(outputs.matrix).map((pkg) => pkg.version), ["2026.5.12"]);
116116
});
117117

118-
test("does not requeue imported failed Discord releases by default", async () => {
118+
test("auto-requeues failed Discord releases by default", async () => {
119119
const workspace = await makeWorkspace();
120120
await writeJsonl(path.join(workspace, "data/channels/telegram.jsonl"), [
121121
releaseRow("2026.5.12", "telegram"),
@@ -142,10 +142,13 @@ test("does not requeue imported failed Discord releases by default", async () =>
142142
});
143143

144144
const outputs = parseOutputs(stdout);
145-
assert.equal(outputs.count, "1");
146-
assert.equal(outputs.missing_baseline_count, "1");
145+
assert.equal(outputs.count, "2");
146+
assert.equal(outputs.missing_baseline_count, "2");
147147
assert.equal(outputs.reason, "missing-discord-release-versions");
148-
assert.deepEqual(JSON.parse(outputs.matrix).map((pkg) => pkg.version), ["2026.5.16-beta.6"]);
148+
assert.deepEqual(JSON.parse(outputs.matrix).map((pkg) => pkg.version), [
149+
"2026.5.16-beta.5",
150+
"2026.5.16-beta.6",
151+
]);
149152
});
150153

151154
test("queues requested Discord releases even when a failed row was imported", async () => {

scripts/resolve-openclaw-surface-package.mjs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,9 @@ for (const surfaceId of surfaceIds) {
121121
}
122122
const measured = new Set(
123123
[...rowsBySurface.entries()].flatMap(([surfaceId, rows]) =>
124-
rows.map((row) => `${surfaceId}\0${row.package?.spec}\0${row.package?.version}`),
124+
rows
125+
.filter((row) => row.run?.status === "pass")
126+
.map((row) => `${surfaceId}\0${row.package?.spec}\0${row.package?.version}`),
125127
),
126128
);
127129

@@ -130,6 +132,7 @@ for (const surfaceId of surfaceIds) {
130132
const surface = surfaceConfig.get(surfaceId);
131133
const surfaceRows = rowsBySurface.get(surfaceId) ?? [];
132134
const measuredVersions = surfaceRows
135+
.filter((row) => row.run?.status === "pass")
133136
.map((row) => row.package.version)
134137
.filter((version) => parseVersion(version));
135138
const latestMeasured = measuredVersions.sort(compareVersions).at(-1);

scripts/resolve-openclaw-surface-package.test.mjs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ test("queues explicit surface release versions even when already measured", asyn
9393
]);
9494
});
9595

96-
test("does not auto-requeue imported surface release versions", async () => {
96+
test("auto-requeues failed surface release versions", async () => {
9797
const workspace = await makeWorkspace();
9898
await writeJsonl(path.join(workspace, "data/surfaces/control-ui/2026.6.1-beta.3.jsonl"), [
9999
row("2026.6.1-beta.3", "control-ui", "fail"),
@@ -113,6 +113,7 @@ test("does not auto-requeue imported surface release versions", async () => {
113113
const outputs = parseOutputs(stdout);
114114
const matrix = JSON.parse(outputs.matrix);
115115
assert.deepEqual(matrix.map((entry) => `${entry.surface}:${entry.version}`), [
116+
"control-ui:2026.6.1-beta.3",
116117
"control-ui:2026.6.1",
117118
]);
118119
});

0 commit comments

Comments
 (0)