Skip to content

Build with Nirium: reproducible notebook run records (Audit Trail, testnet) - #471

Open
Nuruddeen61 wants to merge 21 commits into
nirium-protocol:mainfrom
Nuruddeen61:git-checkout--b-feat/reproducible-notebook-382
Open

Nuruddeen61 wants to merge 21 commits into
nirium-protocol:mainfrom
Nuruddeen61:git-checkout--b-feat/reproducible-notebook-382

Conversation

@Nuruddeen61

Copy link
Copy Markdown

What changed and why

Closes #382

Adds examples/build-reproducible-notebook/: a workflow that hashes a run's input files, code and output files into one run record, signs nirium-audit-v1:<sha256> with my own stellar:testnet key, and anchors the hash through the published Python SDK (Agent.anchor_audit_record) against the testnet node. check_run.py recomputes the record from the files and runs npx nirium-cli verify. No Nirium package is changed. Large files are hashed locally and never uploaded; only the record hash is public.

Package(s) touched

  • nirium (TypeScript SDK)
  • nirium (Python SDK)
  • nirium-cli
  • nirium-mcp
  • An example
  • Documentation only

How this was tested

Network: testnet (https://nirium-agent.fly.dev), tag wave11-reproducible-notebook, signed with my own key GC3ADSZYQZWOQASTNZQ4PWA7GR6FAETSQBS4Q4EGZZXNZQYST3JXH5XT.

Receipt CIDs (two runs, different inputs):

  • Run 1: QmdvnYaQEtqrQQ19hZ7hphbU6GAKknnvS9aMGezq5iMNVK
  • Run 2: QmYgs3Ae89A7jFf9mkZYfk97UEg7gTBPB2E2TcDd5EyaYQ

From a fresh clone of this branch:

python check_run.py receipts/c5f1ee188d91.json  -> OK: record matches files and passes nirium verify
python check_run.py receipts/d8428bfa58dd.json  -> OK: record matches files and passes nirium verify

Tampered cases (appending a line to an input / a result file) both fail with FAIL: files changed ...; full output is in the README.

Offline tests (HTTP mocked): python tests/test_all.py -> 6 tests, OK.

Demo video: adding shortly.

Checklist

  • Ran the package's own tests and lint
  • No secret keys, in code or in commit history
  • AI-assisted commits carry a Co-Authored-By: trailer naming the model (see CONTRIBUTING.md)

AI assistance disclosure: the code and README were drafted with Claude (Sonnet 5.5) and I ran, verified and committed them myself. My commits were made through the GitHub web editor and do not carry a Co-Authored-By trailer yet. Maintainers: tell me if you want me to add it, or add it when merging.

Implement functions to sign and anchor a run-record hash through the Nirium Audit Trail. Includes receipt saving functionality.
Implement analysis function to compute statistics from input file and save results.
Added README.md for building reproducible run records with Nirium, including usage instructions and receipts table.
Add unit tests for record building and verification
Add a newline at the end of the output JSON file.
Updated usage instructions and added verification details in README.
@drips-wave

drips-wave Bot commented Nov 23, 2026

Copy link
Copy Markdown

@Nuruddeen61 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

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.

Build with Nirium: a reproducible notebook, proving results came from these exact inputs (Audit Trail, testnet)

1 participant