Secrets, Sandboxes, and Safe Execution › Filesystem and Execution Boundaries
Language AI HandbookAll chapters Define which exact input revision appears in the task view, where writes can land temporarily, and which stored artifact can survive the task. A fresh bounded execution environment can help separate tasks. Use explicit ownership and cleanup rules for temporary state and verify them under cancellation and ordinary completion.
A containment check must observe what the configured environment enforces. For a read-only workload, check that a known eligible synthetic input is readable and that a synthetic item from another task is absent. A test of write denial alone does not establish that the view was narrow enough. Use an independent verifier that can read the expected deployment evidence rather than trusting a text report from the process being evaluated. When reusing the test in a different deployment, record which setup changed and test those differences explicitly.
Do the same exercise for scratch state. Decide whether scratch survives retry, whether it is attached to the task or worker, and which component removes it. Test both ordinary completion and cancellation with harmless data. If recovery needs task state from another process, keep only the intended state in a designated store rather than sharing whatever happened to remain in a workspace. A rejected run can still use some resources before its result is available. Budget and cleanup checks apply to that path as well as to the success case.
A declaration is useful when the operations team has a way to check effective policy. Record the revision the worker was admitted under, the revision running at the resource proxy, and any other policy or deployment attributes needed for the job's trust requirements. When two versions differ, distinguish an intended phased rollout from invalid configuration. A deployment script can derive multiple declarations from one policy, but it cannot by itself prove that every deployed consumer loaded that declaration correctly. Run an integration test that records the enforced outcome under the exact workload identity.
Cancellation is a boundary too. The control plane can stop new admissions and, if the runtime provides an appropriate mechanism, request termination of in-progress work. A request that already reached another service may have its own lifecycle and acknowledgement semantics. A task cancellation is not evidence that an earlier effect was reversed. For consequential operations, capture a stable external operation identity and define a reconciliation path. The example simply records which proposals were admitted. It does not simulate concurrent tasks, process cancellation, or external acknowledgements.
Comments
Add to the conversation
A question, a correction, or an example from your own work.
No comments yet. Be the first to share your thoughts!