Repository navigation
[Submission] Temporal order repair with per-order Tenuo warrants #149
Description
Project link
https://github.com/tenuo-ai/tenuo-demos/tree/main/temporal-order-repair
Language
Python
Short description (max 256 chars)
Josh Smith's multi-agent order-repair demo with per-order Tenuo warrants: every repair tool call is checked on the worker before it runs, so a poisoned order note can't redirect a repair, and big restocks wait for signed approvals.
Long Description
This takes Josh Smith's temporal-multi-agent-order-repair, where LLM agents detect, plan and repair broken orders, and adds per-order authorization to the repair tools.
The problem it shows: the planner reads customer notes, and customer notes are untrusted. The demo includes a script that poisons two of them. In a live run with gpt-4o, the planner did what the notes said: it planned to send an order's approval request to the customer who wrote the note, and to restock 5,000 badge sets.
What changes with Tenuo:
- Each repair tool runs as its own Activity on a separate worker. That worker runs Tenuo's Temporal plugin with
require_warrant=Trueand holds only public keys. - After the plan is approved, an issuer Activity signs a one-hour warrant per order, filled in from the order record, never from the plan. Payment requests can only go to that order's customer, approval requests only to the shop's approvals desk, and restocks are capped.
- Calls outside the warrant fail as non-retryable Activity failures that name the broken constraint, so you see them in the Web UI.
- Restocks over 100 units wait for approvals. Every approver named in the warrant has to sign that exact call. The signatures reach the Workflow as a
ToolCallDecisionSignal, and the tools worker verifies them before the Activity runs. - Every checked call gets a signed receipt you can verify offline with
tenuo receipt chain. - The Workflow change is small (
execute_repairand one Signal). Without Tenuo's key files the demo runs exactly as Josh wrote it.
| Planned repair | Temporal only | Temporal + Tenuo |
|---|---|---|
| Ask Harry to update his payment | Sent | Sent |
| Ask Ron to update his payment | Sent | Sent |
Send Hagrid's approval request to hagrid@hogwarts.edu |
Sent to Hagrid | Refused by the warrant |
| Order 5,000 badge sets for Hermione | Ordered | Held until both approvers sign |
The tests run all three workers in-process against a local dev server, including a replay check that the Tenuo path stays deterministic. Runs on Python 3.12 with poetry install and temporal server start-dev. MIT for the demo; Tenuo is Apache-2.0.
Author(s)
DJ, Tenuo (https://github.com/tenuo-ai), building on Josh Smith's temporal-multi-agent-order-repair
Activity
github-actions commentedon Oct 15, 2026
ZiggyBot — automated pre-evaluation
poetry installandtemporal server start-devand a per-demo README, neither of which is included in the fetched data.Overall: Needs review⚠️
Notes:
temporal-order-repair/subdirectory. Confirm a per-demo README with the statedpoetry install/temporal server start-devinstructions exists.RepairAgentWorkflow) is forked from Josh Smith'stemporal-multi-agent-order-repair. The submission states the Temporal-side change is limited toexecute_repairand one Signal handler; the attribution and MIT licensing of the upstream should be verified for compatibility.TenuoActivityInboundInterceptor) that verifies warrants before the Activity body runs. The fetched source fortemporal-order-repair/workflows.pyis truncated and does not show the Signal handler orexecute_repairlogic, so the described Signal-driven approval flow could not be directly confirmed.Suggested questions for submitter:
temporal-order-repair/subdirectory contain its own README with thepoetry installandtemporal server start-devsteps, and can you link it directly?temporal-multi-agent-order-repairlicense and that redistribution under MIT is compatible?Notable Temporal pattern:
Automated AI pre-screen by ZiggyBot. Final decisions are made by the community team.
Reviewer: Check the box below to generate a Contentful-ready long description for this submission.
d8joseph commentedon Oct 15, 2026
Thanks for the review. Answers to the questions:
test_replay_takes_the_recorded_path_whatever_the_worker_configin tests/test_tenuo_workflow.py. It's part of the same suite, which runs the Workflow with all three workers in one process against a local dev server.Two pointers the pre-screen couldn't see in the truncated source:
ToolCallDecision. The Workflow records the decision; the signatures are checked on the repair-tools worker before the Activity runs.issue_order_warrant. The "notable pattern" link points at a different demo in the repo (temporal-incident-response); this submission istemporal-order-repair/.