Skip to content

[bug] Three shipped tools fail on Linux because they assume macOS: the process reader… #2832

Open

Description

@pana-ce

What happened

Three shipped tools fail on Linux because they assume macOS: the process reader in SessionTree.ts (macOS ps flags, so SessionTree show and OrphanReaper crash), PegWatch.ts (top -l and ioreg), and Secrets.ts (Keychain-only identity, age-keygen -pq). Several installers are launchd-only and Mount.ts status applies the mount. I have local fixes with tests and can open a pull request.

Summary

Three shipped tools fail on Linux because they assume macOS. Seen on Debian 13 (procps-ng 4.0.4, age 1.2.1, systemd user units).

1. Process reader (LIFEOS/TOOLS/SessionTree.ts, readProcsPs)

  • It runs ps -ww -Axo pid=,ppid=,tty=,etime=,command= and ps -ww -E -Axo pid=,command=.
  • procps-ng refuses both: error: must set personality to get -x option and error: unsupported SysV option.
  • Effect: SessionTree.ts show and OrphanReaper.ts exit 1 on Linux, so neither the in-session cleanup nor the reaper works.
  • The reap rules also expect tty ?? and adoption by pid 1. Linux prints ?, and an orphan can be adopted by systemd --user.
  • Local fix: on Linux use ps -ww -eo ... and ps e -ww -eo ..., then normalize rows once at the reader (? to ??, a parent of init or systemd --user to 1). No reap rule changes. 7 tests, red on the old reader, green on the new.

2. LIFEOS/TOOLS/PegWatch.ts

  • CPU comes from the macOS form top -l 2 -n 0 -s 2, GPU from ioreg. Both are macOS only, so the run fails with ENOENT.
  • Local fix: two samples of the kernel stat file under proc, two seconds apart, for CPU on Linux, GPU reads null, plain ps -eo pcpu=,rss=,comm= for the top list.

3. LIFEOS/TOOLS/Secrets.ts

  • The age identity lives only in the macOS login Keychain, so init and seal cannot run on Linux and the secrets file stays NOSEAL.
  • age-keygen -pq fails on age older than 1.3 (Debian 13 ships 1.2.1).
  • Local fix: when not on darwin, keep the identity in an owner-only file (0600 in a 0700 directory), refuse a group- or world-readable file, and fall back to a classical key with a printed notice. 4 tests.

Related

  • InstallOrphanReaper.ts, InstallPegWatch.ts, InstallCoach.ts, InstallVelocitySync.ts and InstallSocrates.ts are launchd only. On Linux the systemd unit pairs have to be written by hand, while InstallUsageAggregator.ts and InstallAtlas.ts already handle both.
  • The Socrates services adapter reads launchctl list, so "are the services running" is unanswerable on Linux.
  • bun LIFEOS/CODEX/Mount.ts status applied the mount (created the links and AGENTS.md) instead of only reporting.

I can open a pull request with the three patches and their tests.

Details

  • Kind: bug
  • LifeOS version: 8.761.0

Filed with the LifeOS /feedback command. The reporter approved this exact text before it was sent; paths, secrets and personal details were stripped locally.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions