Skip to content

Update fire notification Topic callback to const byte view - #1

Merged
Jiu-xiao merged 2 commits into
masterfrom
codex/current-topic-webots-20260909
Sep 9, 2026
Merged

Jiu-xiao merged 2 commits into
masterfrom
codex/current-topic-webots-20260909

Conversation

@Jiu-xiao

@Jiu-xiao Jiu-xiao commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Summary

Use LibXR::ConstRawData for the fire-notification Topic callback under the current API. Preserve simulated rate limits, heat accounting, delay and shot publication.

Initialize only manifest dependencies in standalone CI, preserving BlinkLED and
the current PR checkout. Remove the obsolete delete/re-checkout sequence. This
fixes dependency setup attempting git pull on detached PR HEAD before build.

Verification

  • Independent semantic review found no blocking behavior change.
  • Complete Webots BSP compile/link and original target scene passed with simulated fire requests; the empty scene produced no fire requests.
  • No real actuator was connected. Shot requests are not a hit-rate measurement.

Summary by Sourcery

Update fire notification handling and standalone CI dependency initialization for compatibility with the current APIs and pull-request workflow.

Bug Fixes:

  • Update the fire-notification callback to use the current const byte-view API while preserving fire request handling behavior.
  • Fix standalone CI dependency setup so it preserves the current pull-request checkout and avoids syncing from a detached HEAD.

CI:

  • Initialize standalone CI from the current module manifest dependencies without deleting and re-checking out the active module.

@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 4 days and 6 hours by commenting @sourcery-ai review. Upgrade to get a review now.

@sourcery-ai

sourcery-ai Bot commented Sep 9, 2026

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

The PR migrates the fire-notification callback to LibXR::ConstRawData and performs a const-correct payload read, while preserving the existing simulated firing behavior and validating the complete Webots build and target scene.

Sequence diagram for const fire notification callback

sequenceDiagram
    participant Topic
    participant WebotsFireNotify
    participant WebotsHostFireNotify

    Topic->>WebotsFireNotify: callback(bool, self, ConstRawData)
    WebotsFireNotify->>WebotsHostFireNotify: const reinterpret_cast(data.addr_)
    WebotsFireNotify->>WebotsFireNotify: HandleFireRequest(msg->isfire)
Loading

File-Level Changes

Change Details Files
Updated the fire-notification Topic callback to consume the current const byte-view API without changing request handling behavior.
  • Changed the callback payload parameter from mutable RawData to const ConstRawData.
  • Updated the payload cast to a pointer-to-const before validating size and reading the fire flag.
  • Preserved rate limiting, heat accounting, delay handling, and shot publication; verification covered Webots BSP build/link and simulated fire-request execution.
WebotsFireNotify.hpp

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 assessment

Approved.

@Jiu-xiao
Jiu-xiao merged commit 186ff8a into master Sep 9, 2026
3 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