docs: sync the field counts and module map to 1.3.1

The telemetry field count is taken from inspect.signature, not from
memory, because that is the one the release checklist keeps catching.
llm-calls.md said 22 and was two rounds stale; fixing the title alone
would have left the table contradicting it, so tenant_id and meta are
documented too.

The production template needed no new column — it derives them with
LIKE. What it gained is an assertion that it must keep deriving them
and must not inline a column name, which is the drift that could
actually happen.

The changelog leads with the three breaking items. A patch number
carries no warning by design, so the entry has to.
This commit is contained in:
2026-08-26 01:03:25 -04:00
parent 1921a067a1
commit 578a144231
8 changed files with 192 additions and 14 deletions
@@ -1276,6 +1276,19 @@ class TestProductionTemplate:
# 占位符没了 = 受控替换静默失效,测试会去打真实的 polygateway_* 角色
assert placeholder in joined, f"README 模板缺占位符 {placeholder!r}"
# 再钉死列的**同源性**: `table` 块必须靠 `LIKE llm_calls_seed` 从库自建的表派生
# 列,绝不能手抄一份列定义。手抄的那份会与 telemetry/schema.py 各自漂移,而漂移
# 的表现是照模板部署的下游少掉新增列——manual 档下库按现有列裁剪写入,那一列
# 就此静默消失,正是可观测性 issue 要消灭的那类静默。
table_sql = blocks["table"]
assert "LIKE llm_calls_seed" in table_sql, "生产模板的列必须由 LIKE 派生,不得手抄"
inlined = [
column
for column in COLUMNS
if re.search(rf"^\s*{column}\s+[A-Z]", table_sql, re.MULTILINE)
]
assert not inlined, f"生产模板内联了列定义 {inlined},与 telemetry/schema.py 必然漂移"
async def test_app_can_insert_but_cannot_mutate(self, production_template):
"""应用角色: INSERT 通过,UPDATE / DELETE 被权限层拒绝(不是被触发器拒)。