feat(credential-store-migration): T3 best-effort — secrets 設定就緒 + 誠實缺口 closure
acr init 加印手動指令 wrangler secret put CF_SECRETS_API_TOKEN (比照既有 ENCRYPTION_KEY 模式,不發明新模式);CF_ACCOUNT_ID 已在 T5 的 deploy.ts 改動中自動注入(同 WORKER_SUBDOMAIN 機制)。 誠實缺口 closure:對本次真實改動過的 committed code(leo21c arcrun-cypher-executor)做第二次 wrangler deploy,確認 CF_SECRETS_API_TOKEN/ENCRYPTION_KEY 兩個 secret 存活 + 寫入路徑 redeploy 後仍正常運作(真實 curl 驗證),比 T1.5 spike 對 throwaway worker 的舊證據更貼近本次改動。 刻意不跑 acr update:mistakes #23 已知限制(硬綁 GitHub codeload 舊碼,會拉回覆蓋剛部署的 T4/T5 成果),跑了只會摧毀測試環境又 證明不了新東西,SDD 本身允許此替代路徑。此結構性衝突留 leo 裁決。 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018D6QoC5waFkcjc2N7csJBB
This commit is contained in:
@@ -337,6 +337,17 @@ async function initSelfHosted(
|
||||
}
|
||||
console.log(chalk.gray(` ${SECRET_TARGET_WORKERS.length} 個 Worker 共用同一把(與 .env 的 ENCRYPTION_KEY 一致)。`));
|
||||
console.log(chalk.gray(' 不想自己跑?跑 acr init 時授權(明示同意)我可代設——但預設由你自己 put(你持有 key)。\n'));
|
||||
|
||||
// credential-store-migration T3(§2.3):cypher worker 要有一把「能打 CF Workers Scripts
|
||||
// secrets 管理 API 的 token」才能讓 POST/PUT /credentials 把密文寫進 Workers Secrets。
|
||||
// 比照 ENCRYPTION_KEY 的既有模式(印手動指令,不是工具自動 put)——CF_ACCOUNT_ID 非機密,
|
||||
// 已由 downloadAndDeploy/injectWranglerConfig 自動注入(同 WORKER_SUBDOMAIN 模式),
|
||||
// 只有 CF_SECRETS_API_TOKEN(機密)需要用戶手動 put。
|
||||
console.log(chalk.bold(' 下一步 ③:把能打 Workers Scripts secrets API 的 CF token 設進 cypher worker:'));
|
||||
console.log(chalk.cyan(` wrangler secret put CF_SECRETS_API_TOKEN --name arcrun-cypher-executor`));
|
||||
console.log(chalk.gray(' 貼你剛才用來部署的同一個 CF API Token(需含 Workers Scripts:Edit 權限)。'));
|
||||
console.log(chalk.gray(' 用途:POST/PUT /credentials 把密文寫進 Workers per-script Secrets(credential-store-migration T5)。'));
|
||||
console.log(chalk.gray(' CF_ACCOUNT_ID 已自動注入(非機密),不需手動設定。\n'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user