Skip to content

build: check types as on Linux on every machine, as CI does - #383

Merged
futrime merged 1 commit into
mainfrom
build/pyright-linux-platform
Oct 12, 2026
Merged

futrime merged 1 commit into
mainfrom
build/pyright-linux-platform

Conversation

@futrime

@futrime futrime commented Oct 12, 2026

Copy link
Copy Markdown
Member

What

On a macOS checkout, uv run pre-commit run --all-files failed with 20 pyright errors in coganchor/fence/loopback.py, coganchor/linux/landlock.py, coganchor/linux/seccomp.py and runtime/flowing/environing_local.py. They're all calls to what only Linux's os and socket have (pidfd_open, O_PATH, AF_NETLINK, sched_getaffinity), each guarded by an AttributeError handler. CI's static job runs on Linux and passes, so every macOS contributor saw a red hook that CI never showed.

[tool.pyright] pythonPlatform = "Linux" makes the check the same on every machine.

Verification

  • macOS: uv run --frozen pyright → 0 errors (was 20); the full pre-commit run --all-files passes.
  • Linux, as CI runs it, is unchanged: Linux was already the platform there.

🤖 Generated with Claude Code

pyright on a Mac refused the calls the fences, the sandbox and the local
environment make to what only Linux's `os` and `socket` have -- `pidfd_open`,
`O_PATH`, `AF_NETLINK`, `sched_getaffinity` -- each caught where it is missing,
so `pre-commit` failed on every macOS checkout while CI, on Linux, passed.
`pythonPlatform = "Linux"` makes the check the same everywhere.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 12, 2026 15:02

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@futrime
futrime enabled auto-merge October 12, 2026 15:07
@futrime
futrime added this pull request to the merge queue Oct 12, 2026
Merged via the queue into main with commit 9b9069b Oct 12, 2026
12 checks passed
@futrime
futrime deleted the build/pyright-linux-platform branch October 12, 2026 15:21
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