Skip to content

Address PR #245 review: add documentation, fix initialization bug, expand test coverage#246

Merged
jbrodovsky merged 3 commits into
feature/sim-timeoutsfrom
copilot/sub-pr-245
Jan 20, 2026
Merged

Address PR #245 review: add documentation, fix initialization bug, expand test coverage#246
jbrodovsky merged 3 commits into
feature/sim-timeoutsfrom
copilot/sub-pr-245

Conversation

Copilot AI commented Jan 20, 2026

Copy link
Copy Markdown
Contributor

Addresses review feedback on execution timeout monitoring implementation. The original changes lacked documentation, had an incorrect filter initialization call, and insufficient test coverage.

Documentation

  • Added comprehensive docs for ExecutionLimits and ExecutionMonitor explaining timeout mechanisms (wall-clock ratio, absolute wall-clock, no-progress detection)
  • Included usage example in ExecutionMonitor::check() doc comment
  • Clarified that execution limits are not yet applied in geophysical navigation (validation only)

Bug Fixes

  • Fixed initialize_ukf call: Changed from passing 7 individual None parameters to UkfConfig::default()
    // Before (incorrect)
    initialize_ukf(records[0].clone(), None, None, None, None, None, None)
    
    // After
    initialize_ukf(records[0].clone(), UkfConfig::default())
  • Fixed type mismatch: Corrected last_ts variable initialization in run_closed_loop (was DateTime<Utc>, needed Option<DateTime<Utc>>)

Test Coverage

Expanded ExecutionMonitor tests from 1 to 5 cases:

  • Wall-clock timeout enforcement
  • Successful execution with regular progress updates
  • Zero timeout handling (disabled)
  • Negative timeout handling (disabled)

Code Quality

  • Removed unused mut qualifiers flagged by clippy
  • Added #[allow(clippy::too_many_arguments)] for helper function with legitimate parameter count

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits January 20, 2026 15:00
- Add comprehensive documentation for ExecutionLimits struct
- Add comprehensive documentation for ExecutionMonitor struct and methods
- Fix incorrect arguments to initialize_ukf at line 419 in sim/src/main.rs
- Add comment explaining unused execution_limits in geo navigation
- Add test coverage for ExecutionMonitor (wall-clock, success case, edge cases)
- Fix type mismatch bug for last_ts variable in run_closed_loop
- Update integration tests to pass execution_limits parameter

Co-authored-by: jbrodovsky <57160841+jbrodovsky@users.noreply.github.com>
…arguments

Co-authored-by: jbrodovsky <57160841+jbrodovsky@users.noreply.github.com>
Copilot AI changed the title [WIP] Add execution timeouts for simulations Address PR #245 review: add documentation, fix initialization bug, expand test coverage Jan 20, 2026
Copilot AI requested a review from jbrodovsky January 20, 2026 15:04
@jbrodovsky
jbrodovsky marked this pull request as ready for review January 20, 2026 15:25
Copilot AI review requested due to automatic review settings January 20, 2026 15:25
@jbrodovsky
jbrodovsky merged commit 3daa0ff into feature/sim-timeouts Jan 20, 2026
4 checks passed
@jbrodovsky
jbrodovsky deleted the copilot/sub-pr-245 branch January 20, 2026 15:25

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

This PR addresses review feedback from PR #245 by adding comprehensive documentation for execution timeout monitoring, fixing initialization bugs, and significantly expanding test coverage. The changes improve code quality, correctness, and maintainability without introducing any issues.

Changes:

  • Added detailed documentation for ExecutionLimits and ExecutionMonitor with usage examples
  • Fixed initialize_ukf call to use UkfConfig::default() instead of incorrect parameter passing
  • Fixed type mismatch in last_ts variable initialization (Option<DateTime<Utc>> vs DateTime<Utc>)
  • Expanded test coverage from 1 to 5 test cases covering multiple timeout scenarios
  • Removed unused mut qualifiers and added appropriate clippy attributes

Reviewed changes

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

File Description
core/src/sim.rs Added comprehensive documentation for ExecutionLimits and ExecutionMonitor; fixed last_ts type to Option<DateTime>; added 4 new execution monitor tests
sim/src/main.rs Fixed initialize_ukf call to use UkfConfig::default(); removed unused mut qualifiers; added clippy attribute for helper function; added clarifying comment about execution limits in geophysical navigation
core/tests/integration_tests.rs Updated run_closed_loop calls to include new execution_limits parameter (set to None)

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.

3 participants