Repository navigation
broker: don't bind literal routes as tenancy resource ids - #123
Merged
Merged
Conversation
GET /v1/agents/voices is a literal allow entry next to the template
GET /v1/agents/{agent_id}. pathParams matched both and bound
agent_id="voices", which no caller owns, so tenancy refused the route with
a 404 for everyone (io.pilot.agentphone's list_voices). A request that hits a
literal allow entry now binds no path params; query and body refs are still
ownership-checked, and templated routes are unchanged.
Co-Authored-By: Claude Opus 5.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.
Problem
agentphone.list_voicesreturns404 {"error":"not found"}for every caller, on every platform.GET /v1/agents/voicesis a literal allow entry that sits beside the templateGET /v1/agents/{agent_id}.pathParamsmatches both patterns and bindsagent_id="voices". Nobody owns an agent with that id, so tenancy refuses the request before it reaches AgentPhone.Fix
When a request hits a literal allow entry, tenancy binds no path params (
AppEntry.tenancyPatterns). Query-string and body refs are still ownership-checked, and templated routes are unchanged.Tests
TestTenancy_LiteralRouteBesideTemplateIsNotAnID: the literal route reaches the partner once, and an unowned/v1/agents/{id}is still refused and never forwarded.go test ./internal/broker/is green.Rollout
Needs a broker redeploy on
pilot-publish. No registry change.Found during the app-store audit.
🤖 Generated with Claude Code