Conversation
|
This pull request is currently a draft. Reviews will not take place until the PR is marked as ready for review. |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
eee6dc6 to
91ac39f
Compare
- LoopbackHTTPServer: send [DONE] and cancel connection in stream error catch block instead of falling through to the success trailer; OpenAI clients that ignored the error frame would otherwise see a spurious finish_reason=stop - LoopbackHTTPServer: cancel NWConnection in contentProcessed completion handler of every final send (sendJSON, sendError, stream trailers) so the read side is closed and connections do not linger - LoopbackHTTPServer: reject requests whose header bytes exceed 64 KiB before the CRLF-CRLF terminator is found, preventing unbounded buffer growth from slow or malicious senders - rest.sh: add /health smoke-test probe before /v1/models so a health route regression fails QA Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
ndizazzo
left a comment
There was a problem hiding this comment.
Needs revision. The provider process gets too much of the host environment, and the stacked branch is currently unmergeable.
Follow-ups:
- Rebase onto the rewritten base and resolve the 16 conflicting paths before asking CI for another result.
- Add CI that builds
providers/appleand runs the Swift tests. The current Apple ownership slices don't cover either one. - The exact head has no meaningful CI run; the older failed run is stale.
| .stdout(Stdio::piped()) | ||
| .stderr(Stdio::piped()) | ||
| .kill_on_drop(true); | ||
| remove_provider_secret_environment(&mut command); |
There was a problem hiding this comment.
Removing a short list of known names still gives the downloaded provider executable the rest of the host environment. Credentials such as AWS_ACCESS_KEY_ID, AWS_SESSION_TOKEN, Google/Azure keys, and organization-specific secrets remain visible. Please clear the child environment and add back a small allowlist of required non-secret variables, with tests for credential scrubbing.
|
Collapsed into #1444, which rebases the whole Apple Core AI stack onto current |
Stack
apple/systemto mesh peers or ship the provider in release products.Why
Eligible Apple silicon Macs already have a system model delivered and optimized by Apple. Supervising that model as a whole-request provider gives MeshLLM a private, zero-checkpoint-download inference path backed by Apple's native accelerator stack, without linking Foundation Models into the backend-neutral Rust host or introducing Skippy pipeline parallelism.
System-model identity
apple/systemis the rolling alias for the system model currently installed by Apple. The provider also reports Apple's documented OS-aligned generation and exposes the matching resolved route:model_version=27.0version_source=apple_os_release_bandversioned_model_id=apple/system@27.0This is not presented as an immutable checkpoint: Foundation Models exposes no public model build identifier, and MeshLLM cannot install, pin, or roll back the system model. Unknown future OS generations expose no Apple system model until Apple documents their mapping.
There is intentionally no backward-compatibility lane for unversioned Apple providers. All three fields are mandatory and must agree. The host rejects missing, unsupported, or contradictory metadata. Both
apple/systemandapple/system@27.0resolve to the same whole-model process, while the exact ID only exists for the installed generation.What changed
kind=apple,model=apple/system, protocol0.1provider.mesh-llm serveprocesses;mesh-llm clientdoes not launch a local provider./healthand/v1/modelsprobes before registeringapple/systemas an ordinary local inference target./api/runtime/processes.just apple::meshas the Golden Gate end-to-end lifecycle test and updates the design/roadmap docs.Experimental requirements
You must have macOS Golden Gate (macOS 27).
You also need:
xcode-select(Command Line Tools alone are insufficient).Confirm the toolchain:
The developer path should end in
Xcode.app/Contents/Developer(or the beta equivalent), and the SDK should be 27.x.Try it
From the repository root:
Run the complete supervised path:
This packages the sidecar, builds the normal dynamic host, starts an isolated
mesh-llm serve, waits forapple/systemon its ordinary/v1/models, checks/api/runtime/processes, forces a provider restart, runs completion/SSE/tool/cancellation probes through MeshLLM, then proves the child exits with the host.For a manual session, package and build:
Start MeshLLM with the local ad-hoc QA artifact:
MESH_LLM_APPLE_PROVIDER_ALLOW_AD_HOC=1is for local development only. Product artifacts must have a trusted signature.Confirm discovery and process ownership:
Send a completion through MeshLLM's REST API:
Exercise the deterministic tool path:
Captured Golden Gate output over MeshLLM REST
{ "status": "pass", "model": "apple/system", "versioned_model": "apple/system@27.0", "completion_content": "apple runtime REST ready", "tool_executions": [{ "name": "mesh_fixture_lookup", "arguments": {"key": "rest-demo"}, "result": "mesh-fixture-value-for-rest-demo" }], "stream_done": true, "client_disconnect_cancelled": true, "provider_reported_in_management_api": true, "provider_restarted_after_crash": true, "provider_exited_with_meshllm": true }The live management record reported
name=apple/system,instance_id=provider:apple/system,backend=apple,status=ready, andcontext_length=4096.Validation
just apple::meshjust apple::livejust apple::carriersjust with-lld cargo test -p mesh-llm-provider-runtime— 11 passedjust with-lld cargo test -p mesh-llm-host-runtime provider_supervisor --lib— 7 passedjust with-lld cargo clippy -p mesh-llm-host-runtime --lib -- -A unfulfilled-lint-expectations -D warningsjust with-lld cargo fmt --all -- --checkbash -n providers/apple/QA/mesh.sh providers/apple/QA/rest.shshellcheck providers/apple/QA/mesh.sh providers/apple/QA/rest.shgit diff --checkThe unmodified host crate currently has existing unfulfilled lint-expectation warnings, so the strict Clippy run explicitly allows only that lint while denying every other warning.
Next stack
Phase 2C will put this artifact/lifecycle behind the Rust, Swift, Node/Electron, and Kotlin/JVM SDK distribution surfaces. Phase 3 will add private-mesh advertisement, load-aware routing, failover, affinity, withdrawal, and mixed-version validation.