diff --git a/internal/ai_client/client.go b/internal/ai_client/client.go index 1a8b589..fac4030 100644 --- a/internal/ai_client/client.go +++ b/internal/ai_client/client.go @@ -204,7 +204,9 @@ func buildDispatchMetadata(task *database.Task) map[string]string { var ctx map[string]string if err := json.Unmarshal([]byte(task.DispatchContext), &ctx); err == nil { for k, v := range ctx { - metadata[k] = v + if k != "task_uuid" { + metadata[k] = v + } } } } diff --git a/requirements.md b/requirements.md index 26782fe..5c91693 100644 --- a/requirements.md +++ b/requirements.md @@ -168,7 +168,7 @@ Ví dụ: 3. OpenClaw/SMTP retry đúng thứ tự 1s -> 5s -> 15s. 4. Hết retry thì `FAILED` và có `last_error`. 5. Callback sai token trả 401 và không đổi state task. -6. Anti-loop + whitelist + idempotency hoạt động đúng. +6. Anti-loop + idempotency + external rules hoạt động đúng thứ tự. 10) Test matrix tối thiểu @@ -177,4 +177,7 @@ Ví dụ: 3. SMTP fail hết retry -> `FAILED`, có `last_error`. 4. Callback sai token -> 401, state không đổi. 5. Duplicate `message_id` -> không tạo task mới. -6. Sender là chính hệ thống hoặc ngoài whitelist -> `IGNORED`. +6. Sender là chính hệ thống -> `IGNORED`. +7. Sender ngoài whitelist -> `IGNORED` bởi external rules. +8. Sender trong blocklist -> `IGNORED` bởi external rules. +9. Rule metadata được truyền qua dispatch context đến OpenClaw.