cultcache-rs: pin the one-global rule on load_soa (PR #15 gap) #27

Merged
libby merged 1 commit from libby/cultcache-rs-load-soa-global-test into main 2026-11-07 16:18:28 +00:00
Member

Adds loading_an_soa_table_that_holds_two_globals_is_refused to packages/cultcache-rs/tests/lookups.rs.

CultCache::load_soa checks the table with refuse_second_globals (src/lib.rs), but PR #15's tests covered only the put paths and pull_all. The test builds a table of two Settings globals: the load is refused with a typed CultCacheSecondGlobal naming both keys, the prior view (global and plain record) is untouched, and a table with a single global loads and replaces the view.

Mutation check: removing the refuse_second_globals call in load_soa (and in pull_all, same sed) fails this test and the store-load test; restored afterwards. cargo test --test lookups: 17 passed.

Test-only change; no source touched.

🤖 Generated with Claude Code

Adds `loading_an_soa_table_that_holds_two_globals_is_refused` to `packages/cultcache-rs/tests/lookups.rs`. `CultCache::load_soa` checks the table with `refuse_second_globals` (`src/lib.rs`), but PR #15's tests covered only the put paths and `pull_all`. The test builds a table of two `Settings` globals: the load is refused with a typed `CultCacheSecondGlobal` naming both keys, the prior view (global and plain record) is untouched, and a table with a single global loads and replaces the view. Mutation check: removing the `refuse_second_globals` call in `load_soa` (and in `pull_all`, same sed) fails this test and the store-load test; restored afterwards. `cargo test --test lookups`: 17 passed. Test-only change; no source touched. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
cultcache-rs: pin the one-global rule on load_soa
Some checks failed
CultMesh QUIC native / Build win32-x64 (pull_request) Has been skipped
CultMesh QUIC native / Build linux-x64 (pull_request) Has been skipped
CultMesh QUIC native / Release native binaries (pull_request) Has been skipped
CultMesh portability and performance / ubuntu-latest reactive semantics and leases (pull_request) Failing after 4m50s
CultMesh QUIC native / Verify committed binaries match SHA256SUMS (pull_request) Successful in 26s
08715ac55c
load_soa installs a whole table and checks it with refuse_second_globals, but no test
reached that call (PR #15 covered put paths and pull_all). A table holding two records
of a global type is refused with CultCacheSecondGlobal and the prior view survives; a
table with one global loads and replaces the view.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
libby merged commit 655cb2c909 into main 2026-11-07 16:18:28 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
GameCult/CultLib!27
No description provided.