Skip to content

Rewrite the managed host runtime in Go - #108

Draft
adit-chandra wants to merge 2 commits into
mainfrom
adit-chandra/codex/go-host-runtime
Draft

adit-chandra wants to merge 2 commits into
mainfrom
adit-chandra/codex/go-host-runtime

Conversation

@adit-chandra

@adit-chandra adit-chandra commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Motivation

Move the installed managed host runtime to Go so enrollment, persistent state, collection, and hook supervision have explicit contracts in one compiled implementation. Generated Claude, Codex, and Cursor managed hooks no longer need to locate Python or Node. The toolchain compiler and adapter for user-authored portable Python hooks remain Python.

Changes

  • Implement desktop enrollment, host configuration, status/reset, detached hooks, trace uploads, Cursor SQLite capture, and cloud capture in host-runtime/.
  • Preserve existing credentials and state, canonical ledger keys, upload acknowledgment and rewind proofs, Cursor journal semantics, and redacted diagnostics. Keep the previous Python implementation under tests/reference_runtime solely as a frozen migration reference.
  • Package source-matched native binaries for macOS, Linux, and Windows on amd64/arm64, with validated inventories and immutable native releases. Add generated-plugin execution checks on Linux, macOS, and Windows.

Validation

All ten CI jobs passed at bb8121c52b5a9bd791a26d3807dca8ec05a98057:

  • Python suite: 1,059 tests passed on Linux/Python 3.11, plus Ruff lint/format, ty, shell syntax, and hub workflow checks. The suite includes frozen Python reference tests as well as integration tests that execute the generated Go runtime; reference tests are not native coverage.
  • Go tests and go vet passed on Linux, macOS, and Windows; race checks passed on Linux and macOS.
  • Generated Claude, Codex, and Cursor hooks executed on all three operating systems with an empty PATH and plugin paths containing spaces.
  • All six platform targets cross-compiled. The source distribution and wheel built from it were independently installed and smoke-tested with the complete native bundle.

Local macOS arm64 validation also passed the Go race tests, generated-plugin smoke, full Python suite, and independently installed wheel/source distribution smoke. Linux/Windows arm64 execution and real desktop dogfooding remain outstanding.

Rollout

Claude managed hooks use explicit Bash shell form, requiring Git Bash on Windows. Codex uses its PowerShell command override; Cursor uses a batch launcher. Windows CI executes these actual generated command forms.

After merge, the new native release workflow must publish the matching source-addressed bundle before telemetry-enabled compiler builds can resolve it without a local override. This PR does not deploy a worker or publish a toolchain release. Production worker acceptance remains separate from the local and CI checks.

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