anishshiva7 opened a new issue, #9666:
URL: https://github.com/apache/texera/issues/9666
### What happened?
The agent service's settings API accepts zero and negative values for its
timeouts and result limits. The UI's inputs have lower bounds (timeouts ≥ 1,
cell limit ≥ 100), but `POST /api/agents` and `PATCH /api/agents/:id/settings`
validate only `maxSteps` (`t.Integer({ minimum: 1 })`). The other numeric
fields are a bare `t.Number()`.
| Field | Sent | What happens |
| --- | --- | --- |
| `executionTimeoutMinutes` | `0` on PATCH | stored as `executionTimeoutMs =
0`, which `executeWorkflow` treats as unset, so the run silently uses the 240 s
default |
| `executionTimeoutMinutes` | `-1` on PATCH | `timeoutSeconds: -60` is sent
to `SyncExecutionResource`, which times out immediately |
| `toolTimeoutSeconds` | `0` / negative | stored and echoed back |
| `maxOperatorResultCharLimit` / `...CellCharLimit` | `0`, negative, `10.5`
| stored and forwarded to the execution request, whose fields are `Int` |
| any of the above | `0` on POST | ignored, because create checks truthiness
while PATCH checks `!== undefined`, so the same value behaves differently by
route |
```
Before: PATCH {executionTimeoutMinutes: -1} -> 200, run times out at once
After: PATCH {executionTimeoutMinutes: -1} -> 4xx, setting unchanged
```
### How to reproduce?
1. Create an agent: `POST /api/agents {"modelType": "..."}`.
2. `PATCH /api/agents/<id>/settings {"maxOperatorResultCharLimit": -100}`
returns 200.
3. `GET /api/agents/<id>/settings` now reports `maxOperatorResultCharLimit:
-100`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]