odysseus/core
Léo 30ef7652c0 fix(cookbook): skip the pid sweep when the host has no procfs
`_cookbook_kill_session` kills the tmux session, then sweeps /proc for
model servers that survived the SIGHUP. The sweep had no guard, so on
macOS and Windows `os.listdir("/proc")` raised FileNotFoundError after
the kill had already succeeded. The function's outer except turned that
into `{"error": "...No such file or directory: '/proc'", "exit_code": 1}`
and skipped the state write that marks the session stopped — the agent
is told a stop failed that actually worked.

Guard the sweep with a procfs check, the way `_scan_running_model_processes`
already does a few hundred lines up. The root and the check now live in
`core/platform_compat`, which is where OS differences belong and which
makes both branches patchable from a test on either kind of host.

Adds a class-level guard test: the third instance of this defect, and two
of the three were found by reading source rather than by a test.
2026-09-30 12:13:04 +02:00
..
__init__.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
atomic_io.py fix(core): clean up orphaned temp files on atomic write failure (#6068) 2026-08-19 17:38:24 +02:00
auth.py feat(auth): define Default/Local owner contract (#5795) 2026-08-15 20:27:26 +01:00
constants.py refactor(constants): single source of truth for data dir (#3368) 2026-06-08 09:58:52 +02:00
database.py feat(provider): support multiple ChatGPT subscriptions with usage 2026-09-22 13:12:19 +01:00
exceptions.py refactor(exceptions): dedupe src/exceptions via core re-export (#4785) 2026-06-24 16:50:07 +02:00
log_safety.py fix(security): redact credential-bearing URLs and PII from logs (#4750) 2026-06-22 23:12:39 +02:00
middleware.py feat(auth): define Default/Local owner contract (#5795) 2026-08-15 20:27:26 +01:00
models.py feat(provider): support multiple ChatGPT subscriptions with usage 2026-09-22 13:12:19 +01:00
platform_compat.py fix(cookbook): skip the pid sweep when the host has no procfs 2026-09-30 12:13:04 +02:00
session_manager.py feat(provider): support multiple ChatGPT subscriptions with usage 2026-09-22 13:12:19 +01:00