feat(datasource): 重构 Provider 数据链并移除 Dataset - #237
Merged
Conversation
🤖 AI[96%] 🔧 Human Fixed[0%] 🧑 Human[4%] 👌 AI Adopted[100%] Co-authored-by: codex (gpt-5.6-sol) <ai@local>
🤖 AI[100%] 🔧 Human Fixed[0%] 🧑 Human[0%] 👌 AI Adopted[100%] Co-authored-by: codex (gpt-5.6-sol) <ai@local>
🤖 AI[100%] 🔧 Human Fixed[0%] 🧑 Human[0%] 👌 AI Adopted[100%] Co-authored-by: codex (gpt-5.6-sol) <ai@local>
🤖 AI[100%] 🔧 Human Fixed[0%] 🧑 Human[0%] 👌 AI Adopted[100%] Co-authored-by: codex (gpt-5.6-sol) <ai@local>
🤖 AI[100%] 🔧 Human Fixed[0%] 🧑 Human[0%] 👌 AI Adopted[100%] Co-authored-by: codex (gpt-5.6-sol) <ai@local>
🤖 AI[100%] 🔧 Human Fixed[0%] 🧑 Human[0%] 👌 AI Adopted[100%] Co-authored-by: codex (gpt-5.6-sol) <ai@local>
ohfei
force-pushed
the
codex/issue-234-datasource-refactor
branch
from
September 1, 2026 02:15
b5c9b1e to
a3f7c85
Compare
🤖 AI[100%] 🔧 Human Fixed[0%] 🧑 Human[0%] 👌 AI Adopted[100%] Co-authored-by: codex (gpt-5.6-sol) <ai@local>
🤖 AI[98%] 🔧 Human Fixed[0%] 🧑 Human[2%] 👌 AI Adopted[100%] Co-authored-by: codex (gpt-5.6-sol) <ai@local>
🤖 AI[100%] 🔧 Human Fixed[0%] 🧑 Human[0%] 👌 AI Adopted[100%] Co-authored-by: codex (gpt-5.6-sol) <ai@local>
🤖 AI[100%] 🔧 Human Fixed[0%] 🧑 Human[0%] 👌 AI Adopted[100%] Co-authored-by: codex (gpt-5.6-sol) <ai@local>
🤖 AI[97%] 🔧 Human Fixed[0%] 🧑 Human[3%] 👌 AI Adopted[100%] Co-authored-by: codex (gpt-5.6-sol) <ai@local>
🤖 AI[100%] 🔧 Human Fixed[0%] 🧑 Human[0%] 👌 AI Adopted[100%] Co-authored-by: codex (gpt-5.6-sol) <ai@local>
🤖 AI[100%] 🔧 Human Fixed[0%] 🧑 Human[0%] 👌 AI Adopted[100%] Co-authored-by: codex (gpt-5.6-sol) <ai@local>
🤖 AI[100%] 🔧 Human Fixed[0%] 🧑 Human[0%] 👌 AI Adopted[100%] Co-authored-by: codex (gpt-5.6-sol) <ai@local>
🤖 AI[100%] 🔧 Human Fixed[0%] 🧑 Human[0%] 👌 AI Adopted[100%] Co-authored-by: codex (gpt-5.6-sol) <ai@local>
🤖 AI[100%] 🔧 Human Fixed[0%] 🧑 Human[0%] 👌 AI Adopted[100%] Co-authored-by: codex (gpt-5.6-sol) <ai@local>
🤖 AI[100%] 🔧 Human Fixed[0%] 🧑 Human[0%] 👌 AI Adopted[100%] Co-authored-by: codex (gpt-5.6-sol) <ai@local>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
关联 issue
Closes #234
#236 已合入 main。
当前 base 为 main,diff 只包含 #234 的 datasource 重构与修复 commits。
SDD 摘要
问题:旧 Dataset、kat import、required_tables、Context 数据方法和原生 datasource 执行面与 PACK-owned Provider → dp.Table → Run Output 架构并存,形成两套数据模型和重复运行时职责。
非目标:不提供 Provider registry、统一基类、自动发现、生命周期托管、透明远端 federation、通用 Decoder trait、恢复协议或 datasource CLI。
考虑过的方案:保留 Dataset 作为兼容层;在 Framework 中统一托管 Provider;一次性删除旧执行面并让 PACK 显式拥有来源语义。
选中方案:Datasource Provider 保持 PACK 内普通 Python 类,由 Workflow 显式构造和调用;KAT 只提供 dataprovider Toolkit、严格 Table Output、独立 kat-datasource Hitrace wheel,以及双 wheel Payload 交付链。
最小切片:
kat/platform/datasource收窄为 Hitrace native decode,保留 descriptor-derived ftrace/native-hook relations 与 clock relations,退役根级规范化sched_switch,并发布独立kat-datasourcewheel。验证证据
本地实际执行并通过:
protobuf-source-contract-fixturefeature;本地未触发 Full CI本地产物:
本地未运行 Full CI;Docker Desktop 后端不可用,因此 Linux 候选归档的真实 smoke 由本 PR 的 GitHub Linux runner 门禁完成,不能用 Windows 结果替代。
领域文档边界:旧 accepted ADR 中仍有 Dataset/query/Clock 描述与新架构冲突。按本次交付约束,本 PR 不混入 SDD/ADR Markdown;这些状态关系需通过独立领域文档维护收口。
范围自检
approved-large-change、approved-binary-artifact显式批准。最新 main 融合验证(481efd7)
已同步
main@b556784(含 #238 Agent Knowledge / Workflow 与 Provider inspection),并保留 #234 的无 Dataset、PACK-owned Provider、严格dp.TableOutput 合同。最终融合树本地验证:
cargo check --workspace --locked通过。kat-cli受影响合同:import 1、inspect 12、query 5、run 1、test 9,全部通过;平台/完整 Payload 专属用例按声明 ignored。TraceStreamerSQLiteProvider的 declaration、guide 与真实 Provider inspection 均通过。origin/main..HEAD在approved-large-change与approved-binary-artifact下 PASS,AI identity 命中 0。cargo fmt --all -- --check、git diff --check、冲突标记/未解决索引/未跟踪生成物检查均通过。本轮按约定未触发 Full CI。