You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Lift legacy UserToolSource representations on read
Stored DynamicTool.value rows on long-lived servers predate the YAML
narrowing in ec5cfe6 and carry internal-model fields the strict
schema rejects, causing 500 ResponseValidationError on
GET /api/unprivileged_tools (Sentry GALAXY-TEST-588ZYT7JSX3V0).
Adds lift_user_tool_source(value) which validates against the strict
UserToolSource and returns one of three statuses:
- "ok": clean row, parsed model.
- "lifted": extra_forbidden-only drift; offending paths are stripped
and the model is re-validated. Dropped paths are reported.
- "invalid": any other schema violation; raw dict is returned with a
compact error summary so the endpoint stays up under future
tightening (e.g. stricter container constraints).
UnprivilegedToolResponse.representation becomes
Union[UserToolSource, dict] with new representation_status and
representation_errors fields. Status is also surfaced via Warning,
X-Galaxy-Deprecated-Fields, and X-Galaxy-Schema-Errors response
headers (computed per request, not part of the OpenAPI schema).
The same lift is applied in /api/tools/{id}/raw_tool_source.
Frontend: UserToolPanel reads representation defensively and shows
"needs update" / "schema error" badges.
0 commit comments