Skip to content

Commit ddca9ab

Browse files
committed
correction: Say the record ranks only the search's best repairs
Both search paths return only their lowest capture volume, so a record match cannot reach a costlier repair (Codex review on #221). Claude-Session: https://claude.ai/code/session_01N8jLK8HGLaWJq2AJGmxPVe
1 parent 97ef4df commit ddca9ab

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎src/codex32/correction.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -845,7 +845,7 @@ def _best(
845845
) -> tuple[CorrectionCandidate, ...]:
846846
"""Apply CLI-only Hamming and CRC tie breakers plus optional wallet hints.
847847
848-
A wallet-record match outranks everything: a wrong seed matches it 1 time in 2**32.
848+
A wallet-record match (wrong seeds match 1 in 2**32) outranks them among the lowest-volume repairs.
849849
"""
850850
if recorded is not None and (matching := [item for item in candidates if recorded(item) is True]):
851851
candidates = matching

‎tests/test_correction_indel.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ def test_cli_tie_breaks_follow_hamming_crc_then_fingerprint() -> None:
429429
assert _best((high_hamming, crc, fingerprint_match), fingerprint_match=matcher) == (fingerprint_match,)
430430

431431

432-
def test_a_wallet_record_match_outranks_capture_volume_and_every_tie_breaker() -> None:
432+
def test_a_wallet_record_match_outranks_every_other_ranking_in_best() -> None:
433433
def fingerprint(secret: MasterSeed) -> bytes:
434434
return fingerprint_seed(secret.seed_bytes)
435435

0 commit comments

Comments
 (0)