Skip to content

fix: omit null issue_url from prescreen callback body - #60

Merged
bruAristimunha merged 1 commit into
mainfrom
fix/prescreen-callback-omit-null-issue-url
Jun 21, 2026
Merged

bruAristimunha merged 1 commit into
mainfrom
fix/prescreen-callback-omit-null-issue-url

Conversation

@bruAristimunha

Copy link
Copy Markdown
Collaborator

Problem

Since the advisory-mode change in #756, ISSUE_URL is hardcoded to "" and the jq expression sends:

{ ..., "issue_url": null, ... }

The server's validatePrescreenCallbackBody checks:

if (b.issue_url !== undefined && typeof b.issue_url !== "string") {
  return "issue_url must be a string";
}

null !== undefined is true, and typeof null is "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 sending null. The server's issue_url?: string type declaration already expresses that the field is optional.

# Before
'{..., issue_url:(if $iu=="" then null else $iu end), ...}'

# After  
'{...} + (if $iu=="" then {} else {issue_url:$iu} end)'

Testing

Manually re-run Run Pre-screen via 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.

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).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant