Skip to content

Fix layer-store snapshot path (#15)#16

Merged
tomas-samek merged 2 commits into
mainfrom
fix/snapshot-layer-path-15
Apr 24, 2026
Merged

Fix layer-store snapshot path (#15)#16
tomas-samek merged 2 commits into
mainfrom
fix/snapshot-layer-path-15

Conversation

@tomas-samek

Copy link
Copy Markdown
Owner

Closes #15.

Problem

handle_snapshot wrote the layer store to the hardcoded absolute Windows path W:/data/trie-store/layer-store.json, ignoring caller-supplied paths. On ubuntu-latest CI that directory does not exist, so scenario_3_cross_session_learning failed with ENOENT. On Windows, every test run polluted the developer's global layer store.

Fix

  • trie_snapshot / trie_restore now accept a layer_path argument, mirroring the existing word_path / content_path params. Defaults to DEFAULT_LAYER_PATH.
  • LayerStore::save create_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-existing W:/data/trie-store/).
  • scenario_3_cross_session_learning passes a temp layer_path alongside its other temp paths.

Test plan

  • cargo build — clean, no warnings
  • cargo test --test honest_agent_scenarios scenario_3_cross_session_learning — passes
  • cargo test — full suite, all 22 binaries pass
  • CI on ubuntu-latest passes (verify once PR is up)

Tomáš Samek 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.
@tomas-samek tomas-samek merged commit 06176d9 into main Apr 24, 2026
1 check passed
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.

trie_snapshot hardcodes layer-store path, breaks CI and test isolation

1 participant