alt-glitch
d684d7ee7e
feat(environments): unified spawn-per-call execution layer
Replace dual execution model (PersistentShellMixin + per-backend oneshot)
with spawn-per-call + session snapshot for all backends except ManagedModal.
Core changes:
- Every command spawns a fresh bash process; session snapshot (env vars,
functions, aliases) captured at init and re-sourced before each command
- CWD persists via file-based read (local) or in-band stdout markers (remote)
- ProcessHandle protocol + _ThreadedProcessHandle adapter for SDK backends
- cancel_fn wired for Modal (sandbox.terminate) and Daytona (sandbox.stop)
- Shared utilities extracted: _pipe_stdin, _popen_bash, _load_json_store,
_save_json_store, _file_mtime_key, _SYNC_INTERVAL_SECONDS
- Rate-limited file sync unified in base _before_execute() with _sync_files() hook
- execute_oneshot() removed; all 11 call sites in code_execution_tool.py
migrated to execute()
- Daytona timeout wrapper replaced with SDK-native timeout parameter
- persistent_shell.py deleted (291 lines)
Backend-specific:
- Local: process-group kill via os.killpg, file-based CWD read
- Docker: -e env flags only on init_session, not per-command
- SSH: shlex.quote transport, ControlMaster connection reuse
- Singularity: apptainer exec with instance://, no forced --pwd
- Modal: _AsyncWorker + _ThreadedProcessHandle, cancel_fn -> sandbox.terminate
- Daytona: SDK-level timeout (not shell wrapper), cancel_fn -> sandbox.stop
- ManagedModal: unchanged (gateway owns execution); docstring added explaining why
2026-04-08 17:23:15 -07:00
..
2026-04-07 08:40:22 -04:00
2026-04-08 17:23:15 -07:00
2026-03-17 02:33:12 -07:00
2026-03-31 08:48:54 +09:00
2026-03-23 07:43:12 -07:00
2026-04-07 01:00:02 -07:00
2026-04-08 02:24:32 -07:00
2026-04-01 04:18:50 -07:00
2026-04-08 13:44:58 -07:00
2026-04-08 13:44:58 -07:00
2026-04-08 02:24:32 -07:00
2026-03-25 19:47:58 -07:00
2026-04-07 13:36:38 -07:00
2026-04-08 17:23:15 -07:00
2026-04-07 17:28:23 -07:00
2026-04-07 22:49:01 -07:00
2026-04-07 10:25:31 -07:00
2026-04-07 13:36:38 -07:00
2026-04-07 17:28:23 -07:00
2026-04-08 02:24:32 -07:00
2026-04-08 02:24:32 -07:00
2026-03-25 19:47:58 -07:00
2026-04-07 13:36:38 -07:00
2026-04-07 13:36:38 -07:00
2026-02-23 02:11:33 -08:00
2026-04-02 12:40:03 +11:00
2026-04-07 10:25:31 -07:00
2026-04-07 18:00:01 -07:00
2026-04-07 13:36:38 -07:00
2026-03-27 15:28:19 -07:00
2026-03-18 02:55:30 -07:00
2026-03-11 20:02:36 -07:00
2026-04-05 12:46:07 -07:00
2026-03-26 19:38:04 -07:00
2026-04-08 03:35:43 -07:00
2026-04-08 02:24:32 -07:00
2026-04-07 10:25:31 -07:00
2026-04-07 13:36:38 -07:00
2026-04-07 13:36:38 -07:00
2026-04-07 13:36:38 -07:00
2026-03-27 15:28:19 -07:00
2026-04-07 10:25:31 -07:00
2026-03-25 15:54:28 -07:00
2026-04-07 13:36:38 -07:00
2026-04-08 17:23:15 -07:00
2026-03-25 19:47:58 -07:00
2026-04-07 13:36:38 -07:00
2026-03-31 08:48:54 +09:00
2026-04-08 02:24:32 -07:00
2026-04-08 13:47:08 -07:00
2026-04-07 13:36:38 -07:00
2026-03-23 15:40:42 -07:00
2026-04-07 13:36:38 -07:00
2026-04-07 10:25:31 -07:00
2026-04-08 02:24:32 -07:00
2026-04-07 10:25:31 -07:00