Skip to content

Allow a field accessor alongside FILES' '*'-traversal pointer - #275

Merged
dk107dk merged 2 commits into
mainfrom
feature/files-star-field-accessor
Aug 29, 2026
Merged

dk107dk merged 2 commits into
mainfrom
feature/files-star-field-accessor

Conversation

@dk107dk

@dk107dk dk107dk commented Aug 29, 2026

Copy link
Copy Markdown
Collaborator

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, instead
of raising -- the '*'-traversal peer of the literal-root GROUP-mode fix
from #274, one level broader (every traversal shape, not just the
literal-root one).

Background

_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 -- 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'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 #272, 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 -- that branch
lives inside the shared if field_call is not None: block -- so no code
change 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_read flag to catch resolving
several 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 unsupported check from has_manifest OR field_ accessor to has_manifest only, mirroring #274's exact fix.

Test plan

  • The one existing test asserting the old field-accessor rejection
    (POOL mode) converted to a positive assertion.
  • Three new tests added for shapes that were never testable before:
    GROUP one-level, GROUP any-depth, POOL any-depth.
  • STAR_LEDGER/FLATTEN_LEDGER fixtures added -- every other
    star-traversal test in this file still does not need one.
  • :manifest()-combined tests (still-correct rejection) left
    unchanged in every mode.
  • tests/references/ full tree: 1563 passed.
  • Full suite run twice for stability: 3156 passed, 11 failed both
    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

David Kershaw and others added 2 commits August 29, 2026 01:22
$*.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
@dk107dk
dk107dk merged commit 1975cd9 into main Aug 29, 2026
@dk107dk
dk107dk deleted the feature/files-star-field-accessor branch August 29, 2026 05:44
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.

1 participant