Skip to content

test: leak checks match whole words, not letters inside random key hashes - #74

Merged
alexeybe1kin merged 1 commit into
mainfrom
test/supersede-flake
Nov 13, 2026
Merged

alexeybe1kin merged 1 commit into
mainfrom
test/supersede-flake

Conversation

@alexeybe1kin

Copy link
Copy Markdown
Collaborator

Fixes a flaky test. Test-only change; no CHANGELOG line.

test_boundary_supersede failed in CI on #65 with assert 'bus' not in stack.stored_text(). The dump of every stored value includes PBKDF2 key hashes, and one of them held ...GdGbusxe.... The same risk applied to "gym", "chess" and "grey" in three other tests.

The fix is a new memory_stack.holds_word(dump, word), a case-insensitive whole-word search. A leaked sentence or a stored token (["bus"]) still fails the check; letters inside a hash or id no longer do. The four short-word checks use it now; checks for long phrases and marks are unchanged.

Tests: the four files, 19 passed + 1 new test that pins the helper on the hash from the failed run.

@alexeybe1kin
alexeybe1kin merged commit af7e6f7 into main Nov 13, 2026
3 checks passed
@alexeybe1kin
alexeybe1kin deleted the test/supersede-flake branch November 13, 2026 10:59
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