You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Isolate host-process identity fixtures from live Linux /proc observations #4558
Make the host process-identity unit fixtures independent of real Linux processes. Main CI Coverage at d78be6c88715ad80fc658497f23f91c86bf9489b failed this assertion: job 132422505800. The check annotation names packages/host-kit/src/internal/host-process-liveness.test.ts:182, test one identity read answers a whole fleet from two ps runs, on Linux and macOS output.
Observed behavior and source trace
The fixture supplies a fake ps zombie for PID 202 with a calendar start time. CI instead returned a linux:<boot-id>:16 start token and zombie: false. The test mocks the command executor but leaves filesystem reads live. On current main, parseHostProcessIdentityRows in host-process.ts prefers readLinuxProcessStat(pid) over the supplied ps row. A real process with a fixture PID can therefore replace the fixture's state and identity. This is source/CI evidence; no controlled Linux reproduction has been run here.
Related PR reviews also report this same test failing in #4547 and #4552. #4247 concerns failure reporting; it does not own this fixture isolation defect. #4438 introduced the monotonic Linux identity behavior and must retain that behavior.
Required behavior
Control both process-table and /proc observations in tests that declare a fake fleet. Do not choose supposedly unused numeric PIDs as a substitute for isolation.
Keep separate coverage for readable Linux stat, unreadable-stat fallback, zombie state, unknown observations, and batched command counts.
Keep production /proc identity precedence and clock-step protection unchanged unless a separately demonstrated production defect requires correction.
Do not skip tests, relax assertions, increase timeouts, or blindly retry CI.
Completion conditions
A deterministic fixture demonstrates that a live-looking Linux stat answer for a fake fleet PID changes the old result.
The corrected fixtures pass with controlled Linux and macOS observations, independent of host PID occupancy.
The focused tests and exact-head affected gate pass. Linux CI Coverage passes on the published head.
Dependencies
No existing issue or open PR owning this isolation defect was found during triage. This is a focused test-fixture repair, separate from #4512's helper/guard timeout diagnosis.
The issue reports a concrete test-isolation defect: a host-process identity unit test leaves /proc reads live, causing CI to replace fixture PIDs with real process state and fail a named test. It provides source trace, failing job link, and required test behavior, so a maintainer can reproduce and fix it.
Activity
apex-sentinel-staging commentedon Nov 15, 2026
Apex Sentinel · Issue review
Suggested label:
bugThe issue reports a concrete test-isolation defect: a host-process identity unit test leaves /proc reads live, causing CI to replace fixture PIDs with real process state and fail a named test. It provides source trace, failing job link, and required test behavior, so a maintainer can reproduce and fix it.
Required sections