This is an automated email from the ASF dual-hosted git repository.

kaxil pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new 6b68dacdab3 Correct sbx swap guidance in Common AI sandbox docs 
(#76879)
6b68dacdab3 is described below

commit 6b68dacdab3adbde4ea51d905bba3a603c099481
Author: Jed Cunningham <[email protected]>
AuthorDate: Tue Nov 10 18:08:16 2026 -0700

    Correct sbx swap guidance in Common AI sandbox docs (#76879)
    
    The revenue anomaly page told readers that swapping Modal for sbx was a
    drop-in change with a ready-made variant. The swap actually needs other
    constructor arguments, an image with pandas and a declared host network
    policy, and the only local example is in the Quick start. After the
    backends page split, the tip's link also no longer led to anything about
    sbx.
    
    The backend comparison promised that the spec carries over unchanged and
    counted four differences while listing five, and it left out that sbx
    refuses the default spec unless the host policy is declared deny-all,
    which is the first failure a reader hits after following that promise.
---
 providers/common/ai/docs/sandbox/backends/index.rst           | 11 +++++++----
 .../common/ai/docs/use_cases/explain_revenue_anomaly.rst      |  8 ++++++--
 2 files changed, 13 insertions(+), 6 deletions(-)

diff --git a/providers/common/ai/docs/sandbox/backends/index.rst 
b/providers/common/ai/docs/sandbox/backends/index.rst
index c6314ab0a84..a826062bcb9 100644
--- a/providers/common/ai/docs/sandbox/backends/index.rst
+++ b/providers/common/ai/docs/sandbox/backends/index.rst
@@ -39,16 +39,19 @@ Sandbox backends
 What differs between the backends
 ---------------------------------
 
-Swapping the backend is one constructor argument, and tool names, spec and 
prompt
-do not change. Four behaviours do, so read them before assuming the same Dag
-behaves identically everywhere:
+Swapping the backend means swapping the backend's constructor, whose arguments 
differ
+per backend; tool names and prompt do not change. The same spec can be refused 
by a
+backend that cannot enforce it, and five behaviours differ, so read them before
+assuming the same Dag behaves identically everywhere:
 
 - **CPU.** ``sbx`` gives a sandbox every host CPU; Modal defaults to a request 
of
   0.125 of one, so set ``cpu``; OpenSandbox and OpenShell take ``cpu`` as a 
limit the
   server enforces; Boat sizes by ``machine_type``; Islo uses the server 
default unless
   you set ``vcpus``.
 - **Egress allowlists.** ``sbx`` enforces ``allow_egress_to`` at the host 
policy
-  layer; Modal matches TLS handshake names, which is weaker and has to be opted
+  layer, and unless constructed with ``host_network_policy="deny-all"`` it 
refuses
+  both an allowlist and ``block_network``, so it refuses a bare 
``SandboxSpec()``
+  too; Modal matches TLS handshake names, which is weaker and has to be opted
   into; OpenSandbox enforces it in an egress sidecar, and the backend reads the
   enforced policy and the sidecar's mode back rather than trusting the create
   request, refusing a sidecar that filters only name resolution (``dns``) 
rather
diff --git a/providers/common/ai/docs/use_cases/explain_revenue_anomaly.rst 
b/providers/common/ai/docs/use_cases/explain_revenue_anomaly.rst
index 3287cf7f3ce..25553d91035 100644
--- a/providers/common/ai/docs/use_cases/explain_revenue_anomaly.rst
+++ b/providers/common/ai/docs/use_cases/explain_revenue_anomaly.rst
@@ -71,8 +71,12 @@ Adapting it
 
 * Trigger it from a data-quality check that fires when the move exceeds your 
threshold, so
   the agent runs only on days that need explaining.
-* Swap ``ModalSandboxBackend`` for ``SbxSandboxBackend`` to run locally; the 
same file has
-  that variant (see :doc:`../sandbox/backends/index`).
+* To run it on a laptop, use ``SbxSandboxBackend`` in place of 
``ModalSandboxBackend``. It
+  takes an image name rather than a ``modal.Image``, so pass one that already 
has pandas, and
+  ``cpus`` rather than ``cpu``. Run ``sbx policy init deny-all`` on the host 
and pass
+  ``host_network_policy="deny-all"``, or it refuses the spec's 
``block_network=True``.
+  :doc:`../sandbox/backends/sbx` covers the setup, and the
+  :ref:`Quick start <sandbox-quick-start>` has a Dag on the local backend.
 * Add an :doc:`../approval_gates` step before the finding reaches the finance 
channel.
 * Widen ``allowed_tables`` only as far as the question needs. The limit is 
what makes the
   agent safe to run unattended.

Reply via email to