Skip to content

dev: fix macOS quick-start, CORS pit, and runtime template ergonomics#5

Merged
cspinetta merged 1 commit intomainfrom
dev/macos-quickstart-and-runtime-ergonomics
Apr 18, 2026
Merged

dev: fix macOS quick-start, CORS pit, and runtime template ergonomics#5
cspinetta merged 1 commit intomainfrom
dev/macos-quickstart-and-runtime-ergonomics

Conversation

@cspinetta
Copy link
Copy Markdown
Member

Summary

Set of small dev-UX and correctness fixes discovered while walking through the void-control quick-start end-to-end on macOS (Apple Silicon, VZ backend, claude-personal). No behavior change to the control-plane contract; additions are opt-in or fix existing drift.

Type of Change

  • Bug fix
  • Documentation update
  • Test addition or update
  • Dev UX / tooling

Related Issues

Fixes #
Related to #

Changes

  • README / examples/README — replace Linux-only absolute paths with a <workspace> sibling-layout prerequisite; add a macOS section covering VOID_BOX_KERNEL / VOID_BOX_INITRAMFS and the macOS-specific void-box-claude.cpio.gz initramfs filename.
  • README UI instructions — drop VITE_VOID_BOX_BASE_URL for local dev so the existing Vite /api proxy is used. void-box serves no CORS headers; setting the env var puts the browser in the CORS pit. Bridge (VITE_VOID_CONTROL_BASE_URL) still works direct since it sets CORS.
  • README + CLAUDE.md — drop the two-tier cargo test story. Every test target is #[cfg(feature = "serde")]-gated today, so bare cargo test runs zero tests. Document cargo test --features serde as the single validation path.
  • src/bridge.rscreate_dir_all spec_dir and execution_dir at bridge startup. Prevents the worker from logging "bridge worker tick failed: No such file or directory" twice a second on a fresh machine where /tmp/void-control/{specs,executions} does not yet exist.
  • src/runtime/mod.rs — new VOID_CONTROL_LLM_PROVIDER env var. When set, patches llm.provider on every candidate's runtime template at launch. Lets local developers opt into claude-personal without editing tracked templates. Per-candidate variation.explicit[].overrides still take precedence over this default.
  • tests/void_box_contract.rs — rename the step from produce to main in the four StructuredOutput* fallback fixtures. void-box fills in an artifact's stage from the emitting step, so asserting stage == "main" against a step named produce was drift. Renaming keeps the fixture consistent with the /stages/main/output-file retrieval path.
  • RunsList.tsx — dedup rendered items by kind:id before rendering. A run can briefly appear in both the active and terminal slices during a state transition, which produced duplicate React keys.
  • AGENTS.md / CLAUDE.md — apply the void-box routing pattern. General development guidelines (architecture, commands, env vars) consolidate in AGENTS.md; CLAUDE.md slims to a short routing file with Claude-specific guidance (plan-first, LSP preference, boundary discipline, browser-MCP for UI). AGENTS.md gains a new "Environment variables" section covering VOID_BOX_BASE_URL, VOID_CONTROL_LLM_PROVIDER, the VITE_* URLs (with the CORS caveat), and the existing contract-test fixture overrides.
  • .gitignore / tsbuildinfo — flip the .claude/ rules so contributors can freely add files under .claude/; the only exclusion is .claude/scheduled_tasks.lock (Claude Code's per-machine local scheduler state). Broaden local-only scratch to *.local.* (covers *.local.md, *.local.yaml, etc. anywhere in the tree), replacing the narrower CLAUDE.local.md / examples/**/*.local.yaml pair. Add **/*.tsbuildinfo and stop tracking web/void-control-ux/tsconfig.app.tsbuildinfo via git rm --cached — TypeScript's per-machine tsc -b incremental build cache was tracked by accident and produced a noisy diff on every local build.
  • .github/PULL_REQUEST_TEMPLATE.md — repo had no template; adds a short one aligned with the existing test / docs / skills layout.

Test Plan

  • cargo test --features serde — 52 passed
  • cargo clippy --features serde --all-targets -- -D warnings — clean
  • cargo fmt --all -- --check — clean
  • Web UI typecheck (cd web/void-control-ux && npx tsc -b --noEmit) — clean
  • Manual: ran examples/swarm-transform-optimization-3way.yaml end-to-end on macOS with claude-personal after all fixes + the paired void-box OCI fix; swarm completed and metrics were collected from measured benchmark output.

Commands run

```bash
cargo fmt --all -- --check
cargo clippy --features serde --all-targets -- -D warnings
cargo test --features serde
cd web/void-control-ux && npx tsc -b --noEmit
```

Documentation

  • Updated README.md and CLAUDE.md
  • Updated examples/README.md
  • No spec change
  • No skill change

Compatibility

No contract change. VOID_CONTROL_LLM_PROVIDER is opt-in; unset behavior is unchanged from today. Depends on the paired void-box PR (fix: mount OCI rootfs on macOS/VZ + reconcile orphan runs) for end-to-end validation of sandbox.image-based specs on macOS; for Linux-only validation the two PRs are independent.

Notes for Reviewers

  • Replace <workspace> in the rewritten examples/README.md prereqs with whatever placeholder convention you prefer if this form is unconventional for the project.
  • The contract-test fixture rename also fixes the manifest_lists_named_artifacts live gate that was drifting. The malformed_result_json_is_typed_failure case still depends on void-box returning a typed error body for malformed result.json; that is a separate void-box behavior to verify after rebuilding the initramfs with the paired PR.

- docs: add macOS quick-start, drop Linux-only paths, drop the fake
  non-serde test tier, stop pointing the dev UI at void-box cross-origin.
- AGENTS.md: consolidate environment variables (adds VOID_CONTROL_LLM_PROVIDER
  and the VITE_* / VOID_BOX_BASE_URL docs); CLAUDE.md slimmed to a
  routing file matching void-box's pattern.
- bridge.rs: create_dir_all spec_dir + execution_dir at startup.
- runtime/mod.rs: VOID_CONTROL_LLM_PROVIDER env patches llm.provider on
  every candidate at launch; per-candidate overrides still win.
- contract tests: rename step `produce` -> `main` in the
  StructuredOutput* fixtures to fix stage-name drift.
- RunsList.tsx: dedup items by kind:id to stop duplicate React keys.
- .gitignore: ignore *.local.md, examples/**/*.local.yaml, and
  **/*.tsbuildinfo; untrack the stray tsbuildinfo copy.
- .github: add PR template (repo had none).
@cspinetta cspinetta merged commit c348eb3 into main Apr 18, 2026
6 checks passed
@cspinetta cspinetta deleted the dev/macos-quickstart-and-runtime-ergonomics branch April 18, 2026 15:49
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