Skip to content

Conversation

@yelabb
Copy link
Owner

@yelabb yelabb commented Jan 17, 2026

No description provided.

Copilot AI review requested due to automatic review settings January 17, 2026 21:40
@yelabb yelabb assigned yelabb and Copilot and unassigned yelabb Jan 17, 2026
Copy link

Copilot AI left a comment

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 migrates the codebase from std::expected to tl::expected for error handling, adds default constructors for several decoder classes, and fixes a thread-safety issue with atomic double operations.

Changes:

  • Replaced all std::expected and std::unexpected with tl::expected and tl::unexpected throughout headers and implementation files
  • Added tl::expected v1.1.0 library dependency via FetchContent in CMakeLists.txt
  • Added default constructors for SpikeSorter, KalmanDecoder, and LinearDecoder classes
  • Fixed thread-safety issue with atomic double accumulation in realtime_demo.cpp using compare-exchange loop

Reviewed changes

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

Show a summary per file
File Description
CMakeLists.txt Added tl::expected library dependency (v1.1.0) from TartanLlama/expected repository
include/phantomcore/neural_net_decoder.hpp Updated includes and all function signatures returning expected types to use tl::expected
include/phantomcore/gpu_decoder.hpp Updated includes and all function signatures returning expected types to use tl::expected
src/neural_net_decoder.cpp Updated all expected type usage and unexpected returns to use tl:: namespace
src/gpu_decoder.cpp Updated all expected type usage and unexpected returns to use tl:: namespace
src/spike_detector.cpp Added default constructor for SpikeSorter delegating to Config-based constructor
src/kalman_decoder.cpp Added default constructors for KalmanDecoder and LinearDecoder
examples/realtime_demo.cpp Fixed atomic double accumulation with compare_exchange_weak loop for thread safety

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@yelabb yelabb assigned yelabb and unassigned Copilot Jan 17, 2026
@yelabb yelabb marked this pull request as draft January 17, 2026 21:52
The CI was failing because CTest was picking up all tests from dependencies (Eigen, tl::expected, Google Benchmark) instead of just PhantomCore tests. Most dependency tests weren't built, causing them to be reported as failures.

Changes:
- Disable BUILD_TESTING for all dependencies in CMakeLists.txt
- Restore BUILD_TESTING after dependencies are fetched
- Add platform-specific test commands in CI workflow (Linux vs Windows)
- Tests now properly run only PhantomCore tests (53 tests instead of 969)

All 53 PhantomCore tests now pass successfully.
@yelabb yelabb marked this pull request as ready for review January 17, 2026 23:59
@yelabb yelabb merged commit 4e158a6 into main Jan 17, 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.

2 participants