修复Debug EML V4元数据与回归断言
This commit is contained in:
@@ -1098,7 +1098,8 @@ public class DebugEmlSuperAgentRunServiceImpl implements DebugEmlSuperAgentRunSe
|
||||
putIfNotNull(debugContext, "original_conversation_id", originalConversationId);
|
||||
|
||||
Map<String, Object> metadata = new LinkedHashMap<>();
|
||||
metadata.put("source", "th-hotel-debug-eml-v4-upload");
|
||||
metadata.put("source", "DEBUG_EML_UPLOAD");
|
||||
metadata.put("model_contract", "M002_V4");
|
||||
putIfNotNull(metadata, "debug_run_id", runId == null ? null : runId.toString());
|
||||
putIfNotNull(metadata, "source_message_id", sourceMessageId == null ? null : sourceMessageId.toString());
|
||||
putIfNotNull(metadata, "hotel_id", hotelId);
|
||||
|
||||
@@ -228,7 +228,8 @@ class DebugEmlSuperAgentControllerTest {
|
||||
.contains("\"mode\":\"manual\"")
|
||||
.contains("\"final_only\":true");
|
||||
org.assertj.core.api.Assertions.assertThat(superAgentRequest.metadata())
|
||||
.containsEntry("source", "th-hotel-debug-eml-v4-upload")
|
||||
.containsEntry("source", "DEBUG_EML_UPLOAD")
|
||||
.containsEntry("model_contract", "M002_V4")
|
||||
.containsKey("debug_context");
|
||||
|
||||
Long debugRunCount = jdbcTemplate.queryForObject("""
|
||||
|
||||
@@ -1134,6 +1134,12 @@ class SuperAgentTaskResultControllerTest {
|
||||
FROM workflow_reservation_task
|
||||
WHERE source_message_id = ?
|
||||
""", Long.class, source.inboxId());
|
||||
Long legacyTaskCreatedOrderCount = jdbcTemplate.queryForObject("""
|
||||
SELECT COUNT(*)
|
||||
FROM workflow_reservation_order
|
||||
WHERE source_message_id = ?
|
||||
AND created_from_task_id IS NOT NULL
|
||||
""", Long.class, source.inboxId());
|
||||
Long v4OrderTaskCount = jdbcTemplate.queryForObject("""
|
||||
SELECT COUNT(*)
|
||||
FROM workflow_reservation_v4_order_task
|
||||
@@ -1147,6 +1153,7 @@ class SuperAgentTaskResultControllerTest {
|
||||
ORDER BY card_sort_order, source_event_index
|
||||
""", String.class, source.inboxId());
|
||||
assertThat(legacyTaskCount).isZero();
|
||||
assertThat(legacyTaskCreatedOrderCount).isZero();
|
||||
assertThat(v4OrderTaskCount).isEqualTo(1L);
|
||||
assertThat(v4CardTypes).containsExactly(
|
||||
"SOURCE_MESSAGE_DISPLAY",
|
||||
|
||||
Reference in New Issue
Block a user