Files
Arcrun/cypher-executor
Claude c3c0a8b17d feat(credential-store-migration): T4 wasi-shim secret_get host function
新增 secret_get(ref) host function:讀 CF Workers per-script Secrets 的值,
host 端實作 = env[ref] 動態字串索引(T1.5 spike ② 已證可行,零網路呼叫)。

- ArcrunHostEnv 加 index signature 支援任意 secret_ref 動態取值
- WasiHostFunctions 加 secret_get,u6u WASI imports 比照 kv_get 同款
  pointer/memory-write 機制 wiring
- 安全邊界:只允許 CRED_ 前綴(拒絕讀 ENCRYPTION_KEY/CF_SECRETS_API_TOKEN
  等非 credential 機密),比照既有 routedKvGet 前綴檢查精神

驗證:tsc --noEmit exit 0;vitest 18/18 通過(新增 5 案例)。
撞牆記錄:JSPI Suspending 物件不可在單元測試直接呼叫(既有架構環境限制,
kv_get 同樣受影響),已移除不可行的 2 個測試並記錄於測試檔註解。

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018D6QoC5waFkcjc2N7csJBB
2026-07-03 22:56:42 +00:00
..