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
- 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')
- 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.
Impact
Users of the
agentless_hello_worldHTTPJSON input get incorrecthttp.response.status_codevalues. Failures from the upstream endpoint (4xx/5xx) are masked as200, which hides outages/auth errors and breaks observability for this sample integration.Reproduction Steps
Expected vs Actual
Expected:
http.response.status_codeshould reflect the real upstream HTTP response code.Actual: the HTTPJSON stream forcibly sets
http.response.status_codeto200.Failing Test
Evidence
packages/agentless_hello_world/data_stream/generic/agent/stream/httpjson.yml.hbs#L7-L10target: body.http.response.status_codevalue: 200packages/agentless_hello_world/data_stream/generic/agent/stream/cel.yml.hbs#L17-L20"status_code": resp.StatusCodestatus_codeas HTTP response status code:packages/agentless_hello_world/docs/README.md#L30-L32What is this? | From workflow: Bug Hunter
Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.