Skip to content

docs: correct stale architecture in CLAUDE.md#12

Merged
xinquiry merged 1 commit into
mainfrom
docs/claude-md-correct-stale-architecture
Jun 21, 2026
Merged

docs: correct stale architecture in CLAUDE.md#12
xinquiry merged 1 commit into
mainfrom
docs/claude-md-correct-stale-architecture

Conversation

@xinquiry

@xinquiry xinquiry commented Jun 21, 2026

Copy link
Copy Markdown
Collaborator

What & why

CLAUDE.md had drifted from the actual codebase. This corrects the stale architecture descriptions so the developer guide matches reality.

Changes

Project Structure

  • Add the missing crates: osdl-server, osdl-proto, osdl-firmware-protocol.
  • transport/: DirectSerial and TCP are marked (stub) but both are real implementations now — relabeled. Added onvif.rs and espnow_dongle.rs.
  • Added media/ plane (mediamtx / onvif_camera), orchestrator.rs.
  • The runze codec was listed under adapter/ but actually lives in driver/builtins/runze.rs — moved/clarified. Added the rest of the driver builtins (emm, laiyu_xyz, sopa, xkc).

Build & Run

  • cargo run --bin osdlcargo run --bin osdl serve (the gRPC server is what actually boots the engine).
  • Dropped the hardcoded "24 tests" count (drifts as tests are added/removed).

Integration with Xyzen

  • The doc claimed osdl-core is an optional crate dependency of xyzen-runner (feature = "osdl"). That's no longer true: the runner is a pure gRPC client of a separate osdl serve process, depending on osdl-proto (tonic-generated) behind the feature = "osdl". The engine + gRPC server live in the osdl serve process (TCP + UDS), spawned by the desktop host (lab_server.ts) or run standalone on a lab Pi.
  • Fixed the data-flow diagram accordingly and listed the real runner message types (osdl_list_devices, osdl_send_command, osdl_device_online/offline, osdl_media_source_online, …).

Verification

Every path referenced in the updated doc was checked against the working tree (crates, transport/adapter/driver/media modules, osdl serve subcommand). No code changes.

🤖 Generated with Claude Code

Summary by Sourcery

更新 CLAUDE.md,以反映当前的 OpenSDL 项目架构、构建/运行工作流以及 Xyzen 集成模型。

文档:

  • 刷新项目结构文档,以列出当前的 crates、transports、drivers、media plane 和固件布局。
  • 更新构建说明,记录将 osdl serve 子命令作为引擎和 gRPC 服务器的入口点。
  • 更正 Xyzen 集成文档,将 runner 描述为 osdl serve 进程的纯 gRPC 客户端,并列出实际使用的 runner 消息类型。
Original summary in English

Summary by Sourcery

Update CLAUDE.md to reflect the current OpenSDL project architecture, build/run workflow, and Xyzen integration model.

Documentation:

  • Refresh project structure documentation to list current crates, transports, drivers, media plane, and firmware layout.
  • Update build instructions to document the osdl serve subcommand as the entrypoint for engine and gRPC server.
  • Correct Xyzen integration docs to describe the runner as a pure gRPC client of the osdl serve process and list the actual runner message types.

- Project Structure: add osdl-server, osdl-proto, osdl-firmware-protocol
  crates; mark DirectSerial/TCP as real (not stubs); add onvif and
  espnow_dongle transports, the media/ plane, orchestrator.rs; move the
  runze codec to driver/builtins/ where it actually lives.
- Build & Run: `cargo run --bin osdl serve` (gRPC server), drop the
  stale "24 tests" count.
- Integration with Xyzen: the runner is a gRPC client of `osdl serve`
  (osdl-proto + tonic), NOT an embedded osdl-core crate dependency.
  Fix the diagram and list the real runner message types.

Co-Authored-By: Claude <noreply@anthropic.com>
@sourcery-ai

sourcery-ai Bot commented Jun 21, 2026

Copy link
Copy Markdown

Reviewer's Guide

CLAUDE.md 更新为准确描述当前的 OpenSDL 架构、项目结构和 Xyzen 集成方式,包括新的 crate、传输和媒体组件,以及基于 gRPC 的 runner 模型。

File-Level Changes

Change Details Files
刷新项目结构章节,使其匹配实际的 crates 和模块布局。
  • 将 osdl-core 记录为引擎 + 库核心,补充 orchestrator.rs,并重新组织 transport、adapter、driver 和 media 模块。
  • 更新 transport 列表,使其反映实际的 direct_serial 和 tcp 实现,并新增 espnow_dongle.rs 和 onvif.rs。
  • 澄清 adapter 和 driver 的职责,将 runze 编解码器移动到 driver/builtins 中,并列出现有其他内置驱动。
  • 扩展树结构,包含 osdl-cli 子命令、osdl-server、osdl-proto、osdl-firmware-protocol,并细化固件 crate 的注释。
