fix: move the target-path placeholder into the bucket slot, drop the dead public root - #1946
Open
serguei-gorokhov wants to merge 1 commit into
Open
serguei-gorokhov wants to merge 1 commit into
serguei-gorokhov wants to merge 1 commit into
Conversation
…dead public root
The declared-dependency target grammar now matches DIAL's real resource
addressing, {type}/{bucket}/{path...}, uniformly: the current-user
placeholder moves from the type slot (current-user/{type}/...) into the
bucket slot ({type}/{current-user}/...), written literally with braces.
Braces are collision-proof (INVALID_FILE_NAME_CHARS bans them in every
path element) and fail closed if the branch is ever missed (a raw brace
throws in fromAnyUrl's strict decode).
GLOBAL_VIEW_ROOTS and PERSONAL_TYPED_ROOTS collapse into one
DECLARABLE_TYPE_ROOTS set (segment 0, both forms) with the dead "public"
entry dropped -- "public" is a bucket value, never a type, so
target.path: "public/somefile" previously passed write-time validation
and was silently unresolvable at every request. The old early return that
let a recognized placeholder skip the root-vocabulary check is deleted,
not moved: the segment-0 vocabulary check now runs first, unconditionally,
for both forms -- otherwise credentials/{current-user}/... would have
been accepted at write time. The same vocabulary check is now also
enforced on the read side for concrete (non-placeholder) paths, closing a
gap for config-file apps that bypass write-time validation.
validateUserAuthored degenerates to the allowUserResourceDependencies flag
check alone: shape validation already runs first and requires segment 0
to be a declarable type, so a root-level "write everything personal"
declaration is not expressible under the new grammar at all.
No back-compat or migration work: this branch has never shipped to a real
deployment.
Spec: documentation repo, offline-access-delegation/implementation-specs/pr2b-target-path-grammar.md
Co-Authored-By: Claude Code <noreply@anthropic.com>
serguei-gorokhov
requested review from
Oleksii-Klimov and
astsiapanay
as code owners
September 9, 2026 18:58
This was referenced Sep 9, 2026
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.
Applicable issues
Description of changes
The declared-dependency target grammar now matches DIAL's real resource addressing,
{type}/{bucket}/{path…}, uniformly: the current-user placeholder moves from the type slot (current-user/{type}/…) into the bucket slot ({type}/{current-user}/…), written literally with braces. Braces are collision-proof (INVALID_FILE_NAME_CHARSbans them in every path element) and fail closed if the branch is ever missed (a raw brace throws infromAnyUrl's strict decode).GLOBAL_VIEW_ROOTSandPERSONAL_TYPED_ROOTScollapse into oneDECLARABLE_TYPE_ROOTSset (segment 0, both forms) with the deadpublicentry dropped —publicis a bucket value, never a type, sotarget.path: "public/somefile"previously passed write-time validation and was silently unresolvable at every request.credentials/{current-user}/…would have been accepted at write time. The same vocabulary check is now also enforced on the read side for concrete (non-placeholder) paths, closing a gap for config-file apps that bypass write-time validation.validateUserAuthoreddegenerates to theallowUserResourceDependenciesflag check alone: shape validation already runs first and requires segment 0 to be a declarable type, so a root-level "write everything personal" declaration is not expressible under the new grammar at all.No back-compat or migration work: this grammar has never shipped to a real deployment.
Behavior changes flagged for review
current-user/skills/— the previously shipped placeholder form — is rejected at write time; every declaration must use the braced{type}/{current-user}/…form.public/somefileis now a 400 (was accepted-and-dead);credentials/{current-user}/…and concretecredentials/<bucket>/…are rejected at write time and unresolvable at read time.Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
🤖 Generated with Claude Code