volcano-sh / volcano-sh/agentcube
Router should use longest valid pathPrefix match for sandbox entrypoints
Open
@avinxshKD is already working on this.
Since Jun 17, 2026.
- Dominant language
- Go
- Stars
- 167
- Forks
- 88
- Avg merge
- 44m
- Merged PRs (30d)
- 1
Description
The router currently picks the first entrypoint where strings.HasPrefix(path, ep.Path) is true.
That breaks overlapping prefixes. If a runtime has both / and /api, then /api/foo can get routed to / depending on the order in the CR. Also /api2 matches /api, which is not really the documented /api/... behavior.
Steps:
- Create an AgentRuntime/CodeInterpreter with two ports:
//api
- Put
/before/apiin the spec. - Send a request to
/api/foo.
Expected:
Request goes to the /api entrypoint.
Actual:
Request can go to the / entrypoint.
This should probably do longest-prefix matching and make sure /api only matches /api or /api/..., not /api2.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.