zizi 208a36ee6c feat(agent-loop): v1 全闭环建设波收口 — D1-D5 五件交付 + 双spec + 种子/烟测产物
- D1: Registry 3 prompt(策划/对抗/fix)+eval 骨架+registry 注册
- D2: agent-loop 2 schema + 4 模板 schema(对齐 gen_spike 真源, additionalProperties:false)
- D3: 编排器+裁决引擎(judge D1-D10 决策表/账本幂等重放/预算闸熔断/eval 回流/批报告), 59 单测绿(mini-desktop)
- D5: 玩家 CDP 取证 player_cdp.py(真点击/蛇形→驼峰映射/demo 三信号/三角合成判定), 9001 自测 PASS
- (D4 后端件已在 9bf3d54 先行入库, 三条 mvn 两轮独立实跑全绿)
- spec: 评审版(已拍板)+execution 版(已审定+建设期补充裁决 D4-a~d/D5-a~c/D2-a/D3-a)
- W2 试点/种子 9003-9008/B4 四链路烟测 产物与总账/作战清单同步
- eval 种子: C1 spike 52 条转入 config.clicker-designer(inputs 52/labels 13)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-10 06:24:43 +08:00

53 lines
2.3 KiB
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# -*- coding: utf-8 -*-
# B3 种子 feed/stream 验证脚本(可复跑,自带 HTTP 请求,无须 curl
# 断言:卡片数>=8、含 6 个新标题、中文无乱码。
# 用法python3 assert_feed.py
import json
import urllib.request
# 1) 请求 staging feed/streammock 鉴权头GET 只读)
URL = 'http://100.64.0.7:48080/app-api/feed/stream?size=30'
req = urllib.request.Request(URL, headers={
'Authorization': 'Bearer test1',
'tenant-id': '1',
})
with urllib.request.urlopen(req, timeout=15) as resp:
raw = resp.read().decode('utf-8')
# 落盘原始响应供报告/复核
with open('/tmp/feed_after.json', 'w', encoding='utf-8') as f:
f.write(raw)
data = json.loads(raw)
print('code =', data.get('code'))
top = data.get('data') or {}
print('data 顶层键 =', list(top.keys()) if isinstance(top, dict) else type(top).__name__)
# 2) 兼容字段名:定位卡片列表
cards = None
if isinstance(top, dict):
for k in ('list', 'cards', 'items', 'records'):
if isinstance(top.get(k), list):
cards = top[k]
break
if cards is None and isinstance(top, list):
cards = top
assert cards is not None, '未找到卡片列表字段: ' + json.dumps(top, ensure_ascii=False)[:300]
print('卡片数 =', len(cards))
if cards:
print('单卡字段 =', list(cards[0].keys()))
titles = [c.get('title') for c in cards]
print('标题序列 =', json.dumps(titles, ensure_ascii=False))
# 3) 三条断言:数量 / 新标题齐全 / 无双重编码乱码特征字符
expected = ['蓝莓妹的小卖部·结账高峰', '凌晨两点的便利店', '猫咖时光·撸猫集心', '烤串二十翻', '车门即将关闭', '指尖戳戳乐']
missing = [t for t in expected if t not in titles]
print('断言1 卡片数>=8:', 'PASS' if len(cards) >= 8 else 'FAIL')
print('断言2 含6新标题:', 'PASS' if not missing else 'FAIL 缺失=' + json.dumps(missing, ensure_ascii=False))
bad = [t for t in titles if t and ('Ã' in t or 'å' in t or '<EFBFBD>' in t)]
print('断言3 无乱码字符:', 'PASS' if not bad else 'FAIL 乱码=' + json.dumps(bad, ensure_ascii=False))
# 4) 打印新卡 gameId/versionId 供报告引用
for c in cards:
if c.get('title') in expected:
print('新卡:', c.get('gameId'), c.get('versionId'), c.get('title'))