Repository navigation
Conversation
An optional File/ListOfFiles input slot that the caller omits resolves to null in the file id collection loop; the null is collected as a file id and passed to getFirstNodeById, which only accepts int, so prepareTask crashes with a TypeError and the schedule request fails with HTTP 500. Skip the slot when it resolves to null so the task schedules normally. Signed-off-by: WSHAPER <42714629+WSHAPER@users.noreply.github.com> Assisted-by: opencode (zai/glm-5.3)
WSHAPER
requested review from
Altahrim,
icewind1991,
leftybournes and
salmart-dev
and removed request for
a team
October 22, 2026 09:06
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.
Summary
Any app declaring an optional File or ListOfFiles input breaks scheduling for every caller that omits the slot: the Assistant form omits unfilled optional fields, so this is the common path. The server resolves the missing key to null and feeds it to file resolution as an id.
prepareTaskthen crashes with a TypeError and the schedule request fails with HTTP 500.Changes
prepareTasknow skips an optional file input slot that resolves to null instead of collecting it as a file id, so a task whose optional File/ListOfFiles slot is omitted schedules normally. Slots that are provided are validated as before.Steps to reproduce (before this change)
getFirstNodeByIdas a file id, which only accepts int.With this change the same request returns a scheduled task.
Tests
TaskProcessingTest::testScheduleTaskWithOmittedOptionalFileInputschedules a task type with an optional File input slot, omits the slot, and expects the task to reach STATUS_SCHEDULED.References #60218
Cross-references
Assisted by opencode with zai/glm-5.3, reviewed by WSHAPER