Skip to content

fix(core): compile continuum-core on windows-msvc — substrate portability foundation - #1980

Merged
joelteply merged 1 commit into
canaryfrom
fix/windows-portability-foundation
Jul 24, 2026
Merged

joelteply merged 1 commit into
canaryfrom
fix/windows-portability-foundation

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

Windows-portability cfg-gates + build flags ONLY (14 files, no install modules, no serving features) so EVERY branch builds windows-msvc from canary on. /MT crt-static (livekit LNK2038), jemalloc gated off msvc, CMP0091 in llama build.rs, cfg(unix)/cfg(windows) branches for libc kill/setsid, UnixStream (TCP-loopback primary IPC on Windows), sentinel/disk_eviction/logging gates — unix paths byte-unchanged.

Validated: builds /MT + CUDA on a live RTX 5090 (7m16s, continuum-core-server + cu) by BigMama; mac cargo check GREEN (metal,accelerate) by M5. Review nit (non-blocking, follow-up welcome): tasklist-based is_alive uses substring pid matching — pid 123 matches 1234's row; should match the exact quoted CSV field. Present in both lane_process.rs and bin/cu.rs (also a dedup candidate).

Authored by BigMama (Opus) on the 5090; reviewed + mac-gated by M5 (Fable).

🤖 Generated with Claude Code

https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

…lity, no features

Platform deltas live in cfg-gates, not in feature branches
([[platform-deltas-live-in-adapters]]). These are the MINIMAL changes that make
`cargo build -p continuum-core` succeed on windows-msvc — cfg-gates for unix-only
APIs + build flags — so EVERY branch builds Windows from canary on, instead of
each feature branch re-discovering the same breakage (BigMama 2026-07-24: two
large branches both stalled on this). No install modules, no serving features —
those layer on top.

Build flags:
- .cargo/config.toml: +crt-static on x86_64-pc-windows-msvc -> /MT, to match
  livekit's prebuilt /MT libwebrtc (a /MD object is a hard LNK2038).
- core/llama/build.rs: honor crt-static via CMAKE_MSVC_RUNTIME_LIBRARY (CMP0091),
  + .layout_tests(false) so bindgen struct-size asserts don't vary by libclang.
- core/continuum-core/Cargo.toml: tikv-jemallocator moved under
  [target.'cfg(not(target_env = "msvc"))'] — jemalloc-sys's autotools configure
  can't build on windows-msvc; Windows uses the system allocator.

cfg-gates (unix APIs -> conditional, unix path unchanged):
- main.rs: #[global_allocator] jemalloc gated off msvc; cross-platform shutdown
  (unix SIGTERM/SIGINT, windows ctrl handlers).
- bin/cu.rs: process mgmt — cfg(unix) libc::kill/setsid vs cfg(windows) taskkill.
- runtime/core_ipc_transport.rs: cfg(windows) TCP-loopback vs unix-domain socket.
- ipc/mod.rs, inference/lane_process.rs, runtime/command_executor.rs,
  live/transport/bridge_client.rs, logging/client.rs, modules/sentinel/{executor,mod}.rs,
  system_resources/disk_eviction.rs: gate os::unix / UnixStream / libc::* usage.

Proven on a live RTX 5090: continuum-core-server + cu build /MT with cuda. Unix
paths are the unchanged cfg(unix)/else branches — Linux/macOS CI must stay green.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Q4NU4VNiELPQfBpCacDZGc
@joelteply
joelteply merged commit 52aaab7 into canary Jul 24, 2026
3 of 4 checks passed
@joelteply
joelteply deleted the fix/windows-portability-foundation branch July 24, 2026 20:46
joelteply added a commit that referenced this pull request Jul 25, 2026
… code (CI red, card 0e62aca2) (#1981)

* fix(test): tool-surface test pins the amputation-cliff ABSENCE — align canary's test with its own code (#206 fix)

The #1976 squash brought the code that removed the tight-window tool-surface
amputation (the discovery-pair cliff that stranded native-tool models in a
commands/help loop, glass-boxed #206) but NOT the test update — so canary's
test still asserts the cliff and fails deterministically (the CI red that
confounded PR #1980, proven pre-existing on parent d15e46a). Test-only:
window fixture 4096→8192 (tight-but-servable) and the assert now requires the
UN-amputated surface (list_commands/help/edit_file/bash/grep all present).
Both cognition tests green on this base. Card 0e62aca2.

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* fix(test): inflight-gauge baseline drains cross-module guards — the CI-only flake (canary red, second half)

TEST_SERIAL only serializes THIS module's tests, but the gauge is
process-global: any test elsewhere walking the admission path holds an
InflightModelCall guard for a moment, and CI's scheduling overlaps it with the
baseline read (deterministic-local, flaky-CI — failed twice in CI, passed on
two dev machines). Bounded drain-wait before the baseline: transient guards
drop in microseconds; a real leak still fails loudly with the count named.

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

---------

Co-authored-by: Claude Fable 5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant