test: sync PG telemetry integration helpers with 1.3.8 stall columns
_minimal_fields and the pre_135 acceptance dicts missed the two new columns, KeyErroring against migrated 39-column physical tables (caught by the pre-merge integration gate; production path is signature-gated and unaffected). Verifier gaps P2-1/P2-2 closed: full suite 1764 passed, PG 30 passed, lint green.
This commit is contained in:
@@ -170,6 +170,9 @@ def _minimal_fields(call_id: str | None = None, **overrides) -> dict[str, object
|
||||
# 逻辑快照两列只属终态行
|
||||
"attempts": None,
|
||||
"total_latency_ms": None,
|
||||
# —— 1.3.8 两列: 沉默归因只属流式 chat 成功 attempt 行(issue #27),普通行 NULL ——
|
||||
"stall_ms": None,
|
||||
"stall_count": None,
|
||||
}
|
||||
fields.update(overrides)
|
||||
return fields
|
||||
@@ -1103,7 +1106,7 @@ class TestCallObservabilityColumnsAcceptance:
|
||||
"""
|
||||
|
||||
async def test_pre_135_table_gains_the_ten_columns_and_old_rows_stay_null(self, pre_135_schema):
|
||||
"""27 列旧表 auto 补齐到 37 列,新行两类取值读得回,**历史行十列一律 NULL**。
|
||||
"""27 列旧表 auto 补齐到 39 列(1.3.5 十列 + 1.3.8 两列),新行两类取值读得回,**历史行新增列一律 NULL**。
|
||||
|
||||
旧行不回填是本版的明示决策(设计 §5): NULL 表达的是"补列之前根本没记过
|
||||
这件事",与任何哨兵值都不是一回事。若哪天有人给这十列加了 DEFAULT,历史行
|
||||
@@ -1170,6 +1173,9 @@ class TestCallObservabilityColumnsAcceptance:
|
||||
"error_body": "upstream said 503",
|
||||
"attempts": None,
|
||||
"total_latency_ms": None,
|
||||
# 1.3.8 两列: 普通成功 attempt 行无沉默观测 → NULL
|
||||
"stall_ms": None,
|
||||
"stall_count": None,
|
||||
}
|
||||
assert dict(by_id["term"]) == {
|
||||
"call_id": "term",
|
||||
@@ -1183,6 +1189,9 @@ class TestCallObservabilityColumnsAcceptance:
|
||||
"error_body": None,
|
||||
"attempts": 3,
|
||||
"total_latency_ms": 4200,
|
||||
# 1.3.8 两列: 终态行无 transport 观测 → NULL
|
||||
"stall_ms": None,
|
||||
"stall_count": None,
|
||||
}
|
||||
# 历史行: 十列逐列 NULL(整体比对,漏掉任一列都红)
|
||||
assert dict(by_id["pre135"]) == {
|
||||
|
||||
Reference in New Issue
Block a user