WRITE · TRACE · UNDERSTAND
Project: validate, authorize and replay a dependency-aware tool plan
Implement the closed local tools read(key) and set(key,JSON scalar value) on state.records[tenant].
Read lesson: Project: validate, authorize and replay a dependency-aware tool plan →
Your experiment
Implement the closed local tools read(key) and set(key,JSON scalar value) on state.records[tenant]. Each plan operation has exactly id,tool,args,deps; IDs and dependencies are unique, all dependencies exist, no cycles. Prevalidate all schemas and current scopes (records:read/write), byte-limit canonical operation payloads to 4096, and require set approval membership. Approval identity is SHA256(canonical JSON {'tenant':tenant,**op}, sorted keys, compact separators, allow_nan=False); approved is a trusted controller-provided allowlist, not a secret or authority created by hashing. Topologically choose the lexicographically smallest ready ID. Verify tenant-scoped receipt fingerprints before reuse. Budget counts new operations only; reject before effects. Execute on a deep copy, return state,order,outputs,executed; exceptions preserve original state. Receipts store fingerprint,result by tenant and operation ID.
Python runs in your browser. Your draft stays on this device.
What to look for
Review trusted approval provenance, current permissions, dependency validation, replay conflicts and transactional publication. Remote tools need their own durable idempotency and uncertain-outcome recovery. Replay follows the main orchestration function; helper computations execute and are checked separately.
Watch your code work
Ready to experimentWrite a solution or load the worked answer, then choose Trace & check.
Step through arrays, variables and training curves produced by your own Python.
