[Other]: Tests guarded on getuid() !== 0 execute nowhere, and one fails on every root runner
- Dominant language
- TypeScript
- Stars
- 71.3k
- Forks
- 4.7k
- Avg merge
- 14h 54m
- Merged PRs (30d)
- 520
Description
A number of suites guard permission-refusal cases on `getuid() !== 0`. CI
containers run as root, so those cases skip there — and with no second lane they
execute nowhere at all.
Affected: `agent-hooks/installer-utils`,
`agent-hooks/managed-hook-owner-identity`, `cli/cli-installer`,
`codex-accounts/codex-credential-absence-grace`, `main/orcad/orcad-instance-lock`,
`main/daemon/history-manager`, among others.
**The count does not reveal it:** a skipped test still counts toward "passed", so
a suite reports green while the assertion it exists for has never run.
**One case is worse than skipped.** `src/main/ssh/ssh-g-config-resolution.test.ts`
has no guard at all — it `chmod`s a file to `0o000` and expects the read to fail,
which under uid 0 cannot happen. It does not skip on a root runner, it **fails**,
every run, and reads as flake.
**Repro:**
1. Run as root (as CI does): root-guarded cases skip; `ssh-g-config-resolution`
fails.
2. Run as an ordinary user — on a constrained host the full config
(`config/vitest.config.ts`, which pulls happy-dom, the renderer aliases and two
setup files) will not install at all, so those files run nowhere.
The tests in question import only node builtins, `vitest` and local modules, so
none of that renderer machinery applies to them.
Filed as **Other** rather than Bug: apart from the one failing test above, this is
a test-coverage gap rather than a product defect, so the OS and Orca-version
fields would not carry meaningful answers.
Contributor guide
Assessment
This issue has not been assessed yet.