check_agentic_project_metric
检查生产环境项目表露出率与 L1 snapshot 露出率是否一致。
数据源
- 项目表
GET https://geo-api.hisense.com/api/agentic-project/project?page=1&page_size=999&listed=all
Header:x-token - 项目指标(L1 snapshot)
GET https://geo-api.hisense.com/api/geo_label/l1/snapshot?project_id={id}&platform=ALL&batch_date_from={date}&batch_date_to={date}&page=1&page_size=20
Header:x-token
项目过滤
与月度表对齐,须同时满足:
listed = 1status = 'running'end_month = '2026-09'target_metric_name = '露出率'
比对项
| 项目表 | snapshot |
|---|---|
current_metric_value(指标名=露出率) |
exposure_rate |
不一致时输出批量回写 SQL(以 snapshot 为准):
UPDATE `agentic`.agentic_project
SET current_metric_value = CASE id
WHEN ... THEN ...
END
WHERE company_id = 13 AND id IN (...);
默认 batch_date = 2026-09-12,可用环境变量覆盖:
BATCH_DATE=2026-09-12 go run ./haoxian_hisense/agentic_project/check_agentic_project_metric
运行
go run ./haoxian_hisense/agentic_project/check_agentic_project_metric
配置
config/config.dev.yaml(已 gitignore):
hisense_geo:
base_url: "https://geo-api.hisense.com"
token: "" # x-token,勿提交仓库