Take chunk uses through pins

- Every getChunk(..).use() site calls Mantle.useChunk, which cannot fail because a save closed the chunk in between
- Covered-chunk cleanup, custom block and static object layers take their chunk through useChunk
- Discovered flag writes go through Mantle.flag instead of an unpinned chunk
- Test mantles stub useChunk the way the real one behaves
This commit is contained in:
Brian Neumann-Fopiano committed 2026-09-28 15:46:54 -04:00
1 parent 8899c9e3f9
commit 59165df427
42 files changed
+94 -86

No files matched your search

@@ -290,7 +290,7 @@ public final class ObjectContinuationProbeTest {
}
GenerationHistoryRuntimeRouter router = engine.getGenerationHistoryRuntimeRouter().orElseThrow();
try (GenerationHistoryRuntimeRouter.SavedChunkMantle saved = router.openSavedChunkMantle(0, 0)) {
MantleChunk<Matter> chunk = saved.mantle().getChunk(0, 0).use();
MantleChunk<Matter> chunk = saved.mantle().useChunk(0, 0);
try {
for (Map.Entry<Position, String> edit : edits.entrySet()) {
Position position = edit.getKey();