Skip to content

feat(pack): 提供文本 Ftrace 类型化 Provider - #232

Draft
qiqingzhixin wants to merge 16 commits into
mainfrom
codex/issue-219-ftrace-provider
Draft

feat(pack): 提供文本 Ftrace 类型化 Provider#232
qiqingzhixin wants to merge 16 commits into
mainfrom
codex/issue-219-ftrace-provider

Conversation

@qiqingzhixin

@qiqingzhixin qiqingzhixin commented Aug 31, 2026

Copy link
Copy Markdown
Collaborator

问题

PACK 用户需要直接查询 UTF-8 文本 ftrace,而不感知转换器、Catalog 路径或 Parquet 物理布局。原 PR 同时承担转换器和 Provider,已经拆出独立转换器 PR #239;本 PR 在其合入后只保留 PACK Provider、Workflow、文档和纵向测试。

最小切片

  • FtraceProvider 在构造时准备数据,调用方只使用 query() -> dp.Table
  • 默认以 ftrace 文件内容的 SHA-256 作为内部目录名,跨 Workflow 复用通过准入检查的 Parquet。
  • 相同内容命中后校验已保存的 clock_domain;不同 domain 明确失败。
  • 旧目录打不开、缺少必需关系或损坏时删除并重建。
  • 并发发布相同内容时采用已经成功原子发布的结果。
  • auto_cleanup=True 使用实例独占临时目录;默认模式保留稳定 SHA-256 目录。
  • Workflow 只保留分析 SQL并发布 eager Table,不感知物理位置。

非目标

  • 不增加公共 Provider Protocol、Runtime registry、显式 Schema version、迁移或物化回收。
  • 不公开 Parquet 路径,也不要求 withdecode()connect()
  • 不把硬件设备作为普通 CI 的必需条件。

验证

  • cargo +stable test --locked -p ftrace2parquet:8 passed。
  • cargo +stable test --locked -p kat-cli --lib:53 passed。
  • kat test --pack-dir examples/packs/mem-pack:16 passed, 1 hardware test skipped。
  • 显式设置 USB HDC connect-key 与真实转换器运行 mem-pack:17 passed;完成真实采集、拉取、转换、查询和第二次内容复用。
  • cargo +stable fmt --all -- --check:通过。
  • git diff --check:通过。

仓库锁定的 Rust 1.95.0 当前镜像返回 404;以上验证使用已安装的 stable,未修改 rust-toolchain.toml

Depends on #239
Refs #219

@qiqingzhixin
qiqingzhixin changed the base branch from codex/issue-226-postgresql-pr2 to main August 31, 2026 06:35
@qiqingzhixin qiqingzhixin changed the title feat(pack): 提供文本 Ftrace 类型化 Parquet Provider feat(pack): 提供文本 Ftrace 类型化 Provider Aug 31, 2026
@qiqingzhixin
qiqingzhixin marked this pull request as draft August 31, 2026 13:10
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.

1 participant