Skip to content

Conversation

@dav009
Copy link
Contributor

@dav009 dav009 commented Feb 13, 2026

https://smartcontract-it.atlassian.net/browse/DS-1992

What ?

  • This PR introduces a new flag available for the medianization task: countNilsAsFaults

  • when countNilsAsFaults is enabled :

    1. Nils are counted toward allowedFaults (alongside errors)
    2. Nils are filtered out after fault accounting, before decimal parsing.
    3. Median proceeds on remaining valid values
  • This new flags allows for preserving fault tolerance while preventing nils from crashing a medianization task.

added tests for:

  • checking the new flag does not conflict with lag
  • to reproduce the issue that motivated the implementation of this flag (EA returning a valid schema response with nulls)
    • first test reproduces the issue
    • second test checks that passing the implemented flag addresses the issue

Why ?

Problem

When a bridge returns HTTP 200 with a valid schema but null numeric values, the median task fails hard at decimal parsing (ErrBadInput), even when enough valid values exist to compute a result.

The existing lax flag doesn't solve this well: it filters nils early and doesn't count them as faults. With a typical config of allowedFaults = N-1, this silently bypasses fault tolerance, errors that would normally exceed the threshold slip through and the task can emit nil observations instead of failing.

@github-actions
Copy link
Contributor

👋 dav009, thanks for creating this pull request!

To help reviewers, please consider creating future PRs as drafts first. This allows you to self-review and make any final changes before notifying the team.

Once you're ready, you can mark it as "Ready for review" to request feedback. Thanks!

@dav009 dav009 marked this pull request as draft February 13, 2026 02:18
@cl-sonarqube-production
Copy link

@dav009 dav009 marked this pull request as ready for review February 13, 2026 04:57
@trunk-io
Copy link

trunk-io bot commented Feb 13, 2026

Static BadgeStatic BadgeStatic BadgeStatic Badge

Failed Test Failure Summary Logs
TestSetTokenTransferFeeConfig_Validations The test failed without a specific error message, likely due to an unexpected or missing condition during execution. Logs ↗︎

View Full Report ↗︎Docs

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.

1 participant