← Commit history

Publish 0.1.36

Colby Knox ·9857fbc36d · ·parent a61dd3b
4 files changed +33−3
README.md+2
@@ -122,6 +122,8 @@ Version 0.1.33 says plainly what happened when a held-back Codex build shows up:  Version 0.1.34 makes those fixes reach everyone. The background watcher used to restart only when one of its files changed, so a machine that took 0.1.33 while Codex was open kept running the old check and kept Codex Audio. It now restarts when any of its files change, and it removes Codex Audio whenever it shows up again (a Codex update can bring it back). +Version 0.1.36 replaces a Codex backend that nobody can reach. The engine keeps its real socket in /tmp/codex-daemon-<uid>/, and when /tmp was emptied while the workspace ran (adom/hydrogen#186) the backend lived on with no socket, and the runtime refused every new Codex view with "alive but unavailable" until the process died. When the backend is alive but its socket link points at nothing, the runtime now stops it and starts a new one. A socket that still exists but does not answer is refused as before.+ Version 0.1.35 gives OpenAI's newest models to fresh installs too. The newest-engine swap from 0.1.30 only ran while a hold was active, which needs the bad build to have arrived first. A workspace that started on the good build (the Hydrogen golden image ships it) was never held, so its Codex kept the build's own older engine and the model picker stopped at GPT-6 Astra. The guard now fetches the newest engine whenever Codex is on the listed fallback build, held or not; reload the editor once and GPT-6.1 Sol is the default.  ### Skip the repeated IDE walkthrough
package.json+1−1
@@ -4,7 +4,7 @@   "type": "app",   "title": "Codex",   "brief": "Codex in Adom Hydrogen: ecosystem setup, dock dashboard and live engineering demos.",-  "version": "0.1.35",+  "version": "0.1.36",   "description": "Codex in Adom Hydrogen with reusable CAD routing, electrical review, copper-ablation and narrated video skills, plus verified KiCad and Fusion demo progressions.",   "org": "adom",   "needs_sudo": false,
page.json+1−1
@@ -4,7 +4,7 @@   "type": "app",   "title": "Codex",   "brief": "Codex in Adom Hydrogen: ecosystem setup, dock dashboard and live engineering demos.",-  "version": "0.1.35",+  "version": "0.1.36",   "hero": {     "type": "image",     "path": "screenshots/hero.png"
runtime/runtime.py+29−1
@@ -238,6 +238,25 @@ def backend_idle(sock):             if not cursor: return True  +def socket_gone(sock):+    """The socket path no longer leads anywhere: the file is missing, or it is a link (the engine+    links server.sock to /tmp/codex-daemon-<uid>/...) whose target was deleted."""+    return not os.path.exists(sock)+++def stop_backend(metadata):+    """Stop that exact backend (start_ticks checked by process_matches), TERM then KILL."""+    if not process_matches(metadata): return+    os.kill(int(metadata['pid']), signal.SIGTERM)+    deadline = time.monotonic() + 5+    while process_matches(metadata) and time.monotonic() < deadline: time.sleep(.05)+    if process_matches(metadata): os.kill(int(metadata['pid']), signal.SIGKILL)+    deadline = time.monotonic() + 5+    while process_matches(metadata) and time.monotonic() < deadline: time.sleep(.05)+    if process_matches(metadata):+        raise RuntimeError('The unreachable Codex backend did not exit')++ def ensure_server(binary, args, client_guard=None):     directory = state_dir()     sock = directory / 'server.sock'@@ -256,9 +275,18 @@ def ensure_server(binary, args, client_guard=None):             same_args = metadata.get('args') == args             same_binary = (metadata.get('identity') == identity(binary) if 'identity' in metadata                            else metadata.get('binary') == str(binary))-            if not socket_alive(sock):+            if not socket_alive(sock) and socket_gone(sock):+                # ORPHANED (adom/hydrogen#186): /tmp was emptied while the workspace ran. The+                # engine's real socket lives in /tmp/codex-daemon-<uid>/, server.sock is a link to+                # it, and the backend keeps running with nothing able to reach it. It can never+                # serve a client again (a turn in it is invisible, its thread resumes from disk),+                # so replace it instead of refusing every Codex view until it dies.+                stop_backend(metadata)+                metadata = {}+            elif not socket_alive(sock):                 raise RuntimeError('The existing Codex backend is alive but unavailable; '                                    'refusing to start a competing thread writer')+        if process_matches(metadata):             if same_binary and same_args: return sock             requested_version = extension_version(binary)             running_version = extension_version(metadata.get('binary', ''))