Allow a field accessor alongside FILES' '*'-traversal pointer - #275
Merged
Merged
Conversation
$*.files.*.:last():uuid() (POOL), $*.files.:all().:last():uuid() (GROUP, one level), and $*.files.:groups().:last():uuid()/ $*.files.:flatten().:last():uuid() (any depth) all now work, instead of raising -- the '*'-traversal peer of the literal-root GROUP-mode fix from the previous PR, one level broader (every traversal shape, not just the literal-root one). _query_star_traversal()'s shared name_three-processing tail had a single blanket check rejecting :manifest() and any field accessor together, for every traversal shape. The reduction logic just below it already independently reduces each file_home's own candidates (GROUP) or pools to one overall candidate (POOL) regardless of which accessor rides alongside the pointer -- nothing there needed to change. The one new question this raised beyond the literal-root case: _extract_data()'s Star3-aware branch (added in the previous PR, reading the global arrivals ledger since result.uuid alone does not say which named-file a '*'-traversal candidate came from) needed to generalize from the name_one-sourced field_call it was built for to a name_three-sourced one too -- confirmed it already does, since that branch lives inside the shared "if field_call is not None" block. Test fixtures needed a ledger they never previously required, since the shapes reaching that branch were always rejected before. :manifest() (whole-resource) stays rejected everywhere in this method, deliberately -- GROUP mode can produce more than one reduced candidate, and this method sets no ambiguous_content_read flag to catch resolving several whole entries at once. Also corrected a stale docstring/comment claiming the restriction existed because _extract_data() "cannot know" which manifest to read -- no longer true, and Rule 1 was the real, still-current reason even before that. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013gPjejPWvbWtjz2dw9h14M
David's own worked examples, now confirmed working end-to-end (#272, #273): getting uuids from all/one named-file's registrations, and combining them with SUBTRACT/INTERSECT against a RESULTS-side reference. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013gPjejPWvbWtjz2dw9h14M
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.
Summary
$*.files.*.:last():uuid()(POOL),$*.files.:all().:last():uuid()(GROUP, one level), and
$*.files.:groups().:last():uuid()/$*.files.:flatten().:last():uuid()(any depth) all now work, insteadof raising -- the
'*'-traversal peer of the literal-root GROUP-mode fixfrom #274, one level broader (every traversal shape, not just the
literal-root one).
Background
_query_star_traversal()'s shared name_three-processing tail had asingle blanket check rejecting
:manifest()and any field accessortogether, for every traversal shape -- broader than the literal-root
check #274 narrowed. Traced the reduction logic just below it before
touching anything: it already independently reduces each
file_home'sown candidates (GROUP) or pools to one overall candidate (POOL)
regardless of which accessor rides alongside the pointer -- nothing
there needed to change.
The one new question this raised beyond the literal-root case:
_extract_data()'s Star3-aware branch (added in #272, reading theglobal arrivals ledger since
result.uuidalone does not say whichnamed-file a
'*'-traversal candidate came from) needed to generalizefrom the name_one-sourced
field_callit was built for to aname_three-sourced one too. Confirmed it already does -- that branch
lives inside the shared
if field_call is not None:block -- so no codechange was needed there, only test fixtures needed a ledger they never
previously required (the shapes reaching that branch were always
rejected before).
:manifest()(whole-resource) stays rejected everywhere in this method,deliberately -- GROUP mode can produce more than one reduced candidate,
and this method sets no
ambiguous_content_readflag to catch resolvingseveral whole entries at once (Rule 1).
Also corrected a stale docstring/comment claiming the restriction
existed because
_extract_data()"cannot know" which manifest to read --no longer true (the Star3-aware ledger branch already solves that), and
Rule 1 was the real, still-current reason even before that.
What changed
Narrowed the shared
unsupportedcheck fromhas_manifest OR field_ accessortohas_manifestonly, mirroring #274's exact fix.Test plan
(POOL mode) converted to a positive assertion.
GROUP one-level, GROUP any-depth, POOL any-depth.
STAR_LEDGER/FLATTEN_LEDGERfixtures added -- every otherstar-traversal test in this file still does not need one.
:manifest()-combined tests (still-correct rejection) leftunchanged in every mode.
tests/references/full tree: 1563 passed.times (identical) -- the known, unrelated SFTP/S3 failures
requiring unset env vars (issue test_nos_server_config_1 crashes with a raw ValueError when SFTP_* env vars are unset, instead of failing clearly #216).
https://claude.ai/code/session_013gPjejPWvbWtjz2dw9h14M