Skip to content

I159: No test combines encryption with the on-disk (Path) spillway sidecar #147

Description

@Xof

Migrated from ISSUES.md, which was retired in favour of GitHub issues. Original id I159, priority P2, from the 2026-07-02 deep review (docs/reviews/review-20260702-001902.md).

The text below is the triaged entry verbatim, including the corrections triage made to the original finding.


Where: tests/spillway_integration.rs:22

Problem: No test anywhere combines encryption with the production on-disk spillway sidecar. Chisel::open always uses SpillwayLocation::Path (src/lib.rs:381), but every encrypted-spillway test (src/page_cache.rs:1985 fresh_encrypted_cache_with_spillway) hardcodes SpillwayLocation::InMemory, and tests/spillway_integration.rs never sets encryption_key (grep confirms zero 'encryption' hits in the spillway integration tests). The spillway sidecar is a second file that receives page payloads mid-transaction. The at-rest-encryption promise ('no plaintext hits disk') is exactly about this path, and the only coverage is unit-level against an in-memory buffer. A regression that routed plaintext bytes into the Path-backed sidecar (e.g. a drain refactor picking the wrong payload_size branch) would pass the entire suite.

Direction of fix: Add one integration test: open an encrypted DB with a ~4-page cache, allocate sentinel-patterned values until pages spill, scan the sidecar file for the sentinel bytes (must be absent), then commit + reopen + read back.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:testsCoverage gaps, tests that cannot fail

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions