Skip to content

test(install): lint the LaunchAgent with plutil on the macOS job and with plistlib elsewhere - #3506

Merged
devswha merged 3 commits into
devswha:mainfrom
Danipulok:fix/plutil-lint-macos
Nov 10, 2026
Merged

devswha merged 3 commits into
devswha:mainfrom
Danipulok:fix/plutil-lint-macos

Conversation

@Danipulok

@Danipulok Danipulok commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Change

The core_service test in scripts/install-herdr-core.test.ts lints the generated LaunchAgent with plutil -lint whenever a plutil is on PATH. On Linux, the plutil found there is GNUstep's (gnustep-base-runtime on Ubuntu), and it refuses a valid XML plist:

$ plutil -lint agent.plist
Loading 'agent.plist' - Error Domain=NSPropertyListSerialization Code=0 "non-NSData data argument passed to method"
$ echo $?
1

GNUstep's plutil fails every file with that message (https://github.com/gnustep/libs-base/blob/6307e474dd39e36eb2c5f6ee15ade8b51e337970/Source/NSPropertyList.m#L2648-L2650). The test now runs plutil -lint on macOS only, where plutil is Apple's. Everywhere else it parses the file with Python's plistlib, when python3 is on PATH. Before, the check ran in no CI job: ubuntu-24.04 has no plutil, and the macOS job did not run this file. Now it runs on the Linux runners. .github/workflows/ci.yml also adds the file to the macOS job, where Apple's plutil lints 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. On main, scripts/install-herdr-core.test.ts fails at the plutil -lint line.

  • A bare & added to the LaunchAgent in install.sh (<key>R&D</key>) fails the test on Linux:

    Expected: 0
    Received: 1
    (fail) core_service > on macOS, loads a LaunchAgent that runs plugin.ts start at load and leaves the server it starts running
    
  • On macos-15, in a run on our fork, scripts/install-herdr-core.test.ts passes 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

@coderabbitai

coderabbitai Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Summary

Summary by CodeRabbit

  • Tests
    • Expanded automated checks for macOS session workflows.
    • Added validation of generated LaunchAgent configuration using an available platform-appropriate tool.

The LaunchAgent test now validates the generated plist with a platform-specific tool when available. The macOS CI session adds this test to its existing test command.

Changes: LaunchAgent test validation

Layer / File(s) Summary
Plist validation and CI integration
scripts/install-herdr-core.test.ts, .github/workflows/ci.yml
The test uses plutil -lint on macOS and Python plistlib elsewhere. It skips validation if the selected executable is unavailable. The macOS CI command now includes this test.

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Other

Suggested labels: github_actions

Suggested reviewers: devswha

Merge Risk: Minimal · up to 44683

No merge-blocking risk was identified in the test and CI changes.

Pre-merge checks: Passed 5

Check name Status Explanation
Title check Passed The title clearly summarizes the main change: platform-specific LaunchAgent plist validation and macOS CI coverage.
Description check Passed The description includes both required sections. It explains the problem and resulting behavior, and lists validation commands, results, and skipped checks.
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 1 files. (1 skipped: 1 unsupported.)

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: devswha/ovis
  • Branch: main
  • File: .coderabbit.yaml
  • Commit: d3cf98b
  • Layers: Repository YAML
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: cbbcb16d-f0a2-44da-899f-4f232ef9e70a
Commits

Reviewing files that changed from the base of the PR and between d3cf98b and 4468390.

Files selected for processing: 2

  • .github/workflows/ci.yml
  • scripts/install-herdr-core.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.

@github-actions

github-actions Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

All contributors have signed the CLA. Thank you!
Posted by the CLA Assistant Lite bot.

@Danipulok

Copy link
Copy Markdown
Contributor Author

I have read the CLA Document and I hereby sign the CLA

@Danipulok

Copy link
Copy Markdown
Contributor Author

recheck

github-actions Bot added a commit that referenced this pull request Nov 9, 2026
@Danipulok Danipulok changed the title test(install): lint the LaunchAgent with plutil on macOS only test(install): lint the LaunchAgent with plutil on macOS and with plistlib elsewhere Nov 9, 2026
@Danipulok Danipulok changed the title test(install): lint the LaunchAgent with plutil on macOS and with plistlib elsewhere test(install): lint the LaunchAgent with plutil on the macOS job and with plistlib elsewhere Nov 9, 2026
@Danipulok
Danipulok marked this pull request as ready for review November 10, 2026 00:08
devswha pushed a commit that referenced this pull request Nov 10, 2026
…#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.
devswha pushed a commit that referenced this pull request Nov 10, 2026
…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.
@devswha
devswha merged commit 5d7c15a into devswha:main Nov 10, 2026
27 of 40 checks passed
@devswha

devswha commented Nov 10, 2026

Copy link
Copy Markdown
Owner

Merge pass

Merged head 446839046420 as 5d7c15a4e5f9 on GitHub's checks, with no unresolved review threads.

Reviewer Verdict Note
claude CLEAR
claude-standin CLEAR

Merged with these checks red, none of them required: ssh;

  • Reviewers: a fresh Claude agent and a Claude stand-in (Codex unavailable), both CLEAR at 4468390.
  • Changes a CI workflow: one test file added to the macOS job's bun test line. The owner approved this batch by number. The job ran all 24 tests of the file on macOS at this head (about 8 s added).
  • Shown in a scratch copy: the new plistlib lint fails on a malformed LaunchAgent that the test on main passes.
  • LOW, not fixed: the plist with escaped characters is still checked by substring only; the lint is skipped silently where python3 is missing.
  • CodeRabbit did not review this head.

devswha pushed a commit that referenced this pull request Nov 10, 2026
…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.
@Danipulok
Danipulok deleted the fix/plutil-lint-macos branch November 10, 2026 09:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants