Skip to content

Conversation

@fbeutin-ledger
Copy link
Contributor

No description provided.

@codecov-commenter
Copy link

codecov-commenter commented Dec 23, 2025

Codecov Report

❌ Patch coverage is 88.46154% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 94.22%. Comparing base (f490198) to head (abfa2c0).

Files with missing lines Patch % Lines
src/ledgered/binary.py 88.46% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master      #61      +/-   ##
==========================================
- Coverage   94.74%   94.22%   -0.53%     
==========================================
  Files          14       14              
  Lines         571      623      +52     
==========================================
+ Hits          541      587      +46     
- Misses         30       36       +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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 adds support for loading application metadata from companion JSON files for Rust-based Ledger binaries. Rust applications don't embed app_name, app_version, and app_flags directly in the ELF binary; instead, these values are stored in a separate app_<target>.json file located in the same directory as the binary.

Key Changes:

  • Added automatic detection of Rust applications via rust_sdk_name or rust_sdk_version ELF sections
  • Implemented JSON metadata loading for Rust apps with comprehensive error handling for missing files, malformed JSON, and partial data
  • Added app_flags field to the Sections dataclass to support this metadata

Reviewed changes

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

File Description
src/ledgered/binary.py Adds is_rust_app property, _load_metadata_from_json() method, and app_flags field to enable JSON-based metadata loading for Rust binaries
tests/unit/test_binary.py Comprehensive test coverage including Rust app detection, JSON loading success/failure cases, and verification that C apps ignore JSON files
CHANGELOG.md Documents the new feature in version 0.15.0 release notes
Comments suppressed due to low confidence (1)

src/ledgered/binary.py:18

  • The field app_flags is being added here, but according to the full file content, there appears to be another app_flags field definition at line 31 in the Sections dataclass. Having duplicate field definitions in a dataclass will cause a syntax error. Please verify that there are no duplicate field definitions in the Sections class.
    app_name: Optional[str] = None

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

@fbeutin-ledger fbeutin-ledger force-pushed the fbe/appname_detection_for_rust_builds branch 2 times, most recently from 2cbada2 to 195a93a Compare December 23, 2025 13:05
@fbeutin-ledger fbeutin-ledger force-pushed the fbe/appname_detection_for_rust_builds branch from 195a93a to abfa2c0 Compare December 23, 2025 13:06
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