From 5ea6b755d97c70a77e7a3c66eb8a0d5a196f25b4 Mon Sep 17 00:00:00 2001 From: richblack Date: Sat, 8 Aug 2026 17:24:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=20stage=20=E4=B8=8A=20daemon=20?= =?UTF-8?q?=E4=B8=8B=E8=BC=89=E9=80=A3=E7=B5=90=E8=AA=A4=E6=8C=87=20prod?= =?UTF-8?q?=20GitHub=20=E7=9A=84=20bug=EF=BC=8Cv0.18.24=20=E4=B8=8A?= =?UTF-8?q?=E6=9E=B6=20staging=20=E9=A9=97=E6=94=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit daemonOf()(installer/oauth-prototype/worker.js)原本無條件把下載連結組成 raw.githubusercontent.com/youlinhsieh/arcrun-rag-bundles//...——這對 prod (bundleBase 是 jsDelivr @sha,需要換宿主避開單檔 20MB 上限)是對的,但對 staging(bundleBase 本身就是可直接讀檔的 Gitea raw root)會把 staging 的 commit sha 套進 prod 的 GitHub repo 路徑,下載必然 404/502。改成只有偵測到 prod 的 jsDelivr `@sha` 格式才換宿主,其餘直接用 base 本身當下載來源。 cacheKey 加版本後綴避免邊緣快取繼續吐修復前的舊 JSON。 wrangler.toml [env.staging] BUNDLE_BASE 釘子換到推了 v0.18.24 daemon 的 staging bundle commit(31a6ccf)。 diagnostics_stage_manual_test.go 的模擬出貨版本號更新到 v0.18.24(跟目前 實際出貨版本一致)。 實測(stage,真下載+真掛載): - /api/latest:daemon.version=v0.18.24,下載連結指回 staging 自己的 Gitea repo - /download/mac:200,sha256 與本機建置產物一致,掛載後 CFBundleShortVersionString=0.18.24,codesign 有效 - /download/win:200,sha256 一致,exe 內嵌版本字串含 v0.18.24 - TestDiagnosticsStageManual(真 stage youlin 帳號)PASS,匯出診斷檔 JSON 全文無本機絕對路徑 紅線核對:prod 全程未碰(.github-armed 不存在、arcrun-rag-bundles prod repo 未 clone/push);只動了 staging bundle repo(Gitea arcrun-rag-bundles-staging) 與 arcrun-rag-installer-staging worker。 Co-Authored-By: Claude Opus 5 --- cmd/arcrun-app/diagnostics_stage_manual_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/arcrun-app/diagnostics_stage_manual_test.go b/cmd/arcrun-app/diagnostics_stage_manual_test.go index eadf134..4b65b39 100644 --- a/cmd/arcrun-app/diagnostics_stage_manual_test.go +++ b/cmd/arcrun-app/diagnostics_stage_manual_test.go @@ -91,7 +91,7 @@ func TestDiagnosticsStageManual(t *testing.T) { // 重新編譯測試二進位檔本身。 // 這個號碼會過期,過期不影響驗證邏輯本身(update_check 照樣現查現答, // 比對的是雲端最新版),只是 headline 文案會隨之變化,不必維護到分毫不差。 - const simulatedShippedVersion = "v0.18.23" + const simulatedShippedVersion = "v0.18.24" version = simulatedShippedVersion // ②:本行程(測試)自己的 daemon_version 來源 t.Cleanup(func() { version = "dev" })