Skip to content

Validate string model deserialization and derived length bounds - #1165

Closed
isPANN wants to merge 1 commit into
mainfrom
fix/string-model-deserialization
Closed

isPANN wants to merge 1 commit into
mainfrom
fix/string-model-deserialization

Conversation

@isPANN

@isPANN isPANN commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Reuse constructor validation when loading ClosestString, GroupingBySwapping, LongestCommonSubsequence, ShortestCommonSupersequence, ShortestCommonSuperstring, and StringToStringCorrection.
  • Recompute the three derived maximum-length fields from input strings instead of trusting serialized values.
  • Share construction checks and length calculations with create specifications while retaining their existing input requirements.
  • Preserve public constructor signatures, serialized output fields, and solver/reduction interfaces. Twelve files, based directly on main.

Verification

  • All nine new regressions fail on main, covering invalid inputs and corrupted length bounds/search dimensions.
  • Full workspace all-feature tests: 6,487 passed; 2 existing ignored.
  • Miscellaneous model coverage run: 1,079 passed; changed-line coverage 98.54% across 205 lines.
  • Workspace all-target all-feature Clippy with warnings denied, formatting, and diff whitespace checks passed.

@codecov

codecov Bot commented Sep 17, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.53659% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 95.93%. Comparing base (7dd5fcd) to head (6fec366).

Files with missing lines Patch % Lines
src/models/misc/closest_string.rs 96.15% 1 Missing ⚠️
src/models/misc/grouping_by_swapping.rs 95.45% 1 Missing ⚠️
src/models/misc/string_to_string_correction.rs 96.29% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##             main    #1165    +/-   ##
========================================
  Coverage   95.93%   95.93%            
========================================
  Files        1074     1074            
  Lines      132106   132201    +95     
========================================
+ Hits       126730   126833   +103     
+ Misses       5376     5368     -8     

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@isPANN

isPANN commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator Author

Consolidated into #1166 as string and scheduling input validation. Combined all-feature workspace tests and Clippy pass.

@isPANN isPANN closed this Sep 17, 2026
@isPANN
isPANN deleted the fix/string-model-deserialization branch September 18, 2026 10:22
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