Skip to content

Added resim in cu-caterpillar#364

Merged
gbin merged 2 commits into
masterfrom
gbin/keyframe-integration-test
Jun 26, 2025
Merged

Added resim in cu-caterpillar#364
gbin merged 2 commits into
masterfrom
gbin/keyframe-integration-test

Conversation

@gbin

@gbin gbin commented Jun 23, 2025

Copy link
Copy Markdown
Collaborator

No description provided.

@gbin gbin changed the title Adds resim cu-caterpillar and implement a time jump. Added resim in cu-caterpillar Jun 26, 2025
@gbin gbin requested a review from Copilot June 26, 2025 00:28

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

Adds a resimulation mode for the cu-caterpillar example, enabling playback of recorded copper logs.

  • Introduces a new cu-caterpillar-resim binary to replay and re-simulate copper logs.
  • Updates the main application to write logs under logs/ and create that directory if missing.
  • Adds helper scripts (resim.sh, log.sh) and registers the new binary in Cargo.toml.

Reviewed Changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
examples/cu_caterpillar/src/resim.rs New resim binary implementation for replaying copper logs
examples/cu_caterpillar/src/main.rs Switch to persistent logs/ directory and ensure its creation
examples/cu_caterpillar/resim.sh Script to run the resimulation binary
examples/cu_caterpillar/log.sh Updated log reader script with new binary name and path
examples/cu_caterpillar/Cargo.toml Registered cu-caterpillar-resim as a new binary

Comment thread examples/cu_caterpillar/src/resim.rs Outdated
// Create the Copper App in simulation mode.
#[allow(clippy::identity_op)]
const LOG_SLAB_SIZE: Option<usize> = Some(1 * 1024 * 1024 * 1024);
let logger_path = "logs/caterpillarresim.copper";

Copilot AI Jun 26, 2025

Copy link

Choose a reason for hiding this comment

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

The resimulation binary hardcodes its input/output paths but does not handle CLI arguments; consider parsing the input log path so the resim.sh argument is used or remove hardcoded values.

Copilot uses AI. Check for mistakes.
@@ -0,0 +1,2 @@
#!/bin/bash
RUST_BACKTRACE=1 cargo run --bin cu-caterpillar-resim logs/caterpillar.copper

Copilot AI Jun 26, 2025

Copy link

Choose a reason for hiding this comment

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

This script passes logs/caterpillar.copper to the resim binary, but the binary doesn't accept any arguments; align the script or modify the binary to accept the log file path.

Suggested change
RUST_BACKTRACE=1 cargo run --bin cu-caterpillar-resim logs/caterpillar.copper
export LOG_FILE_PATH=logs/caterpillar.copper
RUST_BACKTRACE=1 cargo run --bin cu-caterpillar-resim

Copilot uses AI. Check for mistakes.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@gbin gbin merged commit 7141c94 into master Jun 26, 2025
9 checks passed
@gbin gbin deleted the gbin/keyframe-integration-test branch June 26, 2025 13:36
@makeecat makeecat added the enhancement New feature or request label Jan 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants