Update README.md
Browse files
README.md
CHANGED
|
@@ -1,14 +1,78 @@
|
|
| 1 |
---
|
| 2 |
title: TimelineDiff Differential Reproducibility
|
| 3 |
emoji: 🐠
|
| 4 |
-
colorFrom:
|
| 5 |
-
colorTo:
|
| 6 |
sdk: gradio
|
| 7 |
sdk_version: 6.2.0
|
| 8 |
app_file: app.py
|
| 9 |
pinned: false
|
| 10 |
license: other
|
| 11 |
short_description: Diff agent timelines. Find first divergence. Export forensic
|
|
|
|
|
|
|
| 12 |
---
|
|
|
|
| 13 |
|
| 14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
title: TimelineDiff Differential Reproducibility
|
| 3 |
emoji: 🐠
|
| 4 |
+
colorFrom: indigo
|
| 5 |
+
colorTo: pink
|
| 6 |
sdk: gradio
|
| 7 |
sdk_version: 6.2.0
|
| 8 |
app_file: app.py
|
| 9 |
pinned: false
|
| 10 |
license: other
|
| 11 |
short_description: Diff agent timelines. Find first divergence. Export forensic
|
| 12 |
+
thumbnail: >-
|
| 13 |
+
https://cdn-uploads.huggingface.co/production/uploads/685edcb04796127b024b4805/cc2glLOtiZJWxbbDoELfT.jpeg
|
| 14 |
---
|
| 15 |
+
# TimelineDiff — Differential Reproducibility Protocol (DRP)
|
| 16 |
|
| 17 |
+
Production agents fail in non-deterministic ways: sampling variance, flaky tools, drifting data, timing/race effects.
|
| 18 |
+
Benchmarks tell you *whether* you failed. Logs tell you *what happened once*. TimelineDiff tells you **why two runs diverged**.
|
| 19 |
+
|
| 20 |
+
## What this Space does
|
| 21 |
+
- Upload **two DRP trace bundles (.zip)**
|
| 22 |
+
- Computes:
|
| 23 |
+
- **First divergence point**
|
| 24 |
+
- Divergence class (sampling / tool / memory / control-flow / state)
|
| 25 |
+
- Per-event structured JSON diffs
|
| 26 |
+
- Exports:
|
| 27 |
+
- `report.md`, `diff.json`, `drp-diff-report.zip`
|
| 28 |
+
- Can also:
|
| 29 |
+
- Verify hash-chained integrity of a bundle
|
| 30 |
+
- Generate demo bundles to test the UI
|
| 31 |
+
- Create a patched “fork” bundle (counterfactual edit) for sandbox what-if workflows
|
| 32 |
+
|
| 33 |
+
## DRP bundle format (v0)
|
| 34 |
+
A bundle is a `.zip` containing:
|
| 35 |
+
- `manifest.json`
|
| 36 |
+
- `events.jsonl`
|
| 37 |
+
|
| 38 |
+
Each event is hash-chained:
|
| 39 |
+
- `prev` is the previous event hash
|
| 40 |
+
- `hash` is SHA-256 of canonical event JSON
|
| 41 |
+
This gives a tamper-evident timeline, and makes diffs trustworthy.
|
| 42 |
+
|
| 43 |
+
## Integrations (where this plugs in)
|
| 44 |
+
- Agent frameworks can export DRP events at decision points (LLM call, tool call, memory write, planner step).
|
| 45 |
+
- Observability can be ingested and mapped to DRP (spans → events).
|
| 46 |
+
- Verification primitives (signing / zk / attestations) can be layered later.
|
| 47 |
+
|
| 48 |
+
## Quick start (local)
|
| 49 |
+
```bash
|
| 50 |
+
pip install -r requirements.txt
|
| 51 |
+
python app.py
|
| 52 |
+
Suggested event kinds
|
| 53 |
+
• llm_sample
|
| 54 |
+
• tool_call
|
| 55 |
+
• tool_result
|
| 56 |
+
• memory_write
|
| 57 |
+
• plan_step
|
| 58 |
+
• guardrail
|
| 59 |
+
• state_snapshot
|
| 60 |
+
---
|
| 61 |
+
|
| 62 |
+
# `drp/__init__.py`
|
| 63 |
+
|
| 64 |
+
```python
|
| 65 |
+
__all__ = [
|
| 66 |
+
"canon",
|
| 67 |
+
"sha256_hex",
|
| 68 |
+
"now_utc_iso",
|
| 69 |
+
"load_bundle",
|
| 70 |
+
"verify_bundle",
|
| 71 |
+
"write_bundle_zip",
|
| 72 |
+
"diff_bundles",
|
| 73 |
+
"render_report_markdown",
|
| 74 |
+
"make_demo_bundle_zip",
|
| 75 |
+
"fork_patch_bundle",
|
| 76 |
+
]
|
| 77 |
+
|
| 78 |
+
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|