Skip to content

v1.3.1 — truthful background watches

Latest

Choose a tag to compare

@ironessi ironessi released this 04 Dec 08:20

What broke

A watch created by hand refused to see work that was already running: it silently assumed the process started in the last minute (plus two minutes of grace), so an experiment launched ten minutes earlier never matched and dsh_watch reported "no matching process". At the same time a quiet checkpoint — one that a long step has not touched for a few minutes — was rendered as "files still updating", i.e. as if the work were alive.

What this release changes

  • Manual watches are unbounded. dsh_watch {process:{pid}} now matches a process regardless of when it started; only watches auto-created from a Start-Process / nohup launch keep their launch-time bound. /v1/watches/:id exposes process_since so you can see which kind you have.
  • Three separate facts instead of one guess. process_state (matched / not_found / unavailable / not_configured), per-file progress + changed_since_last_check, and a top-level verdict (alive / active_but_unconfirmed / unconfirmed). The words "stalled" and "likely stopped" are gone; a quiet file says "a silent step or a finished run, not distinguishable from here". A failed process query is called out, not silently treated as "nothing running".
  • Checkpoint progress, not log progress. progress accepts {kind:"lines", skip} (count complete lines of a JSONL checkpoint, skipping metadata rows), {kind:"json_rows", key} (count array entries or a key), or {kind:"regex"}.
  • Encoding-robust tails. Log tails decode from their BOM and a NUL-byte sniff — UTF-16LE, UTF-16BE, UTF-8, GBK, latin1 — and a UTF-16 file with a plain-ASCII tail appended by a second writer (classic Out-File + Add-Content) decodes both halves.
  • PID identity. A pid match also checks the process creation time against the recorded launch (±120 s), so a recycled pid cannot fake liveness.

Upgrading

Re-run install.ps1 for the Codex side and reload the DSH Host plugin (plugin_manager disable→enable include:codex-bridge). No config changes.

Verified

  • npm test — 13/13 (7 MCP protocol + 6 watch semantics)
  • scripts\mcp-smoke.mjs — 13/13
  • scripts\e2e-jobs.mjs — 10/10
  • scripts\e2e-watch-truth.mjs — 7/7 (late manual attach, silent checkpoint, killed process, bogus pid, mixed encoding, cleaned checkpoint, result-file acceptance)

Full Changelog: v1.3.0...v1.3.1