deepset-ai / deepset-ai/haystack

RFC: Signed receipts for Haystack pipeline component calls

Open
#11,039 16 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

P2
Dominant language
Python
Stars
26.6k
Forks
3.2k
Avg merge
1d 3h
Merged PRs (30d)
194

Description

Problem

Haystack pipelines chain multiple components (retrievers, generators, rankers) in production NLP workflows, but there is no cryptographic audit trail of component-level decisions. For enterprise RAG deployments, compliance teams need to prove: which retriever was used, what documents were ranked, what the generator produced, and that none of this was altered after the fact.

Proposal

Add an optional ReceiptSigningComponent (or pipeline middleware) that wraps Haystack components and emits Ed25519-signed receipts for each invocation:

from haystack import Pipeline
from protect_mcp import ReceiptMiddleware

pipe = Pipeline()
pipe.add_component("retriever", InMemoryBM25Retriever(...))
pipe.add_component("generator", OpenAIGenerator(...))
pipe.add_middleware(ReceiptMiddleware(policy="enterprise.json"))

Each receipt captures:

  • Component name and type
  • Input/output SHA-256 digests
  • Policy evaluation result (allow/deny)
  • Ed25519 signature
  • OpenTelemetry trace/span IDs for correlation

Why Haystack

Haystack already has excellent pipeline telemetry and component tracing. Receipt signing is a natural extension — it turns existing observability data into verifiable evidence that can be independently validated offline.

References

Happy to discuss architecture and submit a PR.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing Haystack's Pipeline entry points and existing component telemetry and tracing, then compare the proposed ReceiptMiddleware with the cited Python signing primitives and receipt fields. Define the architecture and integration boundaries before implementation. Done means an agreed optional pipeline integration can emit independently verifiable receipts covering the listed invocation data and trace identifiers.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
ai, observability, security
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.