067b15be48
Field counts come from inspect, not memory: record_llm_call takes 36 parameters, COLUMNS has 36 entries, the physical table has 37. - README: capability table says 36 fields and names the three row kinds; new section covers reading call_stats, the five SQL migration items, the attribution query and the storage-side upgrade - README/.env.example/ARCHITECTURE: error_body follows the summarize_body limit and the structured-exhaustion error carries its own bounded explanation, so neither is inside PGW_TELEMETRY_TEXT_CAP coverage - ARCHITECTURE 7.8: the ten columns with per-column semantics, the I3/I4 invariants, operation versus exc.operation, and the assembly gate - CHANGELOG: unreleased section listing the four public changes and what downstream must do, in particular counting failures by event_kind and the assembly-time error for custom recorders - schemas/llm-calls: the ten columns plus a three-row-kind section - metrics/call-telemetry-coverage: 1.3.5 coverage contract, real live baselines left unfilled rather than stating a fake percentage Validation record records the T4 evidence: mechanical migration red then green, the four PG acceptance cases, the seven-item mutation matrix with all seven killed and the copy restored to an identical digest, plus the PYTHONPATH pitfall that made the first mutation round silently test the original source. Version numbers and release steps are deliberately untouched.
2.8 KiB
2.8 KiB
type, node_id, title, date
| type | node_id | title | date |
|---|---|---|---|
| metric | metric:call-telemetry-coverage | 每次调用必录覆盖率(含缓存命中/失败/取消) | 2026-07-20 |
每次调用必录覆盖率(含缓存命中/失败/取消)
1.3.4 契约与基线
| 指标 | 确定性阈值/证据 | 实际 live 基线 |
|---|---|---|
| 三个无推理入口成败行档位 NULL | embed、recognize_text、parse_layout 真实 client→emitter→临时 SQLite,非空失败/成功计数与 NULL 全部成立,契约要求100% | 待首次实际运行,不填伪百分比 |
| chat 阳性 | 糖失败 auto、显式意图失败、nearest 成功实际档均精确匹配,要求100%;防恒 NULL 假绿 | 待首次实际运行 |
| 四种行来源 | 真实成功=applied;失败=effective;cache_hit/scope终态=本次请求级 | 排除缓存/失败后才可做实际档分析 |
| live 覆盖 | 逐轮 PASS/FAIL/UNCOVERED、计划轮数与缺轮分别统计;必需单元不因 pytest exit 0 自动放行 | 未执行;UNKNOWN/缺轮/skip 不能记PASS |
复用 schema:llm-calls(无新字段/DDL),证据索引见 findings/2026-09-09-134-thinking-contracts-validation.md。独立错误取证只在 tests 内存,Markdown 只记录白名单安全摘要与布尔校验,不使用生产遥测旁路补失踪尝试。生产埋点仍是 TelemetryEmitter 单点出口。
1.3.5 三类行与逻辑调用覆盖
本版把覆盖度的计量单位从"一次尝试"改成"一次逻辑调用"——此前结构化耗尽、embedding/OCR 的无源与准入拒绝根本没有任何行,"每次调用必录"在这几条路径上是不成立的。
| 指标 | 确定性阈值/证据 | 实际 live 基线 |
|---|---|---|
| 领域失败的终态行覆盖 | chat 结构化耗尽、embedding/OCR 的 no_sources、准入拒绝、retry_exhausted、尝试外取消各恰有 1 条;单测以真实临时 SQLite 抓实 |
待首次实际运行,不填伪百分比 |
| 至多一条(I3) | 同一逻辑调用重复进出口不产生第二条(claim_terminal);recorder 写失败仅 warning,故 SQL 可见 ≤ 1 |
待首次实际运行 |
| 非领域异常 0 条(I4) | 编程错(如 KeyError)不写终态行、原样传播、分类不被改写 |
待首次实际运行 |
| 诊断列保真 | 中转把 529 改写成 503 则记 503(不猜回);空 str() 的 httpx 超时类落 cause_type;成功行五列 NULL |
待首次实际运行 |
| 存储兼容 | 真实 PG 沙箱: auto 追加十列、manual 裁剪写入、旧行新列恒 NULL、新旧进程混写共存 | 2026-09-09 实跑 30 passed(见下方证据索引) |
本版新增十列(见 schema:llm-calls),不新建表、不新增依赖。证据索引见 findings/2026-09-09-135-call-observability-validation.md;覆盖度真实基线仍待首次生产运行填入,不写伪百分比。