Skip to content

test(#45): strengthen partition subdirectory test to assert prefix layout - #83

Merged
s2x merged 1 commit into
masterfrom
test/issue-45-strong-partition-test
Aug 22, 2026
Merged

test(#45): strengthen partition subdirectory test to assert prefix layout#83
s2x merged 1 commit into
masterfrom
test/issue-45-strong-partition-test

Conversation

@s2x

@s2x s2x commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Closes #45

The partition subdirectory test only asserted that a child created inside a partition had the right path and existed — nothing wrote or read an actual key through the returned subspace, so a partition prefix that silently leaked bytes outside the partition boundary would pass CI.

Now the test:

  • asserts the child subspace rawPrefix strictly begins with the partition rawPrefix,
  • round-trips a write through $sub->pack(['k']) and reads it back,
  • verifies a raw getRangeAllStartsWith($partition->rawPrefix) scan surfaces that exact key.

(The other point raised in #45getAddressesForKey asserting only assertNotEmpty — was already strengthened in PR #36, so that half is already covered.)

Verification

  • composer lint (PHPCS + Rector + PHPStan level 9): no errors
  • composer test:unit: 469 tests OK
  • --testsuite=Integration against live FDB in Docker: 209 tests OK (strengthened partition test: 9 assertions OK)

…yout

The partition subdirectory test only asserted that a child created inside
a partition had the right path and existed. Nothing wrote or read an
actual key through the returned subspace, so a partition prefix that
silently leaked bytes outside the partition boundary would pass CI.

Now the test round-trips a write through $sub->pack(['k']), asserts the
child prefix strictly begins with the partition prefix, and verifies a raw
getRangeAllStartsWith($partition->rawPrefix) scan surfaces that key.

Changelog entry and a directory-layer doc note document the convention.
@s2x
s2x merged commit 9955447 into master Aug 22, 2026
6 checks passed
@s2x
s2x deleted the test/issue-45-strong-partition-test branch August 22, 2026 21:38
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.

[Tests] Weak or missing assertions allow latent bugs to pass CI

1 participant