Skip to content

test: add tests for SHORT_SUM_LENGTH vs SUM_LENGTH phase toggle - #2571

Merged
oferchen merged 2 commits into
masterfrom
test/phase-toggle-tests
Mar 7, 2026
Merged

oferchen merged 2 commits into
masterfrom
test/phase-toggle-tests

Conversation

@oferchen

@oferchen oferchen commented Mar 7, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add 10 tests across signature and transfer crates verifying phase-aware checksum length behavior
  • Verify constants match upstream: SHORT_SUM_LENGTH == 2, MAX_SUM_LENGTH == 16
  • Test derive_strong_sum_length() dynamic computation for phase 1 vs short-circuit for phase 2
  • Test calculate_signature_layout() produces different strong_sum_length per phase

Test plan

  • All 17 sum_length/checksum_length tests pass
  • Clippy clean
  • CI: fmt, clippy, nextest, cross-platform

Verify phase-aware checksum length constants and behavior:
- PHASE1_CHECKSUM_LENGTH == SHORT_SUM_LENGTH == 2
- REDO_CHECKSUM_LENGTH == MAX_SUM_LENGTH == 16
- derive_strong_sum_length() returns dynamic value for phase 1
- derive_strong_sum_length() short-circuits to 16 for phase 2 redo
- calculate_signature_layout() produces different strong_sum_length
  for same file under phase 1 vs phase 2
@github-actions github-actions Bot added the test label Mar 7, 2026
@oferchen
oferchen merged commit d34daf6 into master Mar 7, 2026
31 checks passed
@oferchen
oferchen deleted the test/phase-toggle-tests branch March 7, 2026 13:59
oferchen added a commit that referenced this pull request May 1, 2026
* test: add tests for SHORT_SUM_LENGTH vs SUM_LENGTH phase toggle

Verify phase-aware checksum length constants and behavior:
- PHASE1_CHECKSUM_LENGTH == SHORT_SUM_LENGTH == 2
- REDO_CHECKSUM_LENGTH == MAX_SUM_LENGTH == 16
- derive_strong_sum_length() returns dynamic value for phase 1
- derive_strong_sum_length() short-circuits to 16 for phase 2 redo
- calculate_signature_layout() produces different strong_sum_length
  for same file under phase 1 vs phase 2

* style: fix rustfmt formatting for DataCopied match arm
oferchen added a commit that referenced this pull request May 5, 2026
* test: add tests for SHORT_SUM_LENGTH vs SUM_LENGTH phase toggle

Verify phase-aware checksum length constants and behavior:
- PHASE1_CHECKSUM_LENGTH == SHORT_SUM_LENGTH == 2
- REDO_CHECKSUM_LENGTH == MAX_SUM_LENGTH == 16
- derive_strong_sum_length() returns dynamic value for phase 1
- derive_strong_sum_length() short-circuits to 16 for phase 2 redo
- calculate_signature_layout() produces different strong_sum_length
  for same file under phase 1 vs phase 2

* style: fix rustfmt formatting for DataCopied match arm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant