35a769fc88
- portal-data.test.ts:/portal HTML 殼機械斷言(無 'leo'/X-Arcrun-API-Key//kbdb//Mira); search 注入證明(caller 帶 library=hr&owner_id=evil 被靜默覆蓋);entries/:id 越庫/ 跨租戶/不存在同一句 404+NULL→general;graph 403 不打 plugin/放行轉發/disabled 來源排除;workflows 非 admin 403、admin 唯讀無 webhook_url、workflowsVisible 單元 - portal-auth.test.ts session 測試補 P3 能力欄位(graph_allowed/workflows_visible) - wrangler.test.toml 補 ANALYTICS_KV mock+KBDB_GRAPH_URL 假 host(絕不外連) - cypher 154/155(唯一失敗=executor 不存在零件 pre-existing,git stash 複驗); kbdb 20/20;兩包 tsc exit 0 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
53 lines
1.7 KiB
TOML
53 lines
1.7 KiB
TOML
name = "arcrun-cypher-executor"
|
||
main = "src/index.ts"
|
||
compatibility_date = "2025-02-19"
|
||
compatibility_flags = ["nodejs_compat"]
|
||
|
||
# 測試環境不啟用 Service Binding(Miniflare 無法解析外部服務)
|
||
|
||
# 2026-06-04:移除 WASM_BUCKET R2 mock。R2 wasm 路徑已 dead,不再需要測試 mock。
|
||
|
||
# KV mock(BUILD-006)
|
||
[[kv_namespaces]]
|
||
binding = "EXEC_CONTEXT"
|
||
id = "test-exec-context"
|
||
|
||
[[kv_namespaces]]
|
||
binding = "WEBHOOKS"
|
||
id = "test-webhooks"
|
||
|
||
[[kv_namespaces]]
|
||
binding = "CREDENTIALS_KV"
|
||
id = "test-credentials-kv"
|
||
|
||
[[kv_namespaces]]
|
||
binding = "RECIPES"
|
||
id = "test-recipes"
|
||
|
||
# console session mock(分流台勾掉 route 測試;console-auth.ts 的 session 真身存這個 KV)
|
||
[[kv_namespaces]]
|
||
binding = "SESSIONS_KV"
|
||
id = "test-sessions-kv"
|
||
|
||
# portal-auth P3:/portal/data/workflows 讀最近執行(stats:{name}:{ts})
|
||
[[kv_namespaces]]
|
||
binding = "ANALYTICS_KV"
|
||
id = "test-analytics-kv"
|
||
|
||
# credential-store-migration T8/T9 測試用 D1 mock(Miniflare 本地 SQLite,非真實 leo21c D1;
|
||
# schema 由 tests/setup.ts 在測試啟動時建表,不用 migrations_dir——0002_credentials.sql 就一張表,
|
||
# 直接 exec 比接 migrations 機制簡單)
|
||
[[d1_databases]]
|
||
binding = "CREDENTIALS_DB"
|
||
database_name = "test-credentials-db"
|
||
database_id = "test-credentials-db-id"
|
||
|
||
[vars]
|
||
ENVIRONMENT = "test"
|
||
ENCRYPTION_KEY = "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
|
||
# 分流台勾掉 route 測試:KBDB 指到假 host(fetchMock 攔截,絕不外連——尤其不打官方 uncle6 fallback)
|
||
KBDB_BASE_URL = "https://kbdb.test"
|
||
CONSOLE_TENANT = "leo"
|
||
# portal-auth P3:graph 粗閘放行後的轉發目標也指假 host(fetchMock 攔截,絕不外連)
|
||
KBDB_GRAPH_URL = "https://graph.test"
|