You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Expose isolated context forks and provenance for Ekko integration #2018
Ekko Studio needs a public, profile-scoped context-manager contract for usage provenance, exact branch snapshots, and isolated child/sibling search and decompression.
This issue tracks the cross-repository protocol additions in the accompanying PR. The implementation must remain fail-closed when fork capability or provenance is unavailable.
[bot] 🏷 Received. The accompanying PR is #2017 (2026-10-04_plugin-fork-context-provenance). Per platform rules this issue tracks that PR's cross-repo protocol additions rather than re-doing the work — I'm now pulling the branch, verifying the implementation against the issue requirements (profile-scoped contract, usage provenance, exact branch snapshots, isolated child/sibling search + decompression, fail-closed when fork capability/provenance is unavailable) and checking CI. Full structured conclusion will follow in-thread.
Activity
ranxianglei commentedon Oct 3, 2026
[bot] 🏷 Received. The accompanying PR is #2017 (
2026-10-04_plugin-fork-context-provenance). Per platform rules this issue tracks that PR's cross-repo protocol additions rather than re-doing the work — I'm now pulling the branch, verifying the implementation against the issue requirements (profile-scoped contract, usage provenance, exact branch snapshots, isolated child/sibling search + decompression, fail-closed when fork capability/provenance is unavailable) and checking CI. Full structured conclusion will follow in-thread.ranxianglei commentedon Oct 3, 2026
验证完成(审计对象:PR #2017 head
85ec9c1b;期间分支有一次 in-flight 变动,见第 3 问)。按七问逐项作答:1. 是什么问题:#2018 是跟踪 issue——核对 PR #2017 的跨仓协议增量是否满足 Ekko Studio 的四项要求(public profile-scoped context-manager 契约、usage provenance、exact branch snapshots、isolated child/sibling search & decompression),且 fork capability 或 provenance 缺失时必须 fail-closed。这是验证任务,不是缺陷修复。
2. 什么原因导致的:不涉及(无缺陷被修)。但验证中发现分支历史丢失过一次此前的 review 修复,见下。
3. 怎么验证的 / 修了什么:
capabilities.fork {protocolVersion:1, endpoint, snapshotEndpoint};旧版 bili 无此字段 → host 端可据此缺省关闭功能。/__bili/plugin/snapshot?conversationId=):返回有序 raw/ref identity + 可校验投影 +parentRevision(state+blockContents+contentStore 的 sha256);无快照 / 多模态不透明内容 / CCR 索引不一致 → 一律 409SNAPSHOT_UNAVAILABLE带原因。/__bili/plugin/fork):严格请求文法(identifier/hash/ref 校验);幂等重放(同 hash → 200replayed:true,载荷不同 → 409CHILD_CONFLICT);revision 漂移 →PARENT_REVISION_CONFLICT;有序前缀不符 →BRANCH_POINT_CONFLICT;嵌套块/原文缺失 →PARENT_STATE_INCOMPLETE;语义 exact/expanded(跨界块以expandedBlocks报告)。CCR 按前缀 refs 切片;子会话首个真实模型请求必须通过有序前缀核验(FORK_PREFIX_CONFLICT门禁,证明其消费了继承的压缩态);子会话豁免 derivedFrom 绑定与 resume-inheritance 采纳,且已核验前缀不受 side-request 降级影响。contextTokens/contextTokensSource(usage|estimate|unavailable)/contextTokensAt/contextGeneration/sessionId/sessionRevision/compressibleRanges;无观测 → 显式 null +"unavailable",从不伪造。/__bili/*管理端点共用同一道闸(loopback-only + trusted origin + tunnel marker 拒绝,src/server.ts:1335-1360),无新增暴露面。f2b18022上同样复现 3 次 → 本环境既有问题,非本 PR 回归(CI 的 GH runner 上该测试通过)。85ec9c1b的三个新提交 rebase 到了f44dd240(pre-fix 基线)上,把上一轮 review 推上去的ce734975(publishForkSession 的 meta-aware 磁盘探测——无协议 meta 时未发现的命名空间子会话文件会被冲突重试覆写)丢了。我在85ec9c1b上重新应用并双向验证(naive 探针下回归测试失败/复写路径复现,meta-aware 后通过;typecheck clean;fork+provenance 套件 57/57 绿)。但该重应用没有推上去:推送前发现分支已被 force-reset 回ce734975(含原始修复、不含三个新提交;PR API 的 head 仍显示85ec9c1b,属 in-flight 状态)。此时推送需要 force-push 且会与原始修复重复,故按「不替换贡献者工作」原则按住。重应用提交保留在本地(c7c5e2ef,workdir 本地分支local-reapply-meta-probe-on-85ec9c1b)。给作者的行动项:重新落地18c58a5b/63cd3ec3/85ec9c1b三个提交时请基于ce734975,避免再次丢掉该探测修复。4. 是否有回归问题:
85ec9c1b):16/16 全绿(real pi/codex/opencode/dsh lanes、e2e、registry e2e、build-artifact、version-guard 等)。TOOL_CONVERSATION_CONFLICT(旧 零注入会话身份:移除模型可见 conversation_id,以出站 tool_use 环见证路由 MCP 工具调用(fixes #1611 的非注入路线) #1685 行为:单一 witness 胜出 + info log)。影响所有带显式 id 的 tool POST。status.contextTokens语义变更:lastInputTokens→ 归因观测值或 null。capabilities.fork(§7.3 要求 PR body 里补一句 golden 再生成说明,目前缺)。5. 是否破坏缓存:不影响。observation 是独立 metadata 槽位,billing/nudge 基线逻辑未动;prefix-cache 的 wire 行为不变(非 fork 流量无任何新增注入/改写)。
6. 是否改了设计方向:无转向——纯增量 HTTP surface,挂在既有 plugin admin plane 上;kernel pin 未动,数据流未动。
7. 是否引入了新的配置:无——config 字段 / env var / CLI flag 零新增(与 PR body 声明一致,diff 核实过)。
判定:bili 侧满足 #2018 的 fail-closed 要求——capability 缺失 → host 关功能;provenance 缺失 → 显式
unavailable;任何不可验证的 fork 输入 → typed 409;未捕获异常 → 503FORK_FAILED。host 侧(ekko-studio#3279)需把 manifest 缺capabilities.fork视为 feature-off。合并就绪度取决于三件事:owner 对 D-A/D-B/D-C 的拍板、PR body 补 golden 说明、作者把三个新提交 rebase 到ce734975之上并让分支与 PR head 对齐。