Skip to content

Enforce Linux-only compilation and remove platform fallbacks - #1676

Merged
JacobStephens2 merged 2 commits into
issue-1665from
issue-1667
Oct 30, 2026
Merged

JacobStephens2 merged 2 commits into
issue-1665from
issue-1667

Conversation

@JacobStephens2

@JacobStephens2 JacobStephens2 commented Oct 30, 2026 •

Copy link
Copy Markdown
Owner

Summary

Closes #1667. Builds now require Linux and explain Lima with Ubuntu 24.04 on macOS and WSL2 on Windows.

- Linux/macOS implementations and platform-gated tests
+ Linux /proc, pidfd, O_PATH and systemd implementations
+ unconditional Linux tests
+ crate-root compile_error! for other operating systems

Evidence

  • Before: the crate-root prelude accepted macOS and Windows compilation targets without platform guidance.
    After: compiling that prelude in isolation with rustc --emit=metadata accepts Linux and rejects x86_64-apple-darwin and x86_64-pc-windows-gnu with the required Linux/Lima/WSL2 diagnostic.
  • Before: the Spec review's exact not(unix) scan failed on three remaining fallbacks.
    After: all three are removed and the same scan passes.
  • cargo fmt --check and cargo clippy --all-targets -- -D warnings pass.
  • scripts/affected-tests main passed its 61 site checks, binary build and 126 Console browser checks locally. Local setup needed the existing user-cache Chromium installation and Python 3.11 on PATH: the default Python 3.9 lacks tomllib. The exact previously failing cargo test --test bug_origins settlement::historical_review_and_reclosed_origin_regressions -- --exact passes with Python 3.11. The runner used PLAYWRIGHT_BROWSERS_PATH=/home/jstephens/.cache/ms-playwright and RUST_TEST_THREADS=3.
  • The full Linux unit and integration suite passed cargo nextest run in CI on the exact reviewed head, 2c57888e. Following docs/testing.md's CI-reuse rule, the duplicate local cargo test rerun was stopped once that result was confirmed; the affected-check script did not finish locally. The earlier local unit run passed 1,621 tests, and focused Base fix, Setup, Spec run and Stop runs passed 153 tests.

Retained Spec regression check (exit 1 before the fix, exit 0 after):

if rg -n '#\[cfg\(not\(unix\)\)\]' src; then exit 1; fi

Seams under test

  • Compiler diagnostics for supported and unsupported targets.
  • Existing Stop/process identity, Console live exits and installation, Setup sandbox, Factory skills, child Ticket run/Base fix, and scoped Trial/Grader tests.

Review

Independent thirdshift-code-review Standards and Spec reviews compare against issue-1665, pinned to fetched commit b34f44b30a27fbe56be31be91988198167223dee. Standards: 0 findings. Spec: 1 P2 finding, fixed after executing its failing command. Both reviewers inspected all 37 changed files, including the follow-up changes. No changed files were left unread; there are no generated-output exclusions.

Security review used thirdshift-security-audit in guidance mode in one session, covering the pinned diff and supporting Stop/process identity, Console, Factory skill linking, child-run, Setup sandbox and Trial/Grader scope code. Reviewed the relevant attack-class guidance and the documented sandbox/memory contracts. No introduced security findings were identified: the Linux paths retain their existing identity checks, descriptor ownership, no-follow directory access and resource-scope behavior. No code changes or proof-of-concept tests were needed. Reused the successful CI for exact HEAD 2c57888e under docs/testing.md; no duplicate full-suite run was started. This was a review of the change, not a full-codebase audit.

Unaddressed findings

  • Standards: none.
  • Spec: none.
  • Security: none.

Security review outcome

No unaddressed introduced findings.

Merge Danger

Door: two-way

Revert restores the former platform branches. Linux behavior is preserved; native non-Linux compilation is deliberately rejected.

Blast Radius: platform

Built with codex codex-cli 0.166.0 · gpt-6.1-sol · xhigh

@JacobStephens2
JacobStephens2 marked this pull request as ready for review October 30, 2026 20:55
@JacobStephens2
JacobStephens2 merged commit b534fbc into issue-1665 Oct 30, 2026
16 checks passed
@JacobStephens2
JacobStephens2 deleted the issue-1667 branch October 30, 2026 20:58
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