CLAUDE.md
将构建与运行说明与当前的 gRPC 服务器入口和测试实际情况对齐。
  • 将主要运行命令从 cargo run --bin osdl 更改为 cargo run --bin osdl serve,以体现基于 gRPC 服务器的启动方式。
  • 泛化测试命令的描述,避免固定的测试数量,并提及 e2e + 集成测试覆盖。
CLAUDE.md
将记录的 Xyzen 集成模型修正为当前的纯 gRPC 客户端架构。
  • 更新集成示意图,使 Runner 作为 gRPC 客户端与独立的 osdl serve 进程通信,而不是嵌入 osdl-core。
  • 澄清 xyzen-runner 在启用 osdl feature 时依赖 osdl-proto,并说明引擎 + gRPC 服务器运行在由 lab_server.ts 启动或独立运行的 osdl serve 进程中。
  • 记录当前 runner 用于设备和媒体事件的 WebSocket 消息类型,并注明 OsdlEvent 是通过现有的 WebSocket 通道转发的。
CLAUDE.md

Tips and commands

Interacting with Sourcery

  • 触发新评审: 在 pull request 中评论 @sourcery-ai review
  • 继续讨论: 直接回复 Sourcery 的评审评论。
  • 从评审评论生成 GitHub issue: 通过回复评审评论,让 Sourcery 从该评论创建一个 issue。你也可以在评审评论中回复 @sourcery-ai issue 来从中创建 issue。
  • 生成 pull request 标题: 在 pull request 标题任意位置写上 @sourcery-ai,即可随时生成标题。你也可以在 pull request 中评论 @sourcery-ai title 来(重新)生成标题。
  • 生成 pull request 概要: 在 pull request 描述正文任意位置写上 @sourcery-ai summary,即可在指定位置生成 PR 概要。你也可以在 pull request 中评论 @sourcery-ai summary 来(重新)生成概要。
  • 生成评审者指南: 在 pull request 中评论 @sourcery-ai guide,即可随时(重新)生成评审者指南。
  • 解决所有 Sourcery 评论: 在 pull request 中评论 @sourcery-ai resolve,即可一次性解决所有 Sourcery 评论。如果你已经处理完所有评论且不想再看到它们,这会非常有用。
  • 忽略所有 Sourcery 评审: 在 pull request 中评论 @sourcery-ai dismiss,即可忽略所有现有的 Sourcery 评审。尤其适用于你想从头开始一次新的评审——别忘了再评论 @sourcery-ai review 来触发新评审!

Customizing Your Experience

访问你的 dashboard 以:

  • 启用或禁用评审功能,例如 Sourcery 生成的 pull request 概要、评审者指南等。
  • 更改评审语言。
  • 添加、删除或编辑自定义评审说明。
  • 调整其他评审设置。

Getting Help

Original review guide in English

Reviewer's Guide

Updates CLAUDE.md to accurately describe the current OpenSDL architecture, project structure, and Xyzen integration, including new crates, transport and media components, and the gRPC-based runner model.

File-Level Changes

Change Details Files
Refresh project structure section to match actual crates and module layout.
  • Document osdl-core as engine + library core, adding orchestrator.rs and reorganized transport, adapter, driver, and media modules.
  • Update transport listings to reflect real implementations for direct_serial and tcp, and add espnow_dongle.rs and onvif.rs.
  • Clarify adapter and driver responsibilities, moving the runze codec into driver/builtins and listing other built-in drivers.
  • Extend the tree to include osdl-cli subcommands, osdl-server, osdl-proto, osdl-firmware-protocol, and refine firmware crate comments.
CLAUDE.md
Align build and run instructions with the current gRPC server entrypoint and testing reality.
  • Change the primary run command from cargo run --bin osdl to cargo run --bin osdl serve to reflect the gRPC server-based startup.
  • Generalize the test command description to avoid a fixed test count and mention e2e + integration coverage.
CLAUDE.md
Correct the documented Xyzen integration model to the current pure gRPC client architecture.
  • Update the integration diagram to show Runner as a gRPC client talking to a separate osdl serve process instead of embedding osdl-core.
  • Clarify that xyzen-runner depends on osdl-proto behind the osdl feature and that engine + gRPC server live in the osdl serve process spawned by lab_server.ts or run standalone.
  • Document the current runner WebSocket message types for device and media events and note that OsdlEvent is forwarded over the existing WebSocket channel.
CLAUDE.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

嗨 —— 我已经审阅了你的更改,一切看起来都很棒!


Sourcery 对开源项目是免费的——如果你觉得我们的代码审查有帮助,欢迎分享 ✨
帮我变得更有用!请在每条评论上点击 👍 或 👎,我会根据你的反馈改进后续的代码审查。
Original comment in English

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@xinquiry xinquiry merged commit 4d7950a into main Jun 21, 2026
6 checks passed
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