2 Commits
Author SHA1 Message Date
zhou.han 9e86a2c7b7 proc: a Linux zombie no longer holds a lock (#1198)
yetihan (#1198): a lock whose owner is a Linux zombie was held for
good. process.kill(pid, 0) succeeds on a zombie, so 15 packages' lock
and liveness checks counted an exited, unreaped owner as alive.

- scripts/proc.mjs: processStatus(pid) is dead on ESRCH, and on Linux
  also when /proc/<pid>/stat says Z or X; EPERM is "permission", any
  other error "unknown". processAlive / processExists keep each
  caller's old EPERM and unknown-error meaning.
- scripts/sync-proc.mjs copies it into each package (--check in the
  tests); every package's own check keeps its old semantics, now with
  zombies dead. agent-console's daemon bundle and window-warmup's dist
  are rebuilt.
- 15 packages bumped.

Review run at 28ef6622 (mote, HOME=$(mktemp -d)):
- node scripts/sync-proc.mjs --check: ok.
- bun test (whole repo): 8934 pass, 0 fail.
- bun scripts/check.mjs: every package ok.
- window-warmup's build reproduces its dist/plugin.js byte for byte.
  agent-console's bundle diff read line by line: the proc module plus
  esbuild's renumbered imports, nothing else (esbuild isn't installed
  on mote, so it wasn't rebuilt there).
- Real zombie on Linux (WSL, magpie-desktop): a bash child left
  unreaped by an exec'd sleep, /proc stat "Z": the old kill(0) check
  says alive, processStatus says dead; the running process says alive.

Not tried: each package's lock contention end to end.
2026-11-16 12:19:09 +08:00
SivanCola 075cd237e2 reasonix-desktop 0.1.0: Reasonix 1.x in Discover → Agents (#700)
Adds Reasonix 1.x (Desktop and CLI) to Plugins → Discover → Agents as
`@magpie-community/agent-reasonix-desktop`, agent id `reasonix-desktop`,
separate from magpie's built-in `reasonix` adapter (Studio 2.x and native
1.39). A JSON agent descriptor plus a Bun-host companion (the kimi-desktop
pattern) adds one `magpie-agent` provider to Reasonix's global config.toml
and keeps only the assigned gateway key in its .env, with a journal, a
lock and byte-exact restore on disconnect.

Review commit on the branch: the registry entry's icon was `reasonix`, a
mask name with no icons/reasonix.svg, so Discover would show the generic
mark; it is `reasonix-color` now.

Run at the reviewed head 6cb328f090d8b66e6cf590a69aa4e7b18144c684 (mote):
- packages/reasonix-desktop `bun test`: 12 pass, 0 fail.
- acceptance.mjs with a real Reasonix 1.38.10 (npm) and a magpie built
  from origin/main 4ca55c6b6, sandbox HOME: magpie installs and discovers
  the plugin and bridges the selected model; unchanged Reasonix sends its
  selected model and assigned key to the local API; disconnect restores
  the original selection and credentials.
- resident-acceptance.mjs (a running `magpie serve` follows the switch):
  passed.
- vendor.mjs rebuilt from its pinned sources: byte-identical.
- CI run 41773750085 on 6cb328f0: success.
Not tried: Reasonix Desktop's GUI app itself (the CLI reads the same
config files), Windows and Linux.
2026-11-04 12:38:13 +08:00