Add a CLI round-trip test for storage export/restore - #285
Merged
Conversation
vibium storage / storage restore had no test coverage at all, which is how the double-encoding bug in #217 shipped and stayed unnoticed. Covers the export shape, the restore round trip, and the unwrap that keeps state files written in the old shape loading. All three fail against the pre-#217 code. Adapted from a test contributed by @Jhoan0714 in #218.
hugs
force-pushed
the
test/storage-round-trip
branch
from
August 3, 2026 12:49
04edcc3 to
220912f
Compare
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.
vibium storage/storage restorehad no coverage on the agent code path, which is how the double-encoding bug in #217 shipped unnoticed.The storage tests that already exist do not catch it. I confirmed that by reintroducing the bug:
tests/js/async/storage.test.jsandtests/py/test_storage.pydo a full capture/clear/restore round trip, but againstapi.Router, which is a separate implementation. Both pass with the bug present.tests/mcp/server.test.jsdoes hit the affected code, but only asserts the call does not error. The bug produced valid, error-free JSON, so it passes too.Three cases, all failing against pre-#217 code and passing after:
storageas a nested object rather than a double-encoded stringAdapted from a test contributed by @Jhoan0714 in #218.
Full
make testpasses.