Skip to content

Merge dev into master for XRobot 1.0 - #3

Merged
Jiu-xiao merged 12 commits into
masterfrom
dev
Oct 4, 2026
Merged

Jiu-xiao merged 12 commits into
masterfrom
dev

Conversation

@Jiu-xiao

@Jiu-xiao Jiu-xiao commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

把 dev 合入 master。迁移到 XRobot 1.0 的模块约定(静态装配),具体改动见下方提交列表。

Merges dev into master. Migrates the Module to the XRobot 1.0 conventions (static assembly); the commits below list the changes.

合并顺序:libxr、CodeGenerator、扩展和 XRobot 先合并并发布(xrobot 1.0.0、libxr 6.0.0、扩展 2.0.0,XRobot 打 v1);模块的 PR 在 xrobot 1.0.0 发布之后再合并,因为模块 master 合入后,xrobot 0.3.x 拉到的就是 MODULE MANIFEST V2 的模块。

Merge order: libxr, CodeGenerator, the extension and XRobot are merged and released first (xrobot 1.0.0, libxr 6.0.0, extension 2.0.0, XRobot tag v1); the Module PRs follow after xrobot 1.0.0 is released, because once a Module's master carries MODULE MANIFEST V2, xrobot 0.3.x fetches that format.

验证 / Verification

  • dev 上的 Module CI 通过(2026-10-03,XRobot dev ac729b0d、LibXR dev 585b59f)。

提交 / Commits

  • feat: adopt static module construction (0e6f071)
  • Migrate to static assembly (09ae732)
  • Merge origin/master into feat/static-assembly-20260915 (53ac329)
  • Receive host topics with their concrete payload types (4152127)
  • Remove the empty OnMonitor hook (8592319)
  • Add the Apache-2.0 license (07736b8)
  • Use the shared XRobot Module CI workflow (f244818)
  • Rewrite the README for XRobot 1.0 (c1ea519)

Summary by Sourcery

Migrate HostData to the XRobot 1.0 static assembly conventions and shared module tooling.

New Features:

  • Adopt XRobot 1.0 static module construction and typed topic callbacks for host gimbal, chassis, and fire data.
  • Document the module’s XRobot 1.0 configuration, topic interfaces, dependencies, and behavior in bilingual README content.

Enhancements:

  • Remove the legacy application-manager integration and empty monitoring hook.
  • Add module metadata describing its CMD dependency and purpose.

CI:

  • Replace the bespoke module build workflow with the shared XRobot Module CI workflow using development dependencies.

Documentation:

  • Rewrite the README for XRobot 1.0 usage and configuration.

Chores:

  • Add the Apache-2.0 license.

Merged master commits and verdicts:
- 46b3cb4 fix: harden HostData provider and topic handling
  - CMD pointer overload and null check: superseded; CMD& is a reference in
    the static-assembly constructor; the manifest already declares CMD.
  - moving topic creation into the constructor: superseded; no provider
    validation precedes it any more.
  - null/size guards on the RawData callback payloads: superseded by exact
    typed Topic callbacks, where LibXR checks the payload type when the
    callback is registered; the callbacks are converted to their concrete
    payload types in a follow-up commit on this branch.

Conflicts resolved in favour of the static-assembly branch.
The target, chassis and fire callbacks registered LibXR::RawData& payloads on
typed topics, which LibXR rejects when the callback is registered. They now
take const HostGimbalTarget&, const HostChassisTarget& and const LauncherCMD&;
the copied values and the HostCMD() call are unchanged.
The static-assembly entry calls OnMonitor() only for modules that declare it; the empty body was left over from the removed application framework.
The XRobot ecosystem Modules are published under the Apache License 2.0; the text
is identical to xrobot-org/XRobot/LICENSE.
Replace the generated inline workflow with a caller of
xrobot-org/XRobot/.github/workflows/module-ci.yml, which resolves the
dependencies, compiles the Module sources and a generated constructor probe
against LibXR.

During the coordinated 1.0 change the tools, LibXR and same-or-dev dependencies
come from dev.
Describe the Module, its dependencies, its constructor (dependencies first, then
the value configuration) and its use with xrobot module add / setup / instance
add, with a configuration example seeded by the tool. Drop the dynamic-framework
text and the dead MIGRATION.md link.

@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.

Sorry @Jiu-xiao, you've used your own review budget of 250,000 diff characters for the last 7 days.

You can request another review in 7 days by commenting @sourcery-ai review. Upgrade to get a review now.

@sourcery-ai

sourcery-ai Bot commented Oct 3, 2026

Copy link
Copy Markdown

Reviewer's Guide

Migrates HostData to XRobot 1.0 static module assembly, including MODULE MANIFEST V2 metadata, typed topic callbacks, the shared CI workflow, updated usage documentation, and Apache-2.0 licensing.

Sequence diagram for static HostData assembly and typed topic input

sequenceDiagram
    participant XRobot
    participant HostData
    participant Topic
    participant CMD

    XRobot->>HostData: HostData(cmd, topic names)
    HostData->>Topic: CreateTopic<HostGimbalTarget>()
    HostData->>Topic: CreateTopic<HostChassisTarget>()
    HostData->>Topic: CreateTopic<LauncherCMD>()
    HostData->>Topic: RegisterCallback()
    Topic-->>HostData: const HostGimbalTarget&
    HostData->>HostData: HostCMD(in_isr)
    HostData->>CMD: FeedAI(host_cmd)
    Topic-->>HostData: const HostChassisTarget&
    HostData->>HostData: HostCMD(in_isr)
    HostData->>CMD: FeedAI(host_cmd)
    Topic-->>HostData: const LauncherCMD&
    HostData->>HostData: HostCMD(in_isr)
    HostData->>CMD: FeedAI(host_cmd)
Loading

File-Level Changes

Change Details Files
Migrate the module from runtime application registration to XRobot 1.0 static assembly.
  • Replace the Application-derived class and hardware/application-manager constructor with a direct CMD reference and defaulted topic-name arguments.
  • Update the manifest to MODULE MANIFEST V2 dependency syntax and identify CMD by repository and ref.
  • Remove runtime application registration and the empty monitoring hook.
HostData.hpp
Use typed topic payload callbacks instead of raw byte handling.
  • Receive concrete HostGimbalTarget, HostChassisTarget, and LauncherCMD payloads directly.
  • Assign callback payloads to the latest module state before producing CMD::Data.
HostData.hpp
Adopt the shared XRobot Module CI workflow.
  • Replace the custom container, dependency setup, module installation, build, and tagging steps with the reusable Module CI workflow.
  • Configure the workflow to test XRobot and LibXR dev references and the dev dependency branch.
.github/workflows/build.yml
Document the XRobot 1.0 module interface and usage.
  • Rewrite the README with topic schemas, callback behavior, constructor parameters, dependency information, and static-assembly commands/configuration.
  • Document generated setup output and module inspection commands.
README.md
Add Apache-2.0 licensing.
  • Add the repository license text.
LICENSE

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

@Jiu-xiao
Jiu-xiao merged commit 9f367c8 into master Oct 4, 2026
4 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