Repository navigation
Fix #1: .items()/.values() honour dol wrappers; scan_items/scan_values opt-in - #5
Merged
Merged
Conversation
…es opt-in fast path Drop the nested ValuesView/ItemsView (they routed through leaf-bound iter_items/iter_values, escaping any key/value codec). iter_items/iter_values are replaced by free functions that accept only an unwrapped reader. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…tr__ that masks AttributeErrors Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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 #1 (the user-visible escape); structural hook refactor split to a follow-up issue.
ValuesView/ItemsViewthat routed through leaf-bounditer_items/iter_values; dol's default views (via__iter__+__getitem__) are correct under any wrapper. Cost: one get per key instead of one scan.iter_items/iter_valuesmethods removed (API break, nothing in the fleet used them); accessing them raises anAttributeErrornaming the replacement. New free functionsscan_items(store)/scan_values(store)give the single-scan fast path and refuse wrapped stores with a TypeError (a free function cannot apply the wrapper's mapping). This follows the spirit ofcosmodol.ops(keyed/leaky capabilities leave the method surface) but not its mechanism: cosmodol's free functions resolve keys through wrappers viainner_most_key, which has no use here because dynamodol has no key-taking method; the leak was return-side.Adversarial review (Opus subagent): scoping held on all reader/persister classes and wrap routes; one confirmed defect — my first
__getattr__for removed methods masked real AttributeErrors from properties liketable. Replaced with a descriptor (class access returns itself so class-wraps still work), regression test added. Also made scan_* validate eagerly. Speculative: patch-release API break; slower unwrapped.items().Dependents gate: no dependent suites; the 5 doctest failures (live DB) are identical on master.
🤖 Generated with Claude Code