feat(report): close v2 headline and coverage gaps
This commit is contained in:
@@ -394,6 +394,7 @@ func TestGenerateMarkdownV3IncludesTencentSubscriptionSection(t *testing.T) {
|
||||
ModelName: "DeepSeek-V4-Flash",
|
||||
ProviderName: "DeepSeek",
|
||||
OperatorName: "OpenRouter",
|
||||
Audience: "适合想尽快验证新模型价值的选型读者",
|
||||
TrustLabel: "聚合来源",
|
||||
Baseline: "首次出现",
|
||||
Summary: "新模型进入情报池,值得重新评估低成本编码默认选择。",
|
||||
@@ -403,6 +404,21 @@ func TestGenerateMarkdownV3IncludesTencentSubscriptionSection(t *testing.T) {
|
||||
EvidenceDetail: "models.created_at = 今日,且已存在最新价格快照",
|
||||
Priority: 95,
|
||||
},
|
||||
{
|
||||
EventType: "promo_campaign",
|
||||
ModelName: "DeepSeek-V3.2-Exp",
|
||||
ProviderName: "DeepSeek",
|
||||
OperatorName: "DeepSeek",
|
||||
Audience: "适合计划趁活动窗口压低推理成本的团队",
|
||||
TrustLabel: "官方来源 / 一级证据",
|
||||
Baseline: "活动窗口开启",
|
||||
Summary: "官方活动窗口出现后,值得重新评估低成本推理和批量调用方案。",
|
||||
SourceKindLabel: "官方活动页",
|
||||
PrimarySource: "https://api-docs.deepseek.com/news/news250929",
|
||||
UpdatedAt: "2025-09-29 00:00",
|
||||
EvidenceDetail: "官方活动页记录 V3.2-Exp 在活动窗口内价格下调 50%+",
|
||||
Priority: 115,
|
||||
},
|
||||
}
|
||||
decorateReportV1(report)
|
||||
|
||||
@@ -422,6 +438,8 @@ func TestGenerateMarkdownV3IncludesTencentSubscriptionSection(t *testing.T) {
|
||||
"## 今日变化",
|
||||
"## 场景推荐",
|
||||
"## 完整数据附录",
|
||||
"- 影响对象:",
|
||||
"营销活动",
|
||||
"主来源: OpenRouter / region_pricing",
|
||||
"更新时间: 2026-05-13 09:30",
|
||||
"判定依据: models.created_at = 今日,且已存在最新价格快照",
|
||||
@@ -475,6 +493,7 @@ func TestGenerateHTMLV3IncludesTencentSubscriptionSection(t *testing.T) {
|
||||
ModelName: "DeepSeek-V4-Flash",
|
||||
ProviderName: "DeepSeek",
|
||||
OperatorName: "OpenRouter",
|
||||
Audience: "适合想尽快验证新模型价值的选型读者",
|
||||
TrustLabel: "聚合来源",
|
||||
Baseline: "首次出现",
|
||||
Summary: "新模型进入情报池,值得重新评估低成本编码默认选择。",
|
||||
@@ -484,6 +503,21 @@ func TestGenerateHTMLV3IncludesTencentSubscriptionSection(t *testing.T) {
|
||||
EvidenceDetail: "models.created_at = 今日,且已存在最新价格快照",
|
||||
Priority: 95,
|
||||
},
|
||||
{
|
||||
EventType: "promo_campaign",
|
||||
ModelName: "DeepSeek-V3.2-Exp",
|
||||
ProviderName: "DeepSeek",
|
||||
OperatorName: "DeepSeek",
|
||||
Audience: "适合计划趁活动窗口压低推理成本的团队",
|
||||
TrustLabel: "官方来源 / 一级证据",
|
||||
Baseline: "活动窗口开启",
|
||||
Summary: "官方活动窗口出现后,值得重新评估低成本推理和批量调用方案。",
|
||||
SourceKindLabel: "官方活动页",
|
||||
PrimarySource: "https://api-docs.deepseek.com/news/news250929",
|
||||
UpdatedAt: "2025-09-29 00:00",
|
||||
EvidenceDetail: "官方活动页记录 V3.2-Exp 在活动窗口内价格下调 50%+",
|
||||
Priority: 115,
|
||||
},
|
||||
}
|
||||
report.TencentSubscriptionPlans = []SubscriptionPlanInfo{
|
||||
{
|
||||
@@ -517,6 +551,8 @@ func TestGenerateHTMLV3IncludesTencentSubscriptionSection(t *testing.T) {
|
||||
"DeepSeek-V4-Flash",
|
||||
"一级官方发布",
|
||||
"二级权威佐证",
|
||||
"营销活动",
|
||||
"影响对象",
|
||||
"首次出现",
|
||||
"主来源",
|
||||
"更新时间",
|
||||
@@ -662,6 +698,7 @@ func TestHeadlineItemFromModelEventIncludesEvidenceFields(t *testing.T) {
|
||||
TrustLabel: "聚合来源",
|
||||
Baseline: "首次出现",
|
||||
Summary: "新模型进入情报池。",
|
||||
Audience: "适合想尽快验证新模型价值的读者",
|
||||
SourceKindLabel: "模型快照",
|
||||
PrimarySource: "OpenRouter / region_pricing",
|
||||
UpdatedAt: "2026-05-13 09:30",
|
||||
@@ -680,6 +717,9 @@ func TestHeadlineItemFromModelEventIncludesEvidenceFields(t *testing.T) {
|
||||
if item.EvidenceDetail == "" {
|
||||
t.Fatalf("expected evidence detail to be populated, got %+v", item)
|
||||
}
|
||||
if item.Audience != "适合想尽快验证新模型价值的读者" {
|
||||
t.Fatalf("expected audience to be propagated, got %+v", item)
|
||||
}
|
||||
}
|
||||
|
||||
func TestHeadlineItemFromOfficialReleaseEvent(t *testing.T) {
|
||||
@@ -735,3 +775,31 @@ func TestHeadlineItemFromSecondaryReleaseEvent(t *testing.T) {
|
||||
t.Fatalf("expected tone to be secondary-evidence, got %+v", item)
|
||||
}
|
||||
}
|
||||
|
||||
func TestHeadlineItemFromPromoCampaignEvent(t *testing.T) {
|
||||
item := headlineItemFromModelEvent(ModelEvent{
|
||||
EventType: "promo_campaign",
|
||||
ModelName: "DeepSeek-V3.2-Exp",
|
||||
TrustLabel: "官方来源 / 一级证据",
|
||||
Baseline: "活动窗口开启",
|
||||
Summary: "官方活动窗口出现后,值得重新评估低成本推理方案。",
|
||||
Audience: "适合计划趁活动窗口压低推理成本的团队",
|
||||
SourceKindLabel: "官方活动页",
|
||||
PrimarySource: "https://api-docs.deepseek.com/news/news250929",
|
||||
UpdatedAt: "2025-09-29 00:00",
|
||||
EvidenceDetail: "官方活动页记录 V3.2-Exp 在活动窗口内价格下调 50%+",
|
||||
})
|
||||
|
||||
if item.Label != "营销活动" {
|
||||
t.Fatalf("expected label to be 营销活动, got %+v", item)
|
||||
}
|
||||
if !strings.Contains(item.Title, "活动窗口") {
|
||||
t.Fatalf("expected title to mention 活动窗口, got %+v", item)
|
||||
}
|
||||
if item.Tone != "promo" {
|
||||
t.Fatalf("expected tone to be promo, got %+v", item)
|
||||
}
|
||||
if item.Audience != "适合计划趁活动窗口压低推理成本的团队" {
|
||||
t.Fatalf("expected audience to be preserved, got %+v", item)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user