Directory responsibilities
Trace one submission
- Client entry: TypeScript and Python use the same HTTP operations. Console consumes the public API, not a separate execution state model.
- Identity/routes: server.ts checks identity/scope and parses Session ID, input, and idempotency key before delegation. Every lookup and cross-resource binding validates tenant ownership.
- Durable submission: runs.ts owns idempotency, active-Run constraints, transitions, and events; sessions.ts pins configuration/resource associations. Persist state/events before streaming.
- Worker: worker.ts uses leases for preparation, recovery, event ingestion, and completion. Stale workers cannot update newer state. Client disconnect does not cancel execution.
- Cloud resources: the connector contract and registry provide allocation, inspection, files, commands, and private access. Provider branches belong in adapters, not scattered through generic Run orchestration.
- Guest processes: Runtime supervises Harness processes; the Harness contract defines installation, invocation, and output. The control plane never executes uploaded source; Runtime does not own cloud resource management.
- External Tools: tool_bridge.py connects calls to broker.ts for authorization, approval, dispatch, and durable results. Original credentials stay in the control plane. Uncertain effects enter reconciliation.ts.
- Delivery: Artifacts persists deliverables. The worker checks actual results/artifacts before terminal completion. Model text is not execution evidence. Clients query durable results and separately close Sessions for cleanup.
Runtime call relationships
This shows runtime responsibilities, not every static import. Diagram labels are shortened for readability: Worker maps toExecutionWorker, Sandbox lifecycle to SandboxLifecycle, Provider connector to SandboxConnector and its adapter, and Tool broker to ToolBroker. Provider adapters operate cloud resources; Harness adapters define program installation and invocation; Runtime supervises guest processes. The Tool bridge hands calls to a mailbox, then the control-plane broker manages authorization, approval and external dispatch. It does not give the Harness account-administration authority to call arbitrary services.
The Console’s api helper calls /v1. Its local identity bootstrap is client authentication, not a second Run-state store. A display change cannot replace a domain-state transition.
Find functions and tests from a behavior
These are reading and validation entry points, not proof that running only these files covers every change. Prepare database/process prerequisites using the testing guide and record actual results. Real Provider/model journeys remain separate from deterministic tests.
For a boundary example, a Provider-specific private HTTP tunnel should not become a
provider === ... networking implementation inside the worker. Start with the connector’s private-access contract, target-release responsibility and adapter. Express the difference there, then verify that Runtime and preview callers release resources correctly. The same fix can then serve execution and previews without duplicating vendor logic.
Locate recovery behavior
- Run/invocation recovery: execution/worker and runs. Do not replay dispatched operations with unknown outcomes.
- Pause/checkpoints/deletion: lifecycle.ts, checkpoints.ts. Idle, paused, closed, and provider deletion are different states.
- Protected access: access-server.ts and modules/access. Raw keys in environment are not an acceptable compatibility fallback.
- Storage upgrades: migrate.ts and numbered SQL. Do not modify applied migrations to disguise a new schema.
Choose the implementation boundary
As a no-cloud reading exercise, locate submission, idempotency checking, persisted invocation, Runtime execution, Tool dispatch, and result persistence. Explain who recovers each failure and which actions cannot be blindly repeated. Listing directories alone is insufficient.
This map follows current files/implementation and claims no newly passed tests. Record deterministic and real-provider/model evidence separately, retaining sensitive resource IDs privately.
Next: Sandbox connectors, Harness adapters, Tool and application connectors.