AI API receipt · PrefectHQ/prefect

JSON flow result with a "data" or "result" key reads back wrong from the API

PrefectHQ/prefect#23372 · upstream bug reproduced by running the issue's own reproduction

Badgr cannot tell this response is wrong

A flow that returned {"result": 5, "status": "ok"} read back through the API as 5; {"data": "hello"} raised a base64 decode error (reproduced on Prefect 3.8.8).

"5" is a non-empty, well-formed answer; Badgr cannot know it is not the stored result. If the caller supplies the expected stored result, Badgr rejects it: response text does not match the expected text. The receipt therefore records success. This is a limit of what the contract can prove, shown here so it is not mistaken for protection.

What the upstream returned (replayed)

The output the bug produces, taken from the issue’s reproduction and fed to Badgr’s validators. Not a live provider call.

text: "5"
tool_calls: none

Badgr receipt

Written by Badgr’s receipt ledger and read back from GET /v1/receipts/replay-prefect-23372-result-key-reads-back-wrong.

{
  "request_id": "replay-prefect-23372-result-key-reads-back-wrong",
  "status": "success",
  "endpoint": "/api/flow_runs/result",
  "stream": false,
  "failure_stage": null,
  "error_code": null,
  "error_message": null,
  "retryable": null,
  "provider_mode": "replay",
  "routing_decision": "replayed_upstream_output",
  "created_at": "1791679612.989413"
}

Recorded 2026-10-11 in Badgr’s local development environment. Replay cases and verdicts are pinned by backend/test_ai_api_replay_cases.py.

← All AI API receipts