Skip to content

Validate graph invariants during deserialization - #1159

Closed
isPANN wants to merge 1 commit into
mainfrom
fix/graph-deserialization-validation
Closed

isPANN wants to merge 1 commit into
mainfrom
fix/graph-deserialization-validation

Conversation

@isPANN

@isPANN isPANN commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Share private construction checks with deserialization for SimpleGraph, DirectedGraph, BipartiteGraph, MixedGraph, and PlanarGraph.
  • Return deserialization errors for out-of-range endpoints, overflowing bipartite vertex counts, and violations of the existing planar edge-count bound.
  • Keep public constructor signatures and serialized formats unchanged. PlanarGraph still checks only its documented necessary edge-count condition, not full planarity.
  • Ten files; based directly on main.

Verification

  • Five regression tests fail on main: ordinary graph decoding panics, while the other graph types accept invalid data.
  • Full workspace all-feature tests: 6,483 passed; 2 existing ignored.
  • Topology coverage run: 116 passed; changed-line coverage 100% across 146 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

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.93%. Comparing base (7dd5fcd) to head (7e4f62f).

Additional details and impacted files
@@           Coverage Diff            @@
##             main    #1159    +/-   ##
========================================
  Coverage   95.93%   95.93%            
========================================
  Files        1074     1074            
  Lines      132106   132224   +118     
========================================
+ Hits       126730   126849   +119     
+ Misses       5376     5375     -1     

☔ 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 #1161 as graph and set-system input validation. Combined workspace all-feature tests and Clippy pass.

@isPANN isPANN closed this Sep 17, 2026
@isPANN
isPANN deleted the fix/graph-deserialization-validation 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