72b6b54719
Both open issues ask the same question from opposite sides: how much power the library holds over a downstream database. #13 wants the structural writes back, #12 wants the data retention back. The two designs share one boundary -- the library does SELECT and INSERT plus an optional CREATE, and everything that alters structure or deletes rows belongs to the downstream, with the library obliged to print the exact SQL they need to run. Two findings shape #13 beyond what the issue argues. The precedents it cites (Hangfire's lock queue, Prefect's multi-instance race, Alembic's audit trail) all live on a shared production Postgres, while the SQLite side is a local file with no DBA and no migration tool, so the defaults split by backend rather than uniformly. And turning ALTER off only works together with trimming the INSERT to the columns that exist: without it a stale table drops every row instead of two columns, which breaks the telemetry rule harder than the automatic ALTER ever did. For #12 only the body cap touches library code; retention and access control land in the README, because the sdist carries src and the README alone -- a template that lives in the wiki is one a downstream pip install cannot reach.
315 lines
10 KiB
JSON
315 lines
10 KiB
JSON
{
|
|
"directed": true,
|
|
"nodes": [
|
|
{
|
|
"id": "plan:m1-core-plan",
|
|
"label": "M1 核心里程碑实现计划",
|
|
"type": "plan"
|
|
},
|
|
{
|
|
"id": "schema:llm-calls",
|
|
"label": "表结构: llm_calls(遥测 18 字段)",
|
|
"type": "schema"
|
|
},
|
|
{
|
|
"id": "metric:call-telemetry-coverage",
|
|
"label": "每次调用必录覆盖率(含缓存命中/失败/取消)",
|
|
"type": "metric"
|
|
},
|
|
{
|
|
"id": "finding:m2-soak-workload",
|
|
"label": "M2 真实数据压测: 场景矩阵与数据清单",
|
|
"type": "finding"
|
|
},
|
|
{
|
|
"id": "design:m2-distributed",
|
|
"label": "M2 分布式:Redis 治理后端+背压+Postgres 遥测+pricing+Embedding+压测 harness",
|
|
"type": "design"
|
|
},
|
|
{
|
|
"id": "plan:m2-distributed",
|
|
"label": "M2 分布式实现计划",
|
|
"type": "plan"
|
|
},
|
|
{
|
|
"id": "finding:m2-verifier-fixes",
|
|
"label": "M2 verifier 三项 Important 补齐(不变量接线/网关保护/P3 验收)",
|
|
"type": "finding"
|
|
},
|
|
{
|
|
"id": "finding:p6-soak-baseline",
|
|
"label": "P6 混合浸泡首跑基线与记分板三重伪击穿修复",
|
|
"type": "finding"
|
|
},
|
|
{
|
|
"id": "design:m25-resilience",
|
|
"label": "M2.5 治理韧性: 半死源隔离与健康感知调度",
|
|
"type": "design"
|
|
},
|
|
{
|
|
"id": "plan:m25-resilience",
|
|
"label": "M2.5 治理韧性实现计划",
|
|
"type": "plan"
|
|
},
|
|
{
|
|
"id": "finding:m25-acceptance",
|
|
"label": "M2.5 验收: P6 同场景 58.1% → 98.96%",
|
|
"type": "finding"
|
|
},
|
|
{
|
|
"id": "design:m3-ocr",
|
|
"label": "M3 OCR 端口族设计",
|
|
"type": "design"
|
|
},
|
|
{
|
|
"id": "metric:ocr-call-success",
|
|
"label": "OCR 治理调用成功率与错误分类分布",
|
|
"type": "metric"
|
|
},
|
|
{
|
|
"id": "plan:m3-ocr",
|
|
"label": "M3 OCR 实现计划",
|
|
"type": "plan"
|
|
},
|
|
{
|
|
"id": "finding:p7-ocr-soak",
|
|
"label": "P7 OCR soak 验收: 99.73% 与 13 不变量全 PASS",
|
|
"type": "finding"
|
|
},
|
|
{
|
|
"id": "design:m4-migration",
|
|
"label": "M4 迁移验证设计(GovDoc→CHS,发 v1.0)",
|
|
"type": "design"
|
|
},
|
|
{
|
|
"id": "plan:m4-migration",
|
|
"label": "M4 迁移实现计划(T0-T14)",
|
|
"type": "plan"
|
|
},
|
|
{
|
|
"id": "finding:m4-acceptance",
|
|
"label": "M4 迁移验收(GovDoc+CHS)",
|
|
"type": "finding"
|
|
},
|
|
{
|
|
"id": "design:settings-invariant-guards",
|
|
"label": "GatewaySettings 跨字段不变量守卫的生效范围",
|
|
"type": "design"
|
|
},
|
|
{
|
|
"id": "design:settings-invariants-round-2",
|
|
"label": "GatewaySettings 装配校验补齐(第二轮)",
|
|
"type": "design"
|
|
},
|
|
{
|
|
"id": "design:est-tokens-decoupling",
|
|
"label": "est_tokens 解耦: 拆分限流预扣与遥测用量兜底(issue #2)",
|
|
"type": "design"
|
|
},
|
|
{
|
|
"id": "plan:est-tokens-decoupling",
|
|
"label": "est_tokens 解耦实施计划",
|
|
"type": "plan"
|
|
},
|
|
{
|
|
"id": "design:response-observability-fields",
|
|
"label": "响应可观测字段扩展(Issue #3)",
|
|
"type": "design"
|
|
},
|
|
{
|
|
"id": "plan:response-observability-fields",
|
|
"label": "响应可观测字段扩展实现计划",
|
|
"type": "plan"
|
|
},
|
|
{
|
|
"id": "design:sampling-params",
|
|
"label": "采样参数透传设计(issue #4)",
|
|
"type": "design"
|
|
},
|
|
{
|
|
"id": "plan:sampling-params-plan",
|
|
"label": "采样参数透传实现计划(issue #4)",
|
|
"type": "plan"
|
|
},
|
|
{
|
|
"id": "design:governance-backend-error",
|
|
"label": "治理后端故障归位为 scope 级不可用(Issue #7)",
|
|
"type": "design"
|
|
},
|
|
{
|
|
"id": "plan:governance-backend-error",
|
|
"label": "实现计划: 治理后端故障归位为 scope 级不可用(Issue #7)",
|
|
"type": "plan"
|
|
},
|
|
{
|
|
"id": "design:issue8-stall-budget",
|
|
"label": "stall 判定改为非生产性等待口径",
|
|
"type": "design"
|
|
},
|
|
{
|
|
"id": "plan:issue8-stall-budget-plan",
|
|
"label": "issue #8 实施计划: stall 非生产性等待口径",
|
|
"type": "plan"
|
|
},
|
|
{
|
|
"id": "design:issue10-error-body-retention",
|
|
"label": "HTTP 错误响应体留存(Issue #10)",
|
|
"type": "design"
|
|
},
|
|
{
|
|
"id": "plan:issue10-error-body-retention-plan",
|
|
"label": "实现计划: HTTP 错误响应体留存(Issue #10)",
|
|
"type": "plan"
|
|
},
|
|
{
|
|
"id": "plan:issue11-caller-dimensions",
|
|
"label": "调用方自定义维度实现计划(issue #11)",
|
|
"type": "plan"
|
|
},
|
|
{
|
|
"id": "design:issue13-schema-mode",
|
|
"label": "issue #13: 遥测 schema 自动 ALTER 降级为按后端不对称的显式档位",
|
|
"type": "design"
|
|
},
|
|
{
|
|
"id": "design:issue12-telemetry-retention",
|
|
"label": "issue #12: 遥测表的正文体量、保留期与访问控制",
|
|
"type": "design"
|
|
}
|
|
],
|
|
"links": [
|
|
{
|
|
"source": "plan:m1-core-plan",
|
|
"target": "design:m1-core-design",
|
|
"relation": "implements",
|
|
"evidence": "plans/2026-07-20-m1-core-plan.md 实现 designs/2026-07-20-m1-core-design.md 冻结的全部签名",
|
|
"added": "2026-07-20T10:18:41.339537+00:00"
|
|
},
|
|
{
|
|
"source": "metric:call-telemetry-coverage",
|
|
"target": "schema:llm-calls",
|
|
"relation": "measures",
|
|
"evidence": "遥测必录铁律: 一切调用路径落 llm_calls",
|
|
"added": "2026-07-20T11:11:46.302045+00:00"
|
|
},
|
|
{
|
|
"source": "schema:llm-calls",
|
|
"target": "design:m1-core-design",
|
|
"relation": "implements",
|
|
"evidence": "M1 设计 §4.4 冻结 18 字段",
|
|
"added": "2026-07-20T11:11:47.240466+00:00"
|
|
},
|
|
{
|
|
"source": "plan:m2-distributed",
|
|
"target": "design:m2-distributed",
|
|
"relation": "implements",
|
|
"evidence": "plans/2026-07-20-m2-distributed-plan.md 实现 designs/2026-07-20-m2-distributed-design.md 全部八项",
|
|
"added": "2026-07-21T03:46:35.186670+00:00"
|
|
},
|
|
{
|
|
"source": "plan:m25-resilience",
|
|
"target": "design:m25-resilience",
|
|
"relation": "implements",
|
|
"evidence": "方案B三件套任务分解",
|
|
"added": "2026-07-21T12:30:35.550386+00:00"
|
|
},
|
|
{
|
|
"source": "metric:ocr-call-success",
|
|
"target": "schema:llm-calls",
|
|
"relation": "measures",
|
|
"evidence": "OCR 调用复用 llm_calls 表(provider=monkey 行,tokens=0),成功率=error IS NULL 占比,错误分布按 error 前缀归类",
|
|
"added": "2026-07-22T02:05:15.793306+00:00"
|
|
},
|
|
{
|
|
"source": "schema:llm-calls",
|
|
"target": "design:m3-ocr",
|
|
"relation": "implements",
|
|
"evidence": "M3 设计 §7: 复用 18 字段表,无新表;messages 占位摘要,图像 bytes 不入库",
|
|
"added": "2026-07-22T02:05:15.836258+00:00"
|
|
},
|
|
{
|
|
"source": "plan:m3-ocr",
|
|
"target": "design:m3-ocr",
|
|
"relation": "implements",
|
|
"evidence": "T1-T10 逐任务落地设计 §3-§12",
|
|
"added": "2026-07-22T02:09:43.346922+00:00"
|
|
},
|
|
{
|
|
"source": "plan:m4-migration",
|
|
"target": "design:m4-migration",
|
|
"relation": "implements",
|
|
"evidence": "T0-T14 逐节实现设计 §4-§10/§15",
|
|
"added": "2026-07-22T09:33:05.357964+00:00"
|
|
},
|
|
{
|
|
"source": "design:est-tokens-decoupling",
|
|
"target": "design:m1-core-design",
|
|
"relation": "refines",
|
|
"evidence": "精化 M1 冻结的 est_tokens 双职责语义: 保留 TPM 预扣、推翻 usage 缺失按 est 兜底(m1-core-design.md:59,222),改记 0/0 + unavailable + cost NULL",
|
|
"added": "2026-07-30T09:33:55.383401+00:00"
|
|
},
|
|
{
|
|
"source": "plan:est-tokens-decoupling",
|
|
"target": "design:est-tokens-decoupling",
|
|
"relation": "implements",
|
|
"evidence": "5 任务实现设计 §3.2 的 11 条改动项;任务排序经中间态破窗分析(先加能力→切调用点→三态生效→解绑约束)",
|
|
"added": "2026-07-30T09:39:26.442986+00:00"
|
|
},
|
|
{
|
|
"source": "plan:response-observability-fields",
|
|
"target": "design:response-observability-fields",
|
|
"relation": "implements",
|
|
"evidence": "计划 T1-T7 逐条实现设计的 A2/B1/C1/D1 四个决策",
|
|
"added": "2026-07-31T11:10:03.872049+00:00"
|
|
},
|
|
{
|
|
"source": "plan:sampling-params-plan",
|
|
"target": "design:sampling-params",
|
|
"relation": "implements",
|
|
"evidence": "11 个任务逐条覆盖设计的决策 A-G 与 §5 的 14 条测试清单",
|
|
"added": "2026-07-31T16:59:35.657367+00:00"
|
|
},
|
|
{
|
|
"source": "finding:2026-08-02-thinking-switch-and-reasoning-tokens",
|
|
"target": "design:2026-08-02-thinking-capability-design",
|
|
"relation": "supports",
|
|
"evidence": "供应商实测与业界调研为该设计的形态/能力分层与失败语义提供事实依据",
|
|
"added": "2026-08-02T09:38:57.033054+00:00"
|
|
},
|
|
{
|
|
"source": "plan:2026-08-02-thinking-capability",
|
|
"target": "design:2026-08-02-thinking-capability-design",
|
|
"relation": "implements",
|
|
"evidence": "T1-T10 逐条实现设计的 D1-D6 六个决策与 §11 九条验收标准",
|
|
"added": "2026-08-02T09:49:48.126539+00:00"
|
|
},
|
|
{
|
|
"source": "plan:governance-backend-error",
|
|
"target": "design:governance-backend-error",
|
|
"relation": "implements",
|
|
"evidence": "T1-T5 逐任务实现设计 §3 的五项决策与 §8 影响面清单",
|
|
"added": "2026-08-06T08:08:51.865565+00:00"
|
|
},
|
|
{
|
|
"source": "plan:issue8-stall-budget-plan",
|
|
"target": "design:issue8-stall-budget",
|
|
"relation": "implements",
|
|
"evidence": "T1-T6 实施该设计,含 §3.6 订正",
|
|
"added": "2026-08-06T14:58:01.673693+00:00"
|
|
},
|
|
{
|
|
"source": "plan:issue10-error-body-retention-plan",
|
|
"target": "design:issue10-error-body-retention",
|
|
"relation": "implements",
|
|
"evidence": "7 任务覆盖设计 G1-G4 与 §7 全部验收用例",
|
|
"added": "2026-08-16T09:50:57.830855+00:00"
|
|
},
|
|
{
|
|
"source": "plan:issue11-caller-dimensions",
|
|
"target": "design:issue11-caller-dimensions",
|
|
"relation": "implements",
|
|
"evidence": "按已批准设计拆解为 8 个任务,含设计范围外发现的 OCR 第三条链路",
|
|
"added": "2026-08-17T10:09:08.967997+00:00"
|
|
}
|
|
]
|
|
} |