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-05 12:05:13 -07:00
2026-04-08 16:37:05 -07:00
2026-04-08 04:44:49 -07:00
2026-04-07 22:49:01 -07:00
2026-04-01 15:23:52 -07:00
2026-04-07 17:28:37 -07:00
2026-03-14 14:27:20 +03:00
2026-04-08 17:08:40 -07:00
2026-04-08 13:46:30 -07:00
2026-04-05 12:34:11 -07:00
2026-03-24 07:30:25 -07:00
2026-04-07 14:03:46 -07:00
2026-04-08 13:46:30 -07:00
2026-04-03 17:49:18 -07:00
2026-04-08 17:23:15 -07:00
2025-10-01 23:29:25 +00:00
2026-03-17 02:02:33 -07:00
2026-03-17 02:53:33 -07:00
2026-03-13 23:59:12 -07:00
2026-04-07 17:59:42 -07:00
2026-03-15 21:59:53 -07:00
2026-04-07 09:58:45 -07:00
2026-04-02 00:49:11 -07:00
2026-04-02 15:33:51 -07:00
2026-03-29 15:47:19 -07:00
2026-03-24 08:19:23 -07:00
2026-04-07 17:59:42 -07:00
2026-03-20 15:41:06 -04:00
2026-04-05 23:31:29 -07:00
2026-04-07 22:23:28 -07:00
2026-03-30 17:34:43 -07:00
2026-04-02 09:21:37 -07:00
2026-04-08 00:41:36 -07:00
2026-03-19 15:16:35 +01:00
2026-04-07 09:58:45 -07:00
2026-02-26 13:54:20 +03:00
2026-03-09 23:27:19 -07:00
2026-03-30 13:16:16 -07:00
2026-03-30 20:36:56 -07:00
2026-03-30 13:28:10 +09:00