Narrow :manifest() + chained field accessor for RESULTS run-level reads - #273
Merged
Merged
Conversation
…le entry (RESULTS) $*.results.:flatten():manifest():named_file_uuid() -- David's own worked example -- now resolves to the field value, not the whole manifest.json entry. _extract_data()'s has_manifest branch returned the whole entry the moment :manifest() was present anywhere in name_one_calls, unconditionally, without ever checking whether a field accessor was also chained alongside it to narrow further -- the run_field_call branch just below that already does that narrowing was structurally unreachable whenever :manifest() was also present. Not '*'-traversal-specific: the identical bug affected the literal-root shape too, just never exercised by a test before this. query()/_query_star_traversal()/_star_run_selector_chain() needed no changes -- they already produced correct, per-run results and already exempted :manifest()/a field accessor from rejection. The entire fix is in _extract_data(). :manifest() is legal but redundant alongside a field accessor (the field-accessor-alone shape already worked correctly before this PR), confirmed before building rather than assumed. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013gPjejPWvbWtjz2dw9h14M
dk107dk
pushed a commit
that referenced
this pull request
Aug 29, 2026
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
$*.results.:flatten():manifest():named_file_uuid()-- David's own exactworked example (meant to
INTERSECTagainst the FILES-side uuid set fromthe previous PR) -- now resolves to the field value, not the whole
manifest.json entry.
Background
The original framing was "does the undotted shape need to be made to
apply an accessor it currently discards, or should it raise." Traced
through
_query_star_traversal(),_star_run_selector_chain(), and_extract_data()in full before answering, rather than assuming eitherdiagnosis. Two things turned out different from the original framing:
_query_star_traversal()/_star_run_selector_chain()were alreadyfine --
_star_run_selector_chain()already exempts:manifest()/afield accessor from its "unsupported function" rejection, and
query()already produces real, per-run results regardless. Nothingneeded changing there.
_extract_data(), and it is not'*'-traversal-specific -- the identical bug affects the literal-rootshape too (
$acme.results.customers/2025:first():manifest() :named_file_uuid()), just never exercised by any existing test._extract_data()'shas_manifestbranch returned the wholemanifest.jsonentry the moment:manifest()was present anywhere inname_one_calls, unconditionally -- before ever checking whether afield accessor was also chained alongside it. The
run_field_callbranch that already does that narrowing, just below it, was
structurally unreachable whenever
:manifest()was also present.Also confirmed before building:
:manifest()is not actually requiredfor a run-level field read at all --
$*.results.:flatten() :named_file_uuid()(no:manifest()) already worked correctly beforethis PR, via the pre-existing
run_field_callbranch.:manifest()chained alongside a field accessor is legal but redundant, the same
relationship the previous FILES PR's
:first():uuid()vs.:first():manifest():uuid()distinction already established -- not adifferent, narrower shape needing its own separate design.
What changed
Widened
_extract_data()'shas_manifestbranch (shared by literal-rootand
'*'-root, both funnel through the same method) to check for a fieldaccessor in
name_one_callsafter reading the entry, and -- if present-- narrow to that field using the identical extraction logic
(
function_cls.KEY,_extract_field_value_with_ledger_fallback()) thesibling
run_field_callbranch already has, instead of returning thewhole entry. Bare
:manifest()with no field accessor is unchanged.Test plan
'*'root: narrowing works with multiple pooled runs, no pointer(matches David's own syntax exactly).
:manifest()alone still gives the whole entry.:manifest()order also works(order-independence).
name_threestill correctly raises.tests/references/full tree: 1560 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