Skip to content

[bug-hunter] agentless_hello_world HTTPJSON stream always reports status_code as 200 #18937

@github-actions

Description

@github-actions

Impact

Users of the agentless_hello_world HTTPJSON input get incorrect http.response.status_code values. Failures from the upstream endpoint (4xx/5xx) are masked as 200, which hides outages/auth errors and breaks observability for this sample integration.

Reproduction Steps

  1. Run this script from the repository root:
from pathlib import Path
import yaml,sys

cfg_path = Path('packages/agentless_hello_world/data_stream/generic/agent/stream/httpjson.yml.hbs')
config = yaml.safe_load(cfg_path.read_text())
transforms = config['response.transforms']

# Simulate an event produced from an upstream HTTP 503 response.
event = {'body': {'http': {'response': {'status_code': 503}}}}

def set_path(obj, path, value):
    parts = path.split('.')
    cur = obj
    for p in parts[:-1]:
        cur = cur.setdefault(p, {})
    cur[parts[-1]] = value

for t in transforms:
    if 'set' in t:
        s = t['set']
        set_path(event, s['target'], s['value'])

expected = 503
actual = event['body']['http']['response']['status_code']
print(f'Expected status_code to remain upstream value {expected}; actual {actual}')
if actual != expected:
    print('FAIL: transform overwrites real HTTP status with constant 200')
    sys.exit(1)
print('PASS')
  1. Observe output:
Expected status_code to remain upstream value 503; actual 200
FAIL: transform overwrites real HTTP status with constant 200

Expected vs Actual

Expected: http.response.status_code should reflect the real upstream HTTP response code.

Actual: the HTTPJSON stream forcibly sets http.response.status_code to 200.

Failing Test

from pathlib import Path
import yaml,sys

cfg_path = Path('packages/agentless_hello_world/data_stream/generic/agent/stream/httpjson.yml.hbs')
config = yaml.safe_load(cfg_path.read_text())
transforms = config['response.transforms']

event = {'body': {'http': {'response': {'status_code': 503}}}}

def set_path(obj, path, value):
    parts = path.split('.')
    cur = obj
    for p in parts[:-1]:
        cur = cur.setdefault(p, {})
    cur[parts[-1]] = value

for t in transforms:
    if 'set' in t:
        s = t['set']
        set_path(event, s['target'], s['value'])

assert event['body']['http']['response']['status_code'] == 503

Evidence

  • Hardcoded value in HTTPJSON stream template:
    • packages/agentless_hello_world/data_stream/generic/agent/stream/httpjson.yml.hbs#L7-L10
    • target: body.http.response.status_code
    • value: 200
  • CEL stream in same package uses actual runtime response code:
    • packages/agentless_hello_world/data_stream/generic/agent/stream/cel.yml.hbs#L17-L20
    • "status_code": resp.StatusCode
  • Package docs describe status_code as HTTP response status code:
    • packages/agentless_hello_world/docs/README.md#L30-L32

What is this? | From workflow: Bug Hunter

Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.

  • expires on May 18, 2026, 12:15 PM UTC

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions