[medium] Custom provider Base URL accepts and persists values that are… - #38
Conversation
… values that are… AuroraForge task t-9458e56361 (explorer).
|
I am wondering if this is really an issue as invalid urls are quite easy to find, and there is no reason to assume users are super dumb I guess? |
|
I read this as you questioning whether we should keep the Base URL check at all, not asking for a code tweak. I would not treat it as “users are dumb” — the failure mode is an easy typo or a hostname pasted without http/https, Save succeeds, and the problem only shows up later as Discover/chat connection errors. The on-screen check confirmed that path. Do you want me to keep the validation, or revert it as not worth the extra gate? Pushed — the change is now 25 files, +330/-1013. It stays a draft, because:
|
|
Add a simple check is fine, but please keep your code minimal as I observed ur code spread a bit everywhere, but it is such a tiny function. |
|
Agreed — the check itself is tiny and I had wrapped it in too much ceremony. I kept the same Save reject (typed Base URL must be http/https with a host) so not-a-valid-url still does not persist, but I cut the extra helper, the long comments, and the large parametrized matrices. What remains is a short function in the existing Settings validation helper, a one-pass call on Save, a few-line store guard so a direct PUT cannot write the bad value, and a small regression for the reported case. I did not drop the store check: without it the UI message would be the only line of defence and a crafted PUT could still save the invalid URL. Pushed — the change is now 25 files, +203/-1015. It stays a draft, because:
|
|
I think a simple frontend check is good enough, no need to change other files. |
|
Done — I dropped the store guard and its tests. Save now only checks Base URL in the Settings panel (a short helper next to the existing max-iterations check, plus the error string), so not-a-valid-url still never leaves the browser. I left the gateway settings store alone; a crafted PUT could still persist a bad URL, which is the trade-off you asked for. I also put back the immediate providers-changed dispatch on Save that had been removed by accident. Pushed — the change is now 25 files, +132/-1190. It stays a draft, because:
|
|
Maintainer Agent C: HOLD_FOR_CHANGES. Rebase onto current dev after #45, resolve SettingsPanel/settingsValidation/translations/test-plan overlap while preserving the Base URL validator, drop the stale src/tool_definitions.py EOF-only noise, and rerun fresh CI. Do not merge while DIRTY. |
|
Maintainer: REQUEST_CHANGES on |
|
Maintainer C reconfirmed REQUEST_CHANGES on exact head |
|
Fresh queue review against post-#51 Please rebase and carry forward only the additive HTTP(S) custom-provider Base URL validation. The updated head must preserve current |
Warning
This PR is not ready to merge — the forge could not finish it cleanly.
It is published as a draft so the work and its evidence are visible.
Why this needs a human
Comment on this PR to steer the agent: it resumes the same session with your feedback and pushes a revision. Close the PR to reject the work.
Task
Custom provider Base URL accepts and persists values that are not http(s) URLs
t-9458e56361· areasettings· sourceexplorer·explorer:finding-1:1786977489Found by the exploratory browser agent
Steps to reproduce (from a fresh page load):
Expected: Save should reject a Base URL that is not an http:// or https:// URL and keep the invalid value from being stored.
Actual: Settings saved with no validation error. After reload, QAUrlTest still has Base URL 'not-a-valid-url'. Discover later reports that the request URL is missing an http/https protocol, and chatting with that provider fails with 'Error: Connection error.'
Evidence: Save showed the green 'Settings saved' status. After reload the QAUrlTest Base URL field still contained 'not-a-valid-url'. Discover on that provider returned: Request URL is missing an 'http://' or 'https://' protocol. Sending 'hello' with that provider selected produced 'Error: Connection error.'
Acceptance criteria
This was reported by an agent, not a human. Treat the description as a lead, not as ground truth.
How this was fixed
validateCustomProviderBaseUrlinfrontend/src/utils/settingsValidation.jsruns on Save in the Settings panel. A typed value must parse ashttp:orhttps:with a hostname; otherwise the panel returns without calling the settings API. The settings store is unchanged — this is a UI check only.Summary from the agent
Why
Add Provider treated Base URL as free text. Typing
not-a-valid-urlproduced the green “Settings saved” status, and after reload the invalid value was still there. Discover then failed with a missing http/https protocol, and chat failed with a connection error.Tests
tests/test_settings_validation.pychecks that Save calls the helper before PUT and that the error string is translated.Risks and uncertainties
A request that writes settings directly, bypassing the Settings panel, can still persist a non-http(s) Base URL. An empty Base URL is still accepted, so a named custom provider with no URL can be saved. Built-in provider Base URL fields stay disabled and were not given this check.
What was checked
These all ran automatically before this pull request was opened. Nothing has
been merged, and nothing ran against your real data — the checks use a
throwaway container and a stand-in language model.
pytestsuite in a clean virtual environment and measures how much of the code the tests touch.What the browser did
The image built from this branch was started with a stand-in language model, and a real browser drove the app through each of these:
Screenshots taken along the way
/state/artifacts/t-9458e56361/browser-1/screenshots/01-app-loaded.png/state/artifacts/t-9458e56361/browser-1/screenshots/02-reply-streamed.png/state/artifacts/t-9458e56361/browser-1/screenshots/03-tool-activity.png/state/artifacts/t-9458e56361/browser-1/screenshots/04-after-reload.png/state/artifacts/t-9458e56361/browser-1/screenshots/05-settings.png/state/artifacts/t-9458e56361/browser-1/screenshots/06-new-conversation.png/state/artifacts/t-9458e56361/browser-1/screenshots/07-narrow-viewport.pngWatch it
The same steps, before the change and after it. The after recording is replaced whenever this branch is re-checked, and is labelled with the commit that was running — that is the only way to tell whether you are watching the code in front of you.
not-a-valid-url.Filmed on
bf9fdc7Full recording — 2.7 MB.
Filmed on
658c1a0Full recording — 3.8 MB.
Kept while this pull request is open, and for 30 days after it closes.
Change size
25 files, +132/-1190
Files changed (25)
AGENT_README.mddoc/QA_TEST_PLAN.mdfrontend/src/App.jsxfrontend/src/components/ChatInput.jsxfrontend/src/components/FileTree.jsxfrontend/src/components/SettingsPanel.jsxfrontend/src/hooks/createStreamCallbacks.jsfrontend/src/i18n/translations.jsfrontend/src/services/api.jsfrontend/src/styles/messages.cssfrontend/src/utils/composerGuard.jsfrontend/src/utils/fileTree.jsfrontend/src/utils/settingsValidation.jsfrontend/src/utils/sidebarProvider.jsgateway/routes.pygateway/workspace.pytests/test_double_click_send.pytests/test_error_turn_persist.pytests/test_execute_tool_call.pytests/test_file_tree_depth.pytests/test_message_long_token_wrap.pytests/test_settings_validation.pytests/test_sidebar_default_model.pytests/test_try_again_same_conversation.pytests/test_user_message_newlines.pyReview checklist
xfailed to make the gate passRun details
cursor-grok-4.6-high-fast/state/artifacts/t-9458e56361/edit-1/transcript.ndjsonReply with review comments and the forge will resume this agent's session
with them. Close the PR to reject; the branch is cleaned up on the next sweep.