Fix layer-store snapshot path (#15)#16
Merged
Merged
Conversation
added 2 commits
April 24, 2026 16:07
Add layer_path arg to trie_snapshot/trie_restore; LayerStore::save now creates parent dir. Unblocks ubuntu CI and stops tests polluting the global layer store.
Same ENOENT class as #15: tests that use default paths hit nonexistent W:/data/trie-store/ on CI.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #15.
Problem
handle_snapshotwrote the layer store to the hardcoded absolute Windows pathW:/data/trie-store/layer-store.json, ignoring caller-supplied paths. Onubuntu-latestCI that directory does not exist, soscenario_3_cross_session_learningfailed with ENOENT. On Windows, every test run polluted the developer's global layer store.Fix
trie_snapshot/trie_restorenow accept alayer_pathargument, mirroring the existingword_path/content_pathparams. Defaults toDEFAULT_LAYER_PATH.LayerStore::savecreate_dir_alls the parent directory before writing, so the default path works on a fresh machine (and so CI doesn't depend on a pre-existingW:/data/trie-store/).scenario_3_cross_session_learningpasses a templayer_pathalongside its other temp paths.Test plan
cargo build— clean, no warningscargo test --test honest_agent_scenarios scenario_3_cross_session_learning— passescargo test— full suite, all 22 binaries passubuntu-latestpasses (verify once PR is up)