Files
Arcrun/cypher-executor/tests
uncle6me-web 4aacd79e00 feat(component): 新增 hash 零件——出貨線版本號機制不必再用 code 腹語術(Arcrun#91)
出貨線的版本號由內容指紋算出(內容一變版本必變),build 站核對官方成品指紋
也要它。此前 registry 裡只有 code 節點提到 hash,沒有專門零件——純計算本該是
一顆零件,不是一段腳本(D70)。

- registry/components/hash/:TinyGo 實作,sha256/sha1/md5,hex/base64 輸出
- .component-builds/hash/:部署包(component.wasm 已 commit,比照 rule 05)
- cypher-executor/src/lib/component-loader.ts:WASM_HTTP_RUNNER_IDS 白名單加
  'hash',否則 `component: hash` 在任何實例上都會落到 step 8「找不到零件」
  (與 #29 的 code 缺口同形狀);對應單元測試
  cypher-executor/tests/component-loader-hash.test.ts
- pending-human-gate/README.md:hash 部分已落地移除,#89 維持原狀

驗證(見 PR 說明附完整輸出):
- wasmtime 本地跑六種 gherkin 情境,結果與系統 shasum/md5 逐位元一致
- 部署到 youlin 測試場(arcrun-hash.youlin-hsieh-dev.workers.dev),POST 直打
  六種情境同樣一致
- 在真實工作流(hash-e2e-test-91,youlin 測試場觸發)跑過,含 component-loader
  白名單修法的單元測試(vitest + cloudflare:test,本地綠燈)

查證「零件投稿要人工互動解閘」一事:scripts/component-arm.sh、
.claude/hooks/component-guard.sh 均不存在;pre-write-guard.sh 對
registry/components/ 的限制只擋 TS 檔與 auth_* 命名放錯目錄,不擋本次改動。
沒有那個「只有人做得到」的具體物件,故未卡關直接走完。

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-13 13:22:08 +08:00
..