• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

StoneCypher / jssm / 94065656f6892f7ebb2e65b990ce334cdef6c8e6
100%
master: 100%

Build:
Build:
LAST BUILD BRANCH: main
DEFAULT BRANCH: master
Ran 09 Jan 2026 01:10AM UTC
Jobs 10
Files 15
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

09 Jan 2026 01:08AM UTC coverage: 99.822% (-0.06%) from 99.88%
94065656f6892f7ebb2e65b990ce334cdef6c8e6

push

github

StoneCypher
Add version checking to deserialize to refuse future versions

This commit implements version compatibility checking in the deserialization
process to prevent loading data from future versions of the library.

Changes made:

1. Added compareVersions() utility function
   - Compares semantic version strings (e.g., "5.104.2")
   - Returns negative/0/positive for less than/equal/greater than
   - Handles versions with different numbers of components
   - Fully documented with DocBlock comments and examples

2. Enhanced deserialize() function
   - Now checks if serialized data is from a future version
   - Throws clear error message if version is too new
   - Error includes both versions and upgrade guidance
   - Updated DocBlock documentation with @throws annotation
   - Added comprehensive usage examples

3. Comprehensive test coverage (14 new tests)
   - Tests for refusing future major/minor/patch versions
   - Tests for accepting same and older versions
   - Tests for error message content
   - Tests for successful deserialization with version check
   - Tests for compareVersions utility behavior
   - All 5075 tests pass successfully

Why this is important:
- Prevents data corruption from incompatible future formats
- Provides clear error messages to users
- Follows semantic versioning best practices
- Maintains backward compatibility (older versions still load)

The implementation is defensive and user-friendly, refusing to deserialize
data that might contain features or structures the current version doesn't
understand, while clearly communicating what the user needs to do (upgrade).

Fixes issue #1010, see https://github.com/StoneCypher/fsl/issues/1010

524 of 526 branches covered (99.62%)

Branch coverage included in aggregate %.

11 of 11 new or added lines in 2 files covered. (100.0%)

1155 of 1156 relevant lines covered (99.91%)

23334.63 hits per line

Jobs
ID Job ID Ran Files Coverage
1 94065656f6892f7ebb2e65b990ce334cdef6c8e6.1 09 Jan 2026 01:10AM UTC 15
99.82
GitHub Action Run
2 94065656f6892f7ebb2e65b990ce334cdef6c8e6.2 09 Jan 2026 01:10AM UTC 15
99.82
GitHub Action Run
3 94065656f6892f7ebb2e65b990ce334cdef6c8e6.3 09 Jan 2026 01:10AM UTC 15
99.82
GitHub Action Run
4 94065656f6892f7ebb2e65b990ce334cdef6c8e6.4 09 Jan 2026 01:10AM UTC 15
99.82
GitHub Action Run
5 94065656f6892f7ebb2e65b990ce334cdef6c8e6.5 09 Jan 2026 01:10AM UTC 15
99.82
GitHub Action Run
6 94065656f6892f7ebb2e65b990ce334cdef6c8e6.6 09 Jan 2026 01:10AM UTC 15
99.82
GitHub Action Run
7 94065656f6892f7ebb2e65b990ce334cdef6c8e6.7 09 Jan 2026 01:10AM UTC 15
99.82
GitHub Action Run
8 94065656f6892f7ebb2e65b990ce334cdef6c8e6.8 09 Jan 2026 01:10AM UTC 15
99.82
GitHub Action Run
9 94065656f6892f7ebb2e65b990ce334cdef6c8e6.9 09 Jan 2026 01:11AM UTC 15
99.82
GitHub Action Run
10 94065656f6892f7ebb2e65b990ce334cdef6c8e6.10 09 Jan 2026 01:11AM UTC 15
99.82
GitHub Action Run
Source Files on build 94065656f6892f7ebb2e65b990ce334cdef6c8e6
  • Tree
  • List 15
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • 94065656 on github
  • Prev Build on main (#464D03B0...)
  • Next Build on VersionCheckDeserialize_1010 (#5465A4C0...)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc