feat(bat): 补全工作流命令与人工校对状态
bat-rust / Build and test Rust (push) Canceled after 0s
bat-rust / Build and test Go API (push) Canceled after 0s

Refs #43
This commit is contained in:
2026-08-19 21:33:33 +08:00
parent 550ee7fd9a
commit 72c1a879a3
21 changed files with 797 additions and 41 deletions
+6
View File
@@ -593,6 +593,11 @@ func (b *controlBackend) TranslationTaskUpdate(ctx context.Context, params backe
return json.RawMessage(`{"task_status":"` + params.Status + `"}`), nil
}
func (b *controlBackend) TranslationProofread(ctx context.Context) (json.RawMessage, error) {
b.calls = append(b.calls, "translation.proofread")
return json.RawMessage(`{"translation_workflow_status":"manual_proofreading"}`), nil
}
type scheduleBackend struct {
*controlBackend
scheduleCalls []string
@@ -1156,6 +1161,7 @@ func TestAdminControlForwardsAllowlistedActions(t *testing.T) {
{name: "repair", action: "repair", rpcMethod: "resource.repair", call: "resource.repair"},
{name: "catalog refresh", action: "catalog-refresh", rpcMethod: "catalog.refresh", call: "catalog.refresh"},
{name: "translation task update", action: "translation-task-update", body: `{"task_id":"textunit/v-current/Scenario","status":"failed","failure_reason":"provider rejected payload","provider_run_id":"provider-run-1"}`, rpcMethod: "translation.task.update", call: "translation.task.update"},
{name: "translation proofread", action: "translation-proofread", rpcMethod: "translation.proofread", call: "translation.proofread"},
}
for _, tc := range tests {
t.Run(tc.name, func(t *testing.T) {