Skip to content

fix(test): the fake core reports a pid no OS can assign - #135

Merged
colangelo merged 3 commits into
masterfrom
fix/fake-core-pid
Nov 29, 2026
Merged

colangelo merged 3 commits into
masterfrom
fix/fake-core-pid

Conversation

@colangelo

Copy link
Copy Markdown
Owner

Summary

The fake herdr-core used in tests reported pid 4242 for its terminals. Tests that close a fake core pane could signal that pid, and on m4m that once hit a real session's process.

- fake core terminal pid: 4242 (a pid a real OS can hand out)
+ fake core terminal pid: FAKE_CORE_PID = 99_999_999 (above any pid_max)
  • fix(test): the fake core reports a pid no OS can assign: one constant, used by the fake and the tests.
  • test: closing a fake core pane signals no process outside the test: guards the close path.
  • fix(test): reach FAKE_CORE_PID through crate::pane: visibility fix (E0603).

Evidence

  • Before: fake core panes carried pid 4242; a guarded close in tests could signal it.
  • After: just check passes on the rebased head; the new test asserts no signal leaves the test.

Merge Danger

Door: two-way

Blast Radius: tests only

refs https://gitea.cat-bluegill.ts.net/AC-forks/herdr-max/issues/404

closing a fake core pane swept the real session of pid 4242, which on a
busy machine is often a live process. the fake now reports FAKE_CORE_PID
(99999999, above every pid_max) and the fixtures that stood in for a pane's
program use it too, so no test signals a process it did not start.

refs https://gitea.cat-bluegill.ts.net/AC-forks/herdr-max/issues/404
Work-Ref: WORK-05
the first commit named it by its private runtime_io path, which the lint
build rejected (E0603). it is re-exported next to FakeCore, test and unix only.

refs https://gitea.cat-bluegill.ts.net/AC-forks/herdr-max/issues/404
Work-Ref: WORK-05
@colangelo
colangelo merged commit fdf6ea6 into master Nov 29, 2026
5 checks passed
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.

1 participant