Skip to content

feat: dol.key_in_scope(store, k), a non-writing filt_iter scope probe (#129) - #130

Merged
thorwhalen merged 2 commits into
masterfrom
feat/key-in-scope-129
Oct 13, 2026
Merged

thorwhalen merged 2 commits into
masterfrom
feat/key-in-scope-129

Conversation

@thorwhalen

@thorwhalen thorwhalen commented Oct 13, 2026 •

Copy link
Copy Markdown
Member

Fixes #129. filt_iter records its predicate on its layer class (_filt_iter_filts); key_in_scope(store, k) follows k through the .store layers outermost first, applies each layer's predicates to the key as it enters that layer (what a write does), maps it with _id_of_key, and finally asks a leaf that has is_valid_key (e.g. Files). No reads or writes. Only a class's own record counts (Store wrappers delegate inner attributes as DelegatedAttribute, which would attribute an inner predicate to the outer layer).

Adversarial review (Opus): agreed with the real write/in for every stacking tried (filt_iter, wrap_kvs, KeyCodecs, Pipe, cached_keys, add_prefix_filtering, cache_vals, mk_dirs_if_missing; class and instance; both orders; set/list/generator filters; subclasses; MI; pickling/deepcopy; Files coordinates). Gaps found and documented in the docstring (no code change): layers that look keys up themselves while keeping the identity _id_of_key (add_path_access, flatten) give a silently wrong answer; the probe raises whatever a layer's _id_of_key raises; a subclass changing the key inside __setitem__.

Dependents gate: pending (the new attribute only touches filt_iter classes).

🤖 Generated with Claude Code

thorwhalen added a commit that referenced this pull request Oct 13, 2026
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
thorwhalen and others added 2 commits October 13, 2026 11:55
…robe (#129)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@thorwhalen
thorwhalen force-pushed the feat/key-in-scope-129 branch from 7f55c0a to 6d39b6d Compare October 13, 2026 11:55
@thorwhalen
thorwhalen merged commit 5824c31 into master Oct 13, 2026
12 checks passed
@thorwhalen
thorwhalen deleted the feat/key-in-scope-129 branch October 13, 2026 12:11
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.

Expose a non-writing scope probe: filt_iter records its predicate; dol.key_in_scope(store, k)

1 participant