Repository navigation
fix(client): honor explicit resource URL handle mode - #4254
Open
rudycelekli wants to merge 1 commit into
Open
rudycelekli wants to merge 1 commit into
rudycelekli wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
🟢 Approval recommended
The implementation consistently preserves explicit handle selections and provides comprehensive regression coverage.
0 open findings
What changed in this PR
Fixes explicit resource_urls=handle handling in the Go SDK and dsh plugin while preserving default inheritance behavior.
Changes:
- Sends explicit handle mode instead of omitting it.
- Corrects restricted-key fallback to retry with handles.
- Adds HTTP, JSON-search, and streaming regression coverage.
| File | Description |
|---|---|
packages/dsh-weknora/test/helpers/mock-weknora.mjs |
Models deployment defaults and route-specific restrictions. |
packages/dsh-weknora/test/client.test.mjs |
Tests explicit handles and restricted-key fallback. |
packages/dsh-weknora/src/client.ts |
Always sends the selected resource URL mode. |
client/resource_urls.go |
Preserves explicit Go SDK handle selections. |
client/resource_urls_test.go |
Updates helper-level expectations. |
client/resource_urls_http_test.go |
Covers all affected Go SDK routes over HTTP/SSE. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This branch has not been deployed
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.
Description
An explicit
resource_urls=handlechoice was dropped by the Go SDK and the dsh plugin. On deployments configured withRESOURCE_URL_MODE=public, the server consequently inherited the public setting. The plugin's restricted-key retry also kept inheriting that setting instead of switching to handles.Both clients now send explicit handle selections. Omitted/empty SDK options still inherit the deployment default, and the plugin still defaults to public URLs. The JSON-search and streamed-answer fallback tests exercise the actual resource-resolving routes.
Type of Change
Testing
client:go test -count=1 ./...andgo vet ./...pass.packages/dsh-weknora: lockednpm ci,npm test(60 tests), andnpm run typecheckpass. Four new client regressions fail against the original implementation; twelve client controls pass there.git diff --checkpass. Full rootmake testis blocked by uncached dependencies withGOPROXY=off; rootmake lintcannot run becausegolangci-lintis not installed locally. Full root checks are not claimed to pass.Checklist
No API changes. Prepared and checked with Codex assistance.