Repository navigation
test(install): lint the LaunchAgent with plutil on the macOS job and with plistlib elsewhere - #3506
Conversation
|
No actionable comments were generated in the recent review. Summary
Merge Risk:
|
|
All contributors have signed the CLA. Thank you! |
|
I have read the CLA Document and I hereby sign the CLA |
|
recheck |
…util` is not Apple's
…` lints the LaunchAgent
…#3508) ## Change The contract tests and two browser QA scripts start agent stand-ins by copying or linking `/bin/sleep` under an agent's name (`hermes`, `agy`, `grok-*`, `muse`, `codex`, `omp`). On Ubuntu 26.04, `/bin/sleep` is the rust-coreutils multicall binary, which picks its program by the name it runs under, so every stand-in exits at once: ```text $ cp /bin/sleep ./hermes && ./hermes 1 coreutils: unknown program 'hermes' $ ln -s /bin/sleep ./muse && ./muse 1 Security violation: Requested utility `muse` does not match executable name: /usr/lib/cargo/bin/coreutils/sleep ``` The GNU build ships beside it as `/usr/bin/gnusleep` (https://packages.ubuntu.com/resolute/amd64/gnu-coreutils/filelist). The new `scripts/fixtures/sleep.ts` exports `SLEEP`, which is `/usr/bin/gnusleep` when it exists and `/bin/sleep` otherwise. Every stand-in now uses it, so other systems behave as before. This is a test-only change, so there is no changelog entry. ## Validation Run on Ubuntu 26.04 with Bun 1.4.2, Node 22 and herdr 0.9.5. - `bun run check fast`: every step passes except one unit file. `scripts/install-herdr-core.test.ts` fails on this machine on `main` too: GNUstep `plutil` refuses the LaunchAgent, which #3506 fixes. - `bun test server/hermes.contract.test.ts`: 9 pass. On `main`, 1 fails with `Hermes stand-in did not become the pane's foreground process`. - `bun test server/api.contract.test.ts`: 197 pass. On `main`, 4 fail: `fixture Grok process did not start`, and the same for Agy, Muse and Codex. - Not run: the two browser QA scripts (`scripts/agy-chat-browser-qa.ts`, `scripts/grok-chat-browser-qa.ts`), and any run on macOS.
…er (#3507) ## Change Some tests in `server/pty/host.test.ts` crash a process on purpose (a fake host's `kill -SEGV $$`, `SIGABRT` to the Rust host). They set `ulimit -c 0` so no core file lands in the checkout. On a Linux desktop where `core_pattern` pipes to `systemd-coredump`, a limit of 0 does not stop the pipe: every check run started `systemd-coredump`, and the desktop crash reporter (DrKonqi on KDE) showed "ovis-pty-sidecar crashed". The kernel skips a piped dump only when the limit is exactly 1 byte (https://github.com/torvalds/linux/blob/028ef9c96e96197026887c0f092424679298aae8/fs/coredump.c#L978-L996). On a machine with `|/usr/lib/systemd/systemd-coredump ...` as `core_pattern`: ```text $ sh -c 'ulimit -c 0; kill -SEGV $$' Segmentation fault (core dumped) sh -c 'ulimit -c 0; kill -SEGV $$' $ journalctl --since <then> -o cat | grep -c 'Started systemd-coredump' 1 $ sh -c 'prlimit --pid $$ --core=1:1; kill -SEGV $$' Segmentation fault sh -c 'prlimit --pid $$ --core=1:1; kill -SEGV $$' $ journalctl --since <then> -o cat | grep -c 'Started systemd-coredump' 0 $ journalctl -k -o cat | grep 'aborting core' coredump: 2970378(sh): RLIMIT_CORE is set to 1, aborting core ``` The fake hosts and `direct()` now run `prlimit --pid $$ --core=1:1`. Where `prlimit` is missing (macOS), or the hard limit is already 0 (the self-hosted runner container, which `scripts/self-hosted-runner/run.sh` starts with `--ulimit core=0`), `prlimit` cannot raise it, and only `ulimit -c 0` applies, as before. A new Linux-only test reads `/proc/$$/limits` under that command and expects a soft and hard limit of 1 byte. It skips where the hard limit is 0. This is a test-only change, so there is no changelog entry. ## Validation Run on Ubuntu 26.04 with Bun 1.4.2, Node 22 and herdr 0.9.5. - `bun run check fast`: every step passes except one unit file. `scripts/install-herdr-core.test.ts` fails on this machine on `main` too: GNUstep `plutil` refuses the LaunchAgent, which #3506 fixes. `server/pty/host.test.ts` passes in that run. - `bun test server/pty/host.test.ts`: 42 pass, 28 skip. The new test fails when the command is set back to `ulimit -c 0` (`Max core file size 0 0 bytes`). No `systemd-coredump` started during the run. - Not run on macOS, where only the `ulimit -c 0` fallback runs, as before.
Merge passMerged head
Merged with these checks red, none of them required: ssh;
|
…oved (#3509) ## Change With herdr-core, a split starts its shell in the split pane's folder. When that folder is gone (a worktree removed after the pane was made), herdr-core refuses to start the shell, and the split fails. From `terminal.run` on hc `0.1.18`: ```text missing cwd: HcError: cannot start "/bin/sh": No such file or directory (os error 2) kind=spawn_failed ``` The adapter now starts such a shell in this PC's home folder. With no `cwd`, hc starts the shell in the folder its own server was started in (`/` in the same probe). For that reason the adapter passes `homedir()` explicitly, as `server/runtime-move-service.ts` does. A folder of another machine goes as it is, since this PC's disk does not hold it. A pane that reports no folder still gets no `cwd`, as before, and a `cwd` the caller gives (a move from herdr) is used as given. <img width="1280" height="800" alt="2026-11-09-split-in-removed-folder-before" src="https://github.com/user-attachments/assets/c092d23e-6fe7-4d9d-b7cb-96a430b6ea40" /> In the app, on herdr-core with the workspace's folder deleted, Split right on `main` shows the error and opens nothing: On this branch the split opens a shell in the home folder (the folder's name is covered): <img width="1280" height="800" alt="2026-11-09-split-in-removed-folder-after" src="https://github.com/user-attachments/assets/16d4804b-716d-453b-a38c-64d37a830854" /> The new tests in `server/herdr-core/adapter.test.ts` cover a folder that is there, the removed folder, a pane on another machine and a pane with no folder. Against the adapter on `main`, the removed folder test fails (home path shortened): ```text error: expect(received).toBe(expected) Expected: "/home/user" Received: "/nonexistent/removed-worktree" (fail) herdr-core adapter, Ovis's layout document > splits a pane whose folder is gone into a shell at this PC's home ``` ## Validation Run on Ubuntu 26.04 with Bun 1.4.2, Node 22, herdr 0.9.5 and hc 0.1.18. - `bun run check fast`: every step passes except one unit file. `scripts/install-herdr-core.test.ts` fails on this machine on `main` too: GNUstep `plutil` refuses the LaunchAgent, which #3506 fixes. - `bun test server/herdr-core/adapter.test.ts`: 90 pass. Each new test fails when its part of the change is undone: the check that the folder exists, the check for another machine, `homedir()` in place of no `cwd`, the split's use of the fallback, and the check for a pane with no folder. - `bun test scripts/changelog-fold.test.ts`: 12 pass, so the new fragment parses. - `bun run typecheck`: passes. - Not run: the integration and browser lanes, macOS and Windows. ## Not covered A new tab in such a workspace still fails. The page sends the workspace's folder with every new tab (`src/App.tsx`, `newTabTarget`), and `/api/tab/create` answers `400 invalid_cwd` for a folder that is gone, before herdr-core is asked. Whether a tab should then open at home, or the error should stay, is a behaviour question for herdr as well, so this change leaves it.
Change
The
core_servicetest inscripts/install-herdr-core.test.tslints the generated LaunchAgent withplutil -lintwhenever aplutilis onPATH. On Linux, theplutilfound there is GNUstep's (gnustep-base-runtimeon Ubuntu), and it refuses a valid XML plist:GNUstep's
plutilfails every file with that message (https://github.com/gnustep/libs-base/blob/6307e474dd39e36eb2c5f6ee15ade8b51e337970/Source/NSPropertyList.m#L2648-L2650). The test now runsplutil -linton macOS only, whereplutilis Apple's. Everywhere else it parses the file with Python'splistlib, whenpython3is onPATH. Before, the check ran in no CI job:ubuntu-24.04has noplutil, and the macOS job did not run this file. Now it runs on the Linux runners..github/workflows/ci.ymlalso adds the file to the macOS job, where Apple'splutillints it. The change touches tests and CI only, so there is no changelog entry. It touches a workflow, so it waits for a real review.Validation
Run on Ubuntu 26.04 with Bun 1.4.2, Node 22, Python 3 and herdr 0.9.5.
bun run check fast: all steps pass, 14379 unit tests. Onmain,scripts/install-herdr-core.test.tsfails at theplutil -lintline.A bare
&added to the LaunchAgent ininstall.sh(<key>R&D</key>) fails the test on Linux:On
macos-15, in a run on our fork,scripts/install-herdr-core.test.tspasses 24 of 24 with/usr/bin/plutil. The macOS job's file list with this file added also passes: https://github.com/Danipulok/ovis-fork/actions/runs/42723678357