test.jsonl
6.82 KB
{"id":"tscn-edge-001","input":{"platform":"bilibili","raw_item":{"title":"","owner":{},"stat":{},"tnamev2":"","bvid":""}},"expected_output":{"error":"EMPTY_RECORD","message":"跳过缺失必填字段的记录","action":"continue"}}
{"id":"tscn-edge-002","input":{"platform":"baidu","http_status":403,"html":"Forbidden","fallback":null},"expected_output":{"error":"FORBIDDEN","message":"百度热榜返回403,尝试增加延迟或切换UA","action":"retry_with_backoff","retry_delay_sec":10}}
{"id":"tscn-edge-003","input":{"platform":"weibo","http_status":418,"fallback_chain":["weibo_mobile","weibo_html"],"current_attempt":1},"expected_output":{"error":"BLOCKED_418","message":"主端点418,触发降级到移动端API","action":"trigger_fallback","next_source":"weibo_mobile"}}
{"id":"tscn-edge-004","input":{"platform":"zhihu","http_status":401,"fallback":"zhihu_hot_list_html"},"expected_output":{"error":"AUTHENTICATION_ERROR","message":"知乎热榜需登录态,降级到HTML页面解析","action":"trigger_fallback","next_source":"zhihu_hot_list_html"}}
{"id":"tscn-edge-005","input":{"platform":"mixed","records":[{"platform":"bilibili","topic":"重复话题A","timestamp":"2026-04-13T10:00:00Z"},{"platform":"bilibili","topic":"重复话题A","timestamp":"2026-04-13T10:00:00Z"},{"platform":"baidu","topic":"重复话题A","timestamp":"2026-04-13T10:00:00Z"}],"dedup_key":"md5(platform+topic+timestamp)"},"expected_output":{"kept":2,"removed":1,"reason":"bilibili记录因(platform,topic,timestamp)完全重复被去重","remaining_platforms":["bilibili","baidu"]}}
{"id":"tscn-edge-006","input":{"platform":"douyin","raw_item":{"word":"抖 音 热 搜","hot_value":null,"position":1,"label":"热"}},"expected_output":{"platform":"douyin","rank":1,"topic":"抖 音 热 搜","hot_value":0,"category":"热榜","trend_direction":"stable","trend_change":"0","duration":"实时","author":null,"likes":null},"note":"边界:hot_value为null时应回退为0"}
{"id":"tscn-edge-007","input":{"platform":"bilibili","raw_item":{"title":"[空白标题]","owner":{"name":"匿名用户"},"stat":{"view":0,"like":0},"tnamev2":"未知分区","bvid":"BV0000000000"}},"expected_output":{"platform":"bilibili","rank":1,"topic":"[空白标题]","hot_value":0,"category":"未知分区","trend_direction":"stable","trend_change":"0","duration":"未知","author":"匿名用户","likes":0},"note":"边界:允许0值和匿名作者的透传"}
{"id":"tscn-edge-008","input":{"platform":"weibo","raw_item":{"num":"","word":"","rank":null,"label_name":null,"note":null,"topic_flag":null}},"expected_output":{"error":"EMPTY_RECORD","message":"微博热搜返回空字段,跳过该条","action":"continue"},"note":"边界:微博JSON字段全为空时的处理"}
{"id":"tscn-edge-009","input":{"platform":"xiaohongshu","http_status":500,"html":"Internal Server Error","fallback":"xhs_search_notes_html"},"expected_output":{"error":"SERVER_ERROR","message":"小红书服务端异常,5分钟后重试并切换代理","action":"retry_with_backoff","retry_delay_sec":300,"next_source":"xhs_search_notes_html"},"note":"边界:服务端500时的重试与降级"}
{"id":"tscn-edge-010","input":{"platform":"jjwxc","raw_html":"<table id='ranklist'><tr><td>1</td><td><a href='/123'></a></td><td></td><td></td><td></td></tr></table>"},"expected_output":{"platform":"jjwxc","rank":1,"topic":"","hot_value":null,"category":"小说","trend_direction":"stable","trend_change":"0","duration":"长期","author":"","likes":null},"note":"边界:HTML解析到空title与空author时保留空字符串不报错"}
{"id":"tscn-edge-011","input":{"platform":"toutiao","raw_json_fragment":{"Title":"","Url":"/hot-event/hot-board/","HotValue":"not_a_number"}},"expected_output":{"platform":"toutiao","rank":1,"topic":"","hot_value":0,"category":"热榜","trend_direction":"stable","trend_change":"0","duration":"实时","author":null,"likes":null},"note":"边界:非法hot_value字符串时回退为0"}
{"id":"tscn-edge-012","input":{"platform":"bilibili","raw_item":{"title":"测试trend_direction异常值","owner":{"name":"test"},"stat":{"view":100},"tnamev2":"测试","bvid":"BVtest","trend_change":"N/A"}},"expected_output":{"platform":"bilibili","rank":1,"topic":"测试trend_direction异常值","hot_value":100,"category":"测试","trend_direction":"stable","trend_change":"0","duration":"未知","author":"test","likes":null},"note":"边界:非标准trend_change值时trend_direction回退为stable"}
{"id":"tscn-edge-013","input":{"platform":"douban","http_status":200,"raw_html":"<html><body>Access Denied</body></html>"},"expected_output":{"error":"BLOCKED","message":"豆瓣返回Access Denied,需检查Cookie或切换IP","action":"trigger_fallback","next_source":"douban_chart_html"},"note":"边界:200状态码但内容为拦截页时的识别"}
{"id":"tscn-edge-014","input":{"platform":"weibo","records":[{"rank":1,"topic":"A"},{"rank":1,"topic":"A"}],"dedup_key":"md5(topic)"},"expected_output":{"kept":1,"removed":1,"reason":"同一平台同一topic重复","remaining_platforms":["weibo"]},"note":"边界:严格去重(仅按topic去重而不是platform+topic+timestamp)"}
{"id":"tscn-edge-015","input":{"platform":"douyin","raw_item":{"word":"短剧热词","hot_value":-100,"position":5,"label":"新"}},"expected_output":{"platform":"douyin","rank":5,"topic":"短剧热词","hot_value":0,"category":"热榜","trend_direction":"stable","trend_change":"0","duration":"实时","author":null,"likes":null},"note":"边界:hot_value为负数时裁剪为0"}
{"id":"tscn-edge-016","input":{"platform":"bilibili","raw_item":{"title":"超长标题测试abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ","owner":{"name":"up主"},"stat":{"view":9999999,"like":888888},"tnamev2":"单机游戏","bvid":"BVlong"}},"expected_output":{"platform":"bilibili","rank":1,"topic":"超长标题测试abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ","hot_value":9999999,"category":"单机游戏","trend_direction":"stable","trend_change":"0","duration":"未知","author":"up主","likes":888888},"note":"边界:超长标题不截断完整透传"}
{"id":"tscn-edge-017","input":{"platform":"zhihu","raw_item":{"display_query":"AI简 历 诊 断","query":"AI简历诊断"}},"expected_output":{"platform":"zhihu","rank":1,"topic":"AI简 历 诊 断","hot_value":0,"category":"搜索热词","trend_direction":"up","trend_change":"0","duration":"未知","author":null,"likes":null},"note":"边界:display_query包含空格时保留原始空格"}
{"id":"tscn-edge-018","input":{"platform":"baidu","raw_html_fragment":"<div class='content'><div class='c-single-text-ellipsis'>特殊字符&lt;测试&gt;</div></div>"},"expected_output":{"platform":"baidu","rank":1,"topic":"特殊字符<测试>","hot_value":0,"category":"热搜","trend_direction":"up","trend_change":"0","duration":"实时","author":null,"likes":null},"note":"边界:HTML实体需要正确解码"}