| … | … | @@ -1354,10 +1354,13 @@ const make = Effect.gen(function* () { | |
| 1359 | + | const requestedOptions = | |
| 1360 | + | input.target?.options === undefined | |
| 1361 | + | ? undefined | |
| 1362 | + | : (withLegacyUltracodeEffort(descriptors ?? [], input.target.options) ?? []); | |
🟠 High mcp/OrchestratorMcpService.ts:1362
A request with effort: "ultracode" and ultracode: "false" is accepted and runs with Ultracode enabled, instead of rejecting the malformed toggle. withLegacyUltracodeEffort normalizes the explicit non-boolean value to true before invalidOptionSelections checks it; validate the explicitly supplied toggle before applying this legacy migration.
🤖 Copy this AI Prompt to have your agent fix this:
| 1 | In file @apps/server/src/mcp/OrchestratorMcpService.ts around line 1362: |
| 2 | |
| 3 | A request with `effort: "ultracode"` and `ultracode: "false"` is accepted and runs with Ultracode enabled, instead of rejecting the malformed toggle. `withLegacyUltracodeEffort` normalizes the explicit non-boolean value to `true` before `invalidOptionSelections` checks it; validate the explicitly supplied toggle before applying this legacy migration. |
Valid. Fixed in 7ac00b9369: the legacy migration now keeps an explicit ultracode value as given, so "false" reaches invalidOptionSelections and is rejected. Regression assertion in packages/shared/src/model.test.ts.
Sorry, I'm unable to act on this request because you do not have permissions within this repository.