Skip to content

Share external knowledge source composition - #631

Draft
Dong1017 wants to merge 2 commits into
mainfrom
codex/external-knowledge-composition
Draft

Dong1017 wants to merge 2 commits into
mainfrom
codex/external-knowledge-composition

Conversation

@Dong1017

@Dong1017 Dong1017 commented Nov 24, 2026 •

Copy link
Copy Markdown
Collaborator

Codex, acting for @Dong1017 (implementing agent).

Governing Issue and delivery slice

Refs #627

Anchors touched: A1, A5, A7. Scope was accepted on #627 and in the #500 decision.

Ordinary Find and managed rounds now obtain external sources from the same Apps registry. Find takes an explicit task backend first, uses a single compatible grant default when available, and keeps its internal search independent. Managed rounds freeze the selected project's path and checkout identity. Search and page reads independently check the target checkout's grant. CANNBot retains its native indexed search, fixed-revision pagination and source ranking.

Knowledge authorship declaration

{"schema_version":1,"head_sha":"3b4fa6fba590638b10451043d3ad9eee5943ffed","human_only":false,"material_ai_authors":[{"tool":"Codex","model_id":"unknown","effort":"unknown","role":"author"}]}

Changed artifacts and evidence

  • apps/integrations/external_channels.py composes the registry for Find and managed rounds. Registry tests cover denied or conflicting default backends, explicit selection and local retrieval. The stale-index fixture verifies unchanged local hits.
  • apps/integrations/cannbot/ keeps the existing native adapter for both discovery and exact-page reads. The injected worker verifies revision, card digest and page. Separate tests exercise the original launch checkout after changing directories, replacement of the checkout at the same path, grant checks, and a legacy benchmark without a trusted project.
  • The Harness resolves the provider through an injected assembly port from the validated private plan. Existing report and receipt contracts are retained. The documentation records the runtime-identity boundary. Sessions created on another runtime stay with that frozen release.

Checks and dependencies

  • Passed: Ruff on src tests tools, diff whitespace, current main mergeability, 100 target/module/channel tests (plus 43 subtests), three targeted managed benchmark cases, and the missing-index fallback with the fixture worker.
  • Windows baseline pytest hits a pre-existing fcntl collection error. A broad adjacent Windows run had 121 passed, 6 skipped, and 13 CANNBot boundary failures in subprocess timing/timeout tests. At least one timeout also reproduced on the base; the remaining local failures still need comparison. An approved native checkout and its real index are unavailable here.

Review follow-up

  • The latest head rechecks the live project grant and frozen checkout inside each managed discover, search and page-read adapter call before native execution. The checkout includes the root, Git marker and linked-worktree admin directory identity. Three controlled-worker regressions cover revocation and both forms of checkout replacement after provider construction. A legacy plan without creation-time binding remains local-only.
  • The prior Linux 3.10 and 3.11 full-checks failed the Apps migration import-consumer registry invariant. The latest head registers the exact missing paths and passes the invariant locally.
  • Latest Windows targeted run: 140 passed, 5 skipped and one existing subprocess completion-budget fixture timed out. Ruff and diff check passed. Real CANNBot index execution remains unverified.

Remaining work and Issue closure

The draft is ready for independent review of the assembly and authorization contract. @Dong1017 owns acceptance after merge. MindIE's pinned native query/explain and its independent grant and retention policy remain a tracked integration on #500. Confidence in real external retrieval requires an approved CANNBot checkout and native index.

Bind managed CANNBot discovery and page reads to the authorized session checkout while keeping internal search independent.

Agent-assisted-by: Codex (author)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>
@Dong1017

Copy link
Copy Markdown
Collaborator Author

Codex, acting for @Dong1017 (implementing agent).

@jiangkuaixue123 @zengchuang-hw 请分别复核 CANNBot 原生接口兼容和项目授权边界。重点看普通 Find 与托管轮次是否共用来源组装,以及切换工作目录后 search 和固定版本分页是否各自按启动项目校验。真实索引在本机不可用,当前证据来自可控适配器和 CI。

Draft head 7c43aeda93a5daf44b889ba6800c6051ee818c20.

@zengchuang-hw zengchuang-hw left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NO PASS
dot, acting for @zengchuang-hw.

应 草稿检视请求,核对 #627:base fd349032c54dd42e57185e86c74fad543fb51617,head 7c43aeda93a5daf44b889ba6800c6051ee818c20。普通 Find 与托管轮次已共用来源组装;当前轮次的 revision、卡片摘要、页码及收据检查仍在。

批准前必修:将冻结的 checkout 身份带到每次实际授权检查。 _bound_root 和 provider组装时验证了身份,但传给适配器的只有路径。实际读取授权只比较当前 checkout 和当前 grant,没有要求它们仍是会话冻结的 checkout。search 与分页 read 应在各自加载授权、启动 worker 前校验同一冻结身份;无法验证就只返回本地结果或拒绝外部读。身份还应覆盖 linked worktree 的实际 Git 管理目录;否则明确把无法证明身份的 checkout 排除在托管外部检索之外。

建议用真实本地 grant、可控 worker 覆盖换目录、撤权和 checkout 身份变化,断言 search/read 均不启动不再授权的 worker,且本地结果不丢。现有替换目录测试未覆盖授权加载与实际调用的衔接。静态核对了 14 个文件和调用链;未执行测试、接入真实索引或读取 CI。

Agent-assisted-by: Codex / unknown [effort=unknown] (author)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

@zengchuang-hw zengchuang-hw left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PASS
dot, acting for @zengchuang-hw.

增量范围 7c43aeda93a5daf44b889ba6800c6051ee818c20 → 3b4fa6fba590638b10451043d3ad9eee5943ffed,复核 上轮意见。上轮阻塞已修复:共享注册把冻结的 checkout 身份传给 CANNBot,发现、检索和固定版本分页各自在分派前核对当前授权和冻结身份。linked worktree 纳入解析后的 Git 管理目录;无法核实原项目的旧计划维持本地检索,不从当前目录补造授权。新替身测试覆盖切换工作目录后检索及分页、撤销授权和工作树身份变化。

未发现增量阻塞。已静态阅读变更、三条调用路径、回归测试及 #627 边界;未运行测试,未验证真实 CANNBot 索引,未查看 CI。此批准是代码检视,不是原生集成验收。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants