docs(catalog): add IP-031 for the manager-context versus Turn-authority boundary - #4432
Conversation
The Lark Manager connection shipped a boundary where message visibility is not Turn authority, and IP-031 is the catalog entry for it. This revision keeps a single IP-031 registration and adds the state-contract detail to that entry instead of registering the same boundary a second time: the route-mode trigger, the MANAGER_CONTEXT_ITEM_LIMIT / MANAGER_CONTEXT_CHARACTER_LIMIT projection budget with context-only item rendering, the historical_context_only catch-up rule, the note that the limits bound one Turn projection rather than durable retention, the IP-011 complement, and the unauthorized-mutation bad smell. The P1 importance row and the registered entry title stay unchanged. Closes loopx-project#4373 Signed-off-by: Exusty <107248786+Exusty@users.noreply.github.com> Signed-off-by: huangruiteng <14976749+huangruiteng@users.noreply.github.com>
2500954 to
874f2c0
Compare
huangruiteng
left a comment
There was a problem hiding this comment.
队列前言(loopx pr-review --state open --limit 200,complete=true,policy_revision=3,other-developers-first):本卡是 #4432 在 head 874f2c02c 上的评审。该 PR 与 #4374 登记的是同一个边界,两者需要合成一条目录条目,本 head 就是维护者侧的合成结果。
结论先行:通过。 内容本身正确且比原稿更精确(把运行时常量与 route mode 写进了条目);需要披露的是本 head 不再新增第二个 IP-031——冲突解决把它并入了已落地的同一条目。
动机
Lark Manager 连接上线的边界是「消息可见 ≠ 授权一次 Turn」,interaction pattern catalog 里对应的条目此前只有文字描述:既没写 context_only / turn_authorized 两种 route mode,也没写约束单次投影的限额常量,更没写历史补采的 historical_context_only 标记。结果是读者要判断某个改动是否越界时,只能回去读 Lark 扩展模块,而这正是目录应当省掉的功夫。这段 state contract 填的正是这个空档。
改动思路
入口是 docs/concepts/interaction-pattern-catalog.md 的 IP-031 小节。原稿打算新登记一个条目(含 P0 行、state contract、示范流程),但同一编号的 IP-031 已由并发 PR 先行落地,因此本轮把它改成对同一条目的增补:触发条件补 route mode、预期行为改成引用运行时限额常量、新增 State contract 代码块、补 IP-011 互补说明、把 bad smell 扩到「未授权却真的花了 Turn 并改了 Goal/Todo」。
一个需要明确披露的取舍:原稿的 P0 行没有保留。目录自己的定义里 P0 是「可能阻塞或误路由 controller turn 的热路径」,而该家族里同类边界登记(IP-011 来源契约、IP-028 Connector Runtime Boundary、IP-025 diagnostic sidecar)都是 P1 的持久运行行为,IP-031 已按此落地,因此我保留 P1 与已注册标题,不重复登记、不制造两个优先级。
具体改动
1 个文件 +44/−12,全部落在 IP-031 小节内:触发条件新增 context_only rather than turn_authorized 一条;预期行为改写为 MANAGER_CONTEXT_ITEM_LIMIT(八条)与 MANAGER_CONTEXT_CHARACTER_LIMIT(4,000 字符)、- [context-only] ... 渲染、以及「限额只约束一次 Turn 投影,不等于持久 retention」;补上 historical_context_only=True;新增 State contract 代码块(manager_route_authority、manager_context_material、connection_health);bad smell 增补未授权 mutation 一句。
我逐项核对了 contract 里的名字确实存在于运行时:lark_manager_context_retention_v0、MANAGER_CONTEXT_ITEM_LIMIT = 8、MANAGER_CONTEXT_CHARACTER_LIMIT = 4000、historical_context_only 在 loopx/extensions/lark/manager_context.py,context_only / turn_authorized 在 manager_routing.py,context_only_captured / replied_and_acknowledged 在 goal_topic_runtime.py。examples/interaction-pattern-catalog-smoke.py 在本 head 输出 ok,git diff --check 干净。
对主干的风险
文档型改动,主要风险是「契约与运行时漂移」:contract 块是运行时名字的手工副本,目录 smoke 只校验接线结构,不校验这些名字是否仍然存在,将来重命名会静默过时。这条已作为 P3 记录,并给出可执行的收口方式(用一个 docs smoke 断言 schema version、mode 枚举与限额常量)。
第二类风险是重复登记,也就是本 PR 原本的形态:同一模式出现两个 IP-031、两个优先级分类,且两段正文各自演化。本 head 已通过 rebase 消除——IP-031 在目录里仍然只出现三处(家族行、P1 行、小节),P0 行不再出现。此外该 PR 的 fork workflow 首次运行时处于 action_required,由维护者放行后才执行,Sign-off、merge-gate、dependency-review、changes 与 docs 路径矩阵均通过,其余 job 按路径条件 skip。
我的整体评价
这是对既有条目的实质增补而非重复:它把「可见性≠授权」从一句判断补成可对照运行时的契约,且每个新增名字都能在代码里找到对应物。与 #4374 的条目争号问题已通过「一条目、一优先级、一标题」的合成解决,作者提交的作者信息保留,维护者签名一并附上。P3 观察已记录,不阻塞,本 head 给通过结论。
English verdict: APPROVE at exact head 874f2c0 — the revision folds the manager-context state contract into the single registered IP-031 entry instead of registering the same boundary twice, adding the context_only versus turn_authorized trigger, the MANAGER_CONTEXT_ITEM_LIMIT / MANAGER_CONTEXT_CHARACTER_LIMIT projection budget with context-only item rendering, historical_context_only=True, the IP-011 complement, a State contract block, and the unauthorized-mutation bad smell. Every cited name resolves in the Lark extension modules, IP-031 still appears as exactly one registration (family row, P1 row, section), examples/interaction-pattern-catalog-smoke.py passes at this head, and git diff --check is clean. One non-blocking P3 finding: the contract block is a hand-maintained copy of runtime names that no smoke asserts, so a future rename would drift silently.
合并决策记录(exact head
|
Summary
family. The Lark Manager connection shipped a boundary the catalog did not
describe: message visibility is not Turn authority.
sources (provider-native mention, provider-verified reply, or another existing
typed authority record), the eight-item / 4,000-character projection budget,
history catch-up that always stays
context_only, and settlement of consumedmaterials after a verified reply.
pattern-to-canary matrix.
Issue Or Task
Validation
250095447e6134dc288d5005a04704d2daeb1b86finishedsyntheticstaticpassedloopx check --scan-path docs/concepts/interaction-pattern-catalog.md→ok: True,errors=0(two pre-existing warnings about an absent local.loopx/registry.json)staticpassedpython examples/interaction-pattern-catalog-smoke.py→interaction-pattern-catalog-smoke: okstaticpassedpython examples/canary/catalog-planner-smoke.py→catalog-canary-planner-smoke oknot_applicable. The three static checks above are the exact validators thetask named plus the two existing catalog smokes. Untested paths: none
identified. The Mermaid diagram was authored against the syntax already used by
IP-026 and IP-028 in the same file but is not rendered by CI.
Frontend / Visual Evidence
Type of Change
LoopX Area
Technical Direction
Core control-plane hardening
Long-horizon benchmark evidence
Operator surface and IM integration
Shared Goal Authority and cross-host coordination
Architecture and research incubator
Target base branch:
mainDirection tracker or promotion unit: N/A
Shared-authority RFC fixture impact
N/A
Boundary Checklist
.loopx/,.codex/goals/, and liveACTIVE_GOAL_STATE.md).none.Signed-off-bytrailer (git commit -s).