feat(session): add conformance checker and pluggable storage resolution #341#345
Open
mmpouya wants to merge 3 commits into
Open
feat(session): add conformance checker and pluggable storage resolution #341#345mmpouya wants to merge 3 commits into
mmpouya wants to merge 3 commits into
Conversation
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.
Implements steps 2 and 3 from #341
treats SessionStorage as a stable public extension point.
Changes:
Step 2 — Conformance checker (tau_agent.session.conformance)
verify_session_storage()— a pytest-ready helper that validates anySessionStorageimplementation against the storage contract: fresh storage is empty, appends are durable and repeatable, all entry types round-trip, and reopen preserves data.SessionStorageConformanceError— raised on the first violation with a clear message.conformance_entries()— produces one linked chain of every entry type, including edge cases (float timestamps, None fields, nested JSON).Third-party packages (like
tau_hub) can self-certify in one test:Step 3 — Pluggable storage resolution (tau_coding.session_storage)
create_session_storage(record, factory=None)is the new joint between tau_coding and storage backends.TAU_SESSION_STORAGEenv var (package.module: attribute) > default JSONL atrecord.path.SessionStorageResolutionErrorwith pointed messages for bad specs, missing modules/attributes, and non-callable factories.No changes to existing behaviour when nothing is configured.
Resolves #341
Note:
But still not updated the documentation (first step from #341).