test(control-plane): refresh hot-path interface budgets - #4202
Conversation
Signed-off-by: huangruiteng <huangrt01@163.com>
huangruiteng
left a comment
There was a problem hiding this comment.
Approval conclusion (author-owned PR; GitHub blocks formal self-approval)
动机
PR #4194 在 heartbeat 热路径中加入了必须存在的 scope-bounded/no-tiny-step 执行契约,真实 JSON 从预算内增长到 3509/3500;当前 dashboard 投影也已达到 18387/18215。把这些失败直接标成“无关基线”会让 canary 失去阻止无界积累的作用,但压掉必要字段也会损伤机器契约。本 PR 的目标是对已经审定的 schema 做一次窄幅、可解释的预算重基线。审阅绑定 exact head cfdccfef25221b625f78304af4a9270b818f9066。
改动思路
只调整两个字符数上限:heartbeat 3500→3600,dashboard 18215→18500;不改 payload 生成、序列化、task body、nested key、top-level key 或其他 surface 的预算。这样 heartbeat 恢复 91 字符边际,dashboard 恢复 113 字符边际,同时结构增长仍由独立计数门禁约束。
具体改动
examples/control_plane/hot-path-interface-budget-smoke.py:更新heartbeat_prompt_json和dashboard_status_json的max_json_chars。docs/reference/contracts/interface-budget-contract.md:同步唯一公开契约表中的对应数字。- handoff 仍为 2126/3000、quota 仍为 12787/13000;heartbeat nested/top-level 仍为 30/40 与 24/30;dashboard top-level 仍为 25/25。
对主干的风险
主要风险是借“基线漂移”逐步放松热路径;本 diff 通过窄幅 headroom 和不变的结构预算限制该风险。dashboard 顶层 key 已是 25/25,因此新增任何顶层字段仍会立即失败;heartbeat 的 1900 字符 task-body cap 也未改变。真实 hot-path smoke、Ruff、diff check、public-boundary scan 均通过;Change Quality receipt cqr_edebfbf8fe43c9b11be1 精确匹配当前 base/head;全量 premerge canary 11/11 通过,零失败、零警告、零 hold。
我的整体评价
这是合理的最小重基线,不是取消 canary。它保留了 bytes 与结构两个独立的阻尼层,并把当前真实值与公开契约重新对齐;未发现需要删字段或引入压缩/兼容分支。当前 exact head 可合并,仍需等待远端检查全绿并再次通过 exact-head readiness gate。
English verdict: APPROVE exact head cfdccfef25221b625f78304af4a9270b818f9066; narrowly rebaseline two byte limits while preserving every structural and task-body budget, with merge gated on complete green checks.
Summary
Rebaseline two hot-path JSON byte budgets to the current intentional schemas without weakening their structural controls.
heartbeat_prompt_jsonfrom 3500 to 3600 characters after feat(heartbeat): load current thin rules from managed automations #4194's required scope-bounded/no-tiny-step contract moved the real payload to 3509.dashboard_status_jsonfrom 18215 to 18500 characters for the current 18387-byte projection.Why this is not a blanket budget increase
The previous heartbeat limit left negative headroom for an intentional, required contract field, while its bounded task body remains 1448/1900. The new 3600 limit restores 91 characters of bounded operational margin. Dashboard remains structurally saturated at 25/25 top-level keys, so any new top-level field still forces an explicit rebaseline even below 18500 bytes.
Validation
cqr_edebfbf8fe43c9b11be1, exact scope verified against21beaa6d.Scope and future-facing pass
This is the smallest cohesive rebaseline for the two already-shipped payloads. It does not add fallback serialization, remove fields, or loosen shape/count constraints. Final Change Quality and canary evidence were refreshed after rebasing onto the latest
mainimmediately before publishing.