Skip to content

Fbe/fix tx simulation issues#972

Merged
fbeutin-ledger merged 3 commits into
developfrom
fbe/fix_tx_simulation_issues
Mar 27, 2026
Merged

Fbe/fix tx simulation issues#972
fbeutin-ledger merged 3 commits into
developfrom
fbe/fix_tx_simulation_issues

Conversation

@fbeutin-ledger
Copy link
Copy Markdown
Contributor

Description

Please provide a detailed description of what was done in this PR.
(And mentioned if linked to an issue docs)

Changes include

  • Bugfix (non-breaking change that solves an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (change that is not backwards-compatible and/or changes current functionality)
  • Tests
  • Documentation
  • Other (for changes that might not fit in any category)

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Mar 27, 2026

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 55.02%. Comparing base (606aa03) to head (9e7abe7).

Files with missing lines Patch % Lines
src/tlv_apdu.c 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           develop     #972   +/-   ##
========================================
  Coverage    55.02%   55.02%           
========================================
  Files           16       16           
  Lines         1592     1592           
  Branches       201      201           
========================================
  Hits           876      876           
  Misses         712      712           
  Partials         4        4           
Flag Coverage Δ
unittests 55.02% <0.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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
Copy Markdown

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 fixes TX simulation parsing/validation edge cases (notably max-length string fields) and tightens the TX simulation TLV schema handling.

Changes:

  • Add an integration test covering spec-maximum provider_message (25 chars) and tiny_url (30 chars).
  • Fix printable-string extraction bounds to allow max-length strings (incl. null terminator handling).
  • Refactor TX simulation enums and TLV validation (type/risk/category ranges, clearer missing/unexpected tag handling, fallback to UNKNOWN on parameter mismatch).

Reviewed changes

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

File Description
tests/ragger/test_tx_simulation.py Adds a bounds test to ensure max-length provider/tiny-url strings are accepted.
src/tlv_apdu.c Adjusts printable-string extraction to pass correct max length to TLV string helper.
src/features/provide_tx_simulation/cmd_get_tx_simulation.h Updates TX simulation risk/type/category enums and struct typing.
src/features/provide_tx_simulation/cmd_get_tx_simulation.c Updates TX simulation TLV parsing/validation and warning fallback behavior.

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

Comment thread src/features/provide_tx_simulation/cmd_get_tx_simulation.c
Comment thread src/features/provide_tx_simulation/cmd_get_tx_simulation.c Outdated
Comment thread src/features/provide_tx_simulation/cmd_get_tx_simulation.c Outdated
Comment thread src/features/provide_tx_simulation/cmd_get_tx_simulation.h
Comment thread src/tlv_apdu.c
@fbeutin-ledger fbeutin-ledger force-pushed the fbe/fix_tx_simulation_issues branch 2 times, most recently from 4cd41be to fdc00cc Compare March 27, 2026 16:07
@fbeutin-ledger fbeutin-ledger force-pushed the fbe/fix_tx_simulation_issues branch from fdc00cc to 9e7abe7 Compare March 27, 2026 17:37
@fbeutin-ledger fbeutin-ledger merged commit ea5dbf0 into develop Mar 27, 2026
227 checks passed
@fbeutin-ledger fbeutin-ledger deleted the fbe/fix_tx_simulation_issues branch March 27, 2026 17:57
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.

4 participants