Repository navigation
fix: a child names the owner its parent's scopes are selected to - #78
Merged
Merged
Conversation
Since codefly-dev/authority#7 a person's Work Context at a solution carries its installation roles selected to the installation's principal, and the authority holds a child within what that owner holds (child = current grants intersected with the binding). issueChild asked owner-blind, which reads as every owner's resources, so every relayed call through a solution was refused as "a child widens what its owner holds through binding ...". The viewer now records the one owner the authority's Check answer selects (the current actor's granted scopes, or the authority scopes when no actor hopped), and every ForParent ask names it; none or several owners name none. The authority client and hop move to authority main f41cc2ba for WorkScopeV1.resource_owner_id. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
antoinetoussaint-byte
added a commit
that referenced
this pull request
Oct 27, 2026
… (x-codefly-operation) Beside the authority policy of each operation whose policy requires only read, Server.InterfaceArtifact now writes core's x-codefly-operation marker, which core itself derives from that policy (runnable.RouteMarker, core#852). `codefly generate runnables` derives a Runnable package — and so a tool — from every marked route, as it does from every method a module serves behind the hop. - Operation.Exclude keeps a read from every agent, as codefly.runnable.v0.exclude keeps a module's method. The MCP route and every relayed route carry it. - InterfaceDocument marks nothing: the marker names the audience the serving runtime's hop admits, which only the Server knows. A solution must commit Server.InterfaceArtifact's output, and the README and CHANGELOG say so. - Every defined object closes additionalProperties, which core's bounded profile requires of a fixed shape. - Core moves to v0.19.7-0.20261026182446-518714d046af (core#852 merged). Rebased onto main after #78: main's authority-client and hop pins and its Go 1.27.3 bump are kept, core alone moves. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
What we are trying to do
A person reading through a solution (the wiki) must reach the document store as the solution's installation allows, and nothing more. Since codefly-dev/authority#7, the authority issues a person's Work Context at a solution with every role scope selected to the installation's principal (
resource_owner_id). It then holds a child of that context to what that owner holds there: a child is the owner's current grants intersected with the binding (authority-coredecide.Issue/scope.Attenuates).issueChildsent its ask without an owner. The authority reads an owner-blind ask as covering every owner's resources, so it refused every call relayed through a solution:This was observed live in the wiki playground before the change.
What changed
selectedOwner(wc)returns the one owner that a checked Work Context's effective scopes select. The effective scopes are the current actor'sgranted_scopes, orauthority_scopeswhen no actor has hopped. If the scopes select no owner, or more than one, it returns"": the runtime never chooses between owners. In that case the authority refuses an ask that needed an owner, and says why.requestViewer) records that owner from the authority's ownCheckanswer (viewerGateway). The runtime still decodes nothing.issueChildnames that owner on every scope aForParentchild asks for. A gateway built outside a request names no owner.f41cc2baforWorkScopeV1.resource_owner_id.gomoves to 1.27.3 with them (the libraries require it).Reused: the authority's generated client, the hop library's
IssueForParent, and theCheckanswer the runtime already asks for on every request. Not added: any token decode, any second issue path, or any new scope field on the publicScopetype.Classification: fix, at the place that owns the behaviour. This runtime builds every child ask. The wiki's local proof had patched this function by
replace, decoding the parent token; this PR replaces that patch with the authority's answer.Tests
TestTheSelectedOwnerIsTheOneTheEffectiveScopesSelectcovers: no scopes; owner-blind scopes; one owner (repeated, mixed with owner-blind); two owners (none named); the current actor's grants winning over the authority scopes; an actor granted no owner.TestAChildNamesTheOwnerItsParentIsSelectedTochecks, through the stand-in authority:TestThePassthroughRelaysAsTheViewernow also relays as a person at an installation and checks the owner on the child's ask.ResourceOwnerId: ownerdropped fromissueChild, both owner tests fail.go test -race ./... -count=1,go vet ./...,gofmt -l .andgo mod tidy -diff.Proved end to end
obin-ai/core-solutions wiki playground (the companion PR, pinning this head
8ea6c260with noreplace), naming scopeowf2, 2026-10-27T02:20Z. The run used document storeaca93a1f(#594, owner-aware), robin73620352, authority mainf41cc2ba, and the CLI built from cli mainc791071b. There were no local patches.collection attached to the installation it was created for installation=fc555ea7-… owner=32fa57d8-….ListCollectionreturns 200 with the document, andSearchreturns 200 with the hit, both through the hop.ListCollectionof Acme's collection:documents.collection:read is limited to the collections 3c5ff48c-… owns.Searchreturns nothing.Not verified / follow-ups
8ea6c260reachable, then cut the release and re-pin the wiki.solutions/proposalsalso pinse53e044. It moves when that solution relays through a binding under owner-selected roles; this PR does not touch it.🤖 Generated with Claude Code