Repository navigation
fix: omit null issue_url from prescreen callback body - #60
Merged
Merged
Conversation
When ISSUE_URL is empty (advisory mode since #756), the jq expression was sending issue_url: null. The server's validatePrescreenCallbackBody rejects any issue_url that is not a string — null fails typeof check — returning HTTP 400 'issue_url must be a string'. This broke ALL prescreen callbacks. Fix: conditionally merge the issue_url field only when it is non-empty, so the field is absent (undefined) rather than null when not set. The server type already declares issue_url as optional (issue_url?: string).
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.
Problem
Since the advisory-mode change in #756,
ISSUE_URLis hardcoded to""and the jq expression sends:{ ..., "issue_url": null, ... }The server's
validatePrescreenCallbackBodychecks:null !== undefinedis true, andtypeof nullis"object"(not"string"), so every prescreen callback returns HTTP 400 — the verdict is never delivered to the Worker, and the prescreen run is marked as failed.This has been blocking all prescreen results since #756.
Fix
When
ISSUE_URL="", omit the field entirely (undefined) instead of sendingnull. The server'sissue_url?: stringtype declaration already expresses that the field is optional.Testing
Manually re-run
Run Pre-screenvia workflow_dispatch on any dataset after merging — the callback should return HTTP 200 instead of 400.Note: a matching server-side fix (also accepting
null) has been proposed at nemarOrg/nemar-cli for belt-and-suspenders robustness.