Decouple Node Execution Plane to Zero-Dependency Go Daemon#11
Merged
Conversation
…nel assembly, and AVX-512 fallback support
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR transitions the Project ORCHID production node execution environment from a Python/Nuitka-based runtime to a hardened, zero-dependency Go/C execution plane, fully resolving the architectural goals in Issue #8.
By replacing the sandboxed Python control plane inside the
release-hardenedcontainer stage with a dynamically compiled Go binary (orchid-daemon), we have drastically minimized container footprint sizes, cut startup latency to under a second, and fortified the runtime sandbox security using non-privileged user executions.Closes #8
Key Changes
1. Zero-Dependency Go Daemon Execution Core (
cmd/orchid-daemon/)main.go): Replaced the legacy Python script bootloader with a native Go TCP listener on port9000to swallow JSON planning payloads directly.matmul_wrapper.go): Deployed a runtime CPUID check linking dynamically to optimized fallback scalar kernels (C-level contiguous loopI-K-Jmatrices) or native AVX-512 vector assembly.2. Multi-Stage Container Hardening (
Dockerfile)release-hardened): Completely removed Python, virtual environments, and compiler tooling. The final image builds ongcr.io/distroless/base-debian12:nonrootand houses only the staticorchid-daemonexecutable.developer): Preserved the full Python 3.10 + Astraluvenvironment for local developers to test raw Python SDK packages (orchid/) or bundle distribution wheel artifacts (make dist).Verification Logs & Proof of Correctness
1. Go Unit Tests (
go test -v ./scheduler/...)=== RUN TestBankedSchedulerTriad scheduler_test.go:129: VERIFY: Mathematical calculations are 100% identical! scheduler_test.go:130: Deterministic Serial Cycles: 4925668 scheduler_test.go:131: Deterministic Parallel Cycles: 1666401 scheduler_test.go:132: Theoretical Parallel Speedup achieved in Go: 2.956x --- PASS: TestBankedSchedulerTriad (0.03s) === RUN TestPhysicalNUMAAllocation --- PASS: TestPhysicalNUMAAllocation (0.00s) PASS ok ORCHID/scheduler (cached)2. Go Native Diagnostics Sweep (
./build/orchid-daemon --mode all)3. Hardened Docker Run (
docker run --rm orchid-production:latest)Successfully boots in <0.1s and reproduces timing traces and cycle calculations inside the container environment.