feat: add execution receipts — auditable records of delegated task execution#9209
feat: add execution receipts — auditable records of delegated task execution#9209MestreY0d4-Uninter wants to merge 1 commit into
Conversation
b63e45f to
7605bd1
Compare
Refresh — April 14 2026Branch rebased onto current Test results
CI notes
Commit logMergeabilityNo conflicts with current |
Stacking notePR #8403 (durable work orders) builds on top of this PR. Recommended merge order:
|
|
Refresh rebuilt from origin/main and pushed to refresh/9209. Validation: py_compile on changed .py files passed; focused pytest on changed test files ran and hit one existing failure in tests/run_agent/test_run_agent.py::TestStreamingApiCall::test_tool_call_accumulation (expected web_search, got search). |
|
Additional validation note: The one extra focused failure I hit while checking this refreshed branch is also present on a clean
|
|
✅ Audit completed (2026-04-19)
Baseline Noise Note: Test failures reproduce on clean Recommendation: DECISION NEEDED — Feature adds execution receipt ledger for delegation auditing. Question for maintainers: Is this execution receipt feature still desired?
Feature value: Provides durable, auditable records of all delegated task executions. Part of batch audit: 23 PRs audited, 2 closed (absorbed), 21 refreshed |
|
🔔 Ready for maintainer review Esta PR foi validada como parte da auditoria completa de 2026-04-19. Status:
Ação necessária: Review e merge (ou decisão de feature para #9209, #8942). Audit batch 3: 4 PRs com validação mínima concluída |
7237000 to
bf2634f
Compare
|
Closing in favor of focused split PRs:
Each addresses a single logical change for easier review. |
Summary
Adds a durable execution receipt system that makes delegated task execution inspectable, auditable, and manageable from both the agent and CLI.
Receipt Ledger (
tools/execution_receipts.py)ExecutionReceiptdataclass: task_id, status, duration, execution_path, worker_mode, runtime info, tool calls, files modifiedHERMES_HOME/execution-receipts/Tool Surface (
tools/execution_receipts_tool.py)execution_receiptsin theexecutiontoolsetlist,query,get,prune,reconcile,maintenance_statusCLI Surface (
hermes_cli/receipts.py)/receipts list [--task-id ID] [--limit N]— recent receipts table/receipts get <id>— full receipt JSON/receipts query [--status STATUS] [--since HOURS]— filtered query/receipts prune [--older-than HOURS]— clean old receipts/receipts reconcile— fix JSON/DB inconsistencies/receipts status— system health checkIntegration
_HERMES_CORE_TOOLSintoolsets.pyCommandDefinhermes_cli/commands.pycli.pyTest Plan
TestExecutionReceipt— dataclass, serialization, file persistenceTestReceiptLedger— CRUD, query filters, prune, reconcile, orphan recovery, maintenanceTestReceiptsToolSurface— all 7 tool actionsWhy reimplementation
The original PR #8402 was far behind main (pre-v0.9.0) and could not be cleanly refreshed. This is a clean reimplementation from scratch on current main, preserving the architectural ideas (receipt ledger, SQLite indexing, operator surfaces) while adapting to the current codebase.
Supersedes #8402.