Skip to content

MOD-21561 - fix: preserve numeric type in JSON.CLEAR (MOD-21561) - #1722

Open
TalBarYakar wants to merge 1 commit into
masterfrom
tal.ba/bug/clear_save_type
Open

TalBarYakar wants to merge 1 commit into
masterfrom
tal.ba/bug/clear_save_type

Conversation

@TalBarYakar

@TalBarYakar TalBarYakar commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Note

Low Risk
Small, localized change to JSON.CLEAR scalar handling with new regression tests; no auth, persistence, or broad API surface impact.

Overview
JSON.CLEAR now keeps whether a number was stored as an integer or a float: floats clear to 0.0 instead of being turned into integer 0.

In ivalue_manager.rs, clear branches on INumber::has_decimal_point() so decimal numbers reset via 0.0 and integers still reset to 0. Pytest updates testClearScalar ($.num expects [0.0]) and adds testClearPreservesNumericType, covering root and nested paths after JSON.NUMINCRBY so cleared values stay 0 or 0.0 as appropriate.

Reviewed by Cursor Bugbot for commit 3e4cafa. Bugbot is set up for automated code reviews on this repo. Configure here.

@TalBarYakar TalBarYakar self-assigned this Nov 30, 2026
@codecov

codecov Bot commented Nov 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.14%. Comparing base (0805574) to head (3e4cafa).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1722      +/-   ##
==========================================
- Coverage   88.14%   88.14%   -0.01%     
==========================================
  Files          18       18              
  Lines        6851     6864      +13     
==========================================
+ Hits         6039     6050      +11     
- Misses        812      814       +2     

☔ View full report in Codecov by Harness.
📢 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.

This branch has not been deployed

No deployments
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