Skip to content

Commit b65fb82

Browse files
voidstackloopclaude
andcommitted
release.yml: verify assets actually landed after publish, retry if not
v1.1.1 shipped without its Windows installer (~450MB .exe) even though the build succeeded and gh release create/upload reported success — gh uploads assets concurrently and can silently drop one without failing the command. Now re-checks the published release's asset list against dist/ afterward and retries anything missing, failing the workflow if a retry also fails. Also add renderer console/pageerror forwarding and a fake-server request- count log to the agent-tool-approval e2e tests, which have failed on CI (never locally) with no signal beyond "Allow never appeared" — this should narrow down whether the chat request even reaches the fake Ollama server. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
1 parent 58e1dfe commit b65fb82

2 files changed

Lines changed: 43 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,3 +143,33 @@ jobs:
143143
|| gh release upload "${{ github.ref_name }}" dist/* \
144144
--repo "${{ github.repository }}" \
145145
--clobber
146+
147+
# `gh release create dist/*` uploads every asset concurrently and can
148+
# exit 0 even when one of them silently failed to attach (observed on
149+
# v1.1.1: the Windows .exe — by far the largest asset at ~450MB — never
150+
# made it onto the release while gh reported success, and every asset
151+
# smaller than it uploaded fine). The "Validate..." step above only
152+
# confirms the files exist locally in dist/ *before* this upload;
153+
# this checks what the release *actually* ended up with afterward, and
154+
# retries anything gh's own upload silently dropped.
155+
- name: Verify every local asset actually landed on the release, retry any that didn't
156+
env:
157+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
158+
run: |
159+
set -euo pipefail
160+
published=$(gh release view "${{ github.ref_name }}" --repo "${{ github.repository }}" --json assets --jq '.assets[].name')
161+
missing=0
162+
for f in dist/*; do
163+
name=$(basename "$f")
164+
if ! grep -qxF "$name" <<< "$published"; then
165+
echo "::warning::Asset '$name' didn't land on the release after the initial publish — retrying its upload."
166+
if ! gh release upload "${{ github.ref_name }}" "$f" --repo "${{ github.repository }}" --clobber; then
167+
echo "::error::Retry upload failed for '$name'."
168+
missing=1
169+
fi
170+
fi
171+
done
172+
if [ "$missing" -ne 0 ]; then
173+
echo "::error::One or more release assets could not be uploaded even after a retry — this release is incomplete."
174+
exit 1
175+
fi

e2e/tests/agent-tool-approval.spec.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,13 @@ test.beforeEach(async () => {
3333
workspaceDir = fs.mkdtempSync(path.join(os.tmpdir(), "modelforge-e2e-workspace-"));
3434
instance = await launchApp({ settings: { onboardingComplete: true, ollamaHost: fakeOllama.url } });
3535
await stubOpenDialog(instance.app, workspaceDir);
36+
37+
// Both agent-tool-approval tests have failed on CI (never locally) with
38+
// no other signal than "Allow never appeared" — surface renderer
39+
// console/errors directly in the CI step's own stdout (no artifact
40+
// download needed) so a future failure actually says why.
41+
instance.window.on("console", (m) => console.log(`[renderer:${m.type()}] ${m.text()}`));
42+
instance.window.on("pageerror", (e) => console.log(`[renderer:pageerror] ${e.stack ?? e.message}`));
3643
});
3744

3845
test.afterEach(async () => {
@@ -55,6 +62,12 @@ async function enableAgentModeAndSendToolCallingMessage(instance_: LaunchedApp):
5562
const sendButton = window.getByRole("button", { name: "Send message" });
5663
await expect(sendButton).toBeEnabled({ timeout: 20_000 });
5764
await sendButton.click();
65+
66+
// Narrows "the request never reached the fake server" from "it reached
67+
// it but the response never rendered" — cheap, and the only thing that
68+
// can actually tell those two apart from the CI log alone.
69+
await instance_.window.waitForTimeout(500);
70+
console.log(`[diagnostic] fakeOllama chat request count after send: ${fakeOllama.getChatRequestCount()}`);
5871
}
5972

6073
test("Deny stops the tool from running and the card clears", async () => {

0 commit comments

Comments
 (0)