"Script surface audit and Vox migration"

Script surface audit and Vox migration

This document is the SSOT for tracked .py, .ps1, and .sh scripts: purpose, essentiality, replacement vox commands, capability gaps, and migration phases.
Policy for thin CI wrappers: scripts/README.md, runner contract docs/src/ci/runner-contract.md, machine inventory docs/agents/script-registry.json.

Canonical inventory (git-tracked)

PathOwner category
crates/vox-compiler/src/typeck/checker.pyRemoved (empty; real checker is Rust typeck/checker/).
patches/aegis-0.9.8/src/test-vectors/gen.pyVendor patch maintenance
scripts/extract_mcp_tool_registry.pyLegacy migration recovery (gated)
infra/containers/entrypoints/populi-entrypoint.shRuntime boundary (container)
infra/containers/entrypoints/vox-entrypoint.shRuntime boundary (container)
scripts/check_codex_ssot.ps1CI guard wrapper
scripts/check_codex_ssot.ps1CI guard wrapper
scripts/check_cuda_feature_builds.shCI guard wrapper
scripts/check_docs_ssot.ps1CI guard wrapper
scripts/check_docs_ssot.shCI guard wrapper
scripts/check_vox_cli_feature_matrix.shCI guard wrapper
scripts/check_vox_cli_no_vox_orchestrator.shCI guard wrapper
scripts/install.ps1Bootstrap
scripts/install.shBootstrap
scripts/mens_release_gate.ps1Mens gate wrapper
scripts/mens_release_gate.shMens gate wrapper
scripts/mens/release_training_gate.ps1Legacy gate forwarder
scripts/mens/release_training_gate.shLegacy gate forwarder
scripts/populi/cursor_background_cuda_build.ps1Local dev helper
scripts/populi/cursor_background_cuda_build_detached.ps1Local dev helper
scripts/populi/cursor_background_train_example.ps1Local dev helper
scripts/populi/dogfood_qlora_cuda.ps1Operator preset
scripts/populi/mens_gate_safe.ps1Essential (Windows gate isolation)
scripts/populi/release_ci_full_gate.ps1Gate wrapper
scripts/populi/release_training_gate.ps1Gate wrapper
scripts/populi/release_training_gate.shGate wrapper
scripts/populi/vox_continuous_trainer.ps1Legacy orchestration
scripts/quality/toestub_scoped.shCI guard wrapper
scripts/run_mens_pipeline.ps1Local dev helper
scripts/run_qwen35_qlora_real_4080.ps1Operator preset (Qwen 3.5 SSOT; run_qwen25_* is deprecated shim)
scripts/telemetry_watch.ps1Local dev UX
scripts/toestub_self_apply.ps1Quality helper
scripts/toestub_self_apply.shQuality helper
scripts/verify_workspace_manifest.shCI guard wrapper
scripts/windows/ensure_cuda_path.ps1Removed (Lifted to vox doctor --fix-cuda-path)
scripts/windows/run_4080_experiment_cycles.ps1Operator batch recipe
scripts/windows/stop_stuck_cargo_tests.ps1Removed (Lifted to vox ci kill-stuck-tests)
tools/jj-checkpoint.ps1VCS helper (Jujutsu)

Essentiality and justification

Essential (keep; not substitutable by Vox-the-language)

ScriptRole
scripts/install.sh / install.ps1Chicken-and-egg bootstrap: download/verify vox-bootstrap, no vox on PATH yet.
scripts/populi/mens_gate_safe.ps1Until lifted into Rust: isolated CARGO_TARGET_DIR, temp vox.exe, -Detach, log tee — Windows file-lock / agent timeouts.
infra/containers/entrypoints/vox-entrypoint.shPID1 sidecar: background populi serve + exec main (container semantics).
infra/containers/entrypoints/populi-entrypoint.shCloud train/serve/agent dispatch: curl, HF CLI, traps — runtime boundary (see gaps below).

Useful but replaceable

  • CI shims (check_*, verify_workspace_manifest, toestub_scoped, gate one-liners): canonical behavior is vox ci …; scripts exist for cargo run -p vox-cli ergonomics only.
  • run_mens_pipeline.ps1, run_qwen35_qlora_real_4080.ps1, dogfood_qlora_cuda.ps1: operator presets over vox mens train / cargo vox-cuda-release.
  • cursor_background_*.ps1, telemetry_watch.ps1: IDE/logging UX; could become one vox subcommand each if pain remains high.

Legacy or cleanup

  • vox_continuous_trainer.ps1: hard-coded build_vox.bat, loop — superseded by vox mens corpus … + vox mens pipeline; retain only if actively used, else archive.
  • toestub_self_apply.*: prefer vox ci toestub-scoped with explicit root and CI-aligned flags.
  • extract_mcp_tool_registry.py: legacy migration tool, disabled by default (VOX_ALLOW_LEGACY_MCP_EXTRACT=1 + --allow-legacy); SSOT is YAML + vox-mcp-registry/build.rs (see docs/src/reference/mcp-tool-registry-contract.md).
  • patches/.../gen.py: Aegis vector regen only when updating the vendored patch.

Map to Vox (duplicate vs gap)

Fully duplicated by vox ci (or vox mens surface)

Script patternCanonical command
check_docs_ssot.*vox ci check-docs-ssot
check_codex_ssot.ps1vox ci check-codex-ssot
verify_workspace_manifest.shvox ci manifest
check_vox_cli_feature_matrix.shvox ci feature-matrix
check_vox_cli_no_vox_orchestrator.shvox ci no-vox-orchestrator-import
check_cuda_feature_builds.shvox ci cuda-features
quality/toestub_scoped.shvox ci toestub-scoped [ROOT]
mens_release_gate.*, populi/release_*_gate.*, mens/release_*`vox ci mens-gate --profile training
run_mens_pipeline.ps1vox mens pipeline …

Vox language note: These are host CLI capabilities (Rust vox-cli), not features of the .vox language. A future “Vox scripts” layer should call the same primitives via a small host ABI (see Boundary policy).

Partially duplicated (orchestration / UX gap)

NeedTodayGap
Windows-safe mens gatemens_gate_safe.ps1Done in Rust: vox ci mens-gate --windows-isolated-runner (+ --gate-build-target-dir, --gate-log-file). PS1 is thin delegate + -Detach only.
Live training tailstelemetry_watch.ps1Done: vox mens watch-telemetry (alias watch; default 3s poll). PS1 delegates.
CUDA release build + logcursor_background_cuda_build*.ps1Done: vox ci cuda-release-build (tee under mens/runs/logs); PS1 delegates.
Full-repo TOESTUBtoestub_self_apply.*Done: vox ci toestub-self-apply; shell scripts delegate.
Cloud container trainpopuli-entrypoint.shTrain: vox mens train. Serve: vox mens serve + vox-schola copied in infra/containers/Dockerfile.populi. Agent: still explicit unsupported in entrypoint (use cloud dispatch).

Not a Vox-language duplicate (keep at boundary)

  • OS env mutation (vox doctor --fix-cuda-path).
  • Process kill (vox ci kill-stuck-tests).
  • JJ workflow (tools/jj-checkpoint.ps1).
  • Vendor crypto vector gen (patch gen.py).

Ranked capability gaps (low K-complexity first)

  1. Lift Windows mens-gate workaround into Rust — shipped: --windows-isolated-runner / --gate-log-file / --gate-build-target-dir.
  2. vox mens watch-telemetry — shipped (alias watch).
  3. TOESTUB self-apply — shipped: vox ci toestub-self-apply.
  4. Docker entrypoint — train + serve paths updated in docker/populi-entrypoint.sh + Dockerfile.populi (vox-schola CPU build in slim builder). Agent still unsupported in-container (cloud dispatch).
  5. Bootstrap remains vox-bootstrap — do not grow compiler “standard library” for HTTPS install.

Administrative OS mutations

Administrative OS tasks are implemented as native vox CLI primitives rather than shell scripts or language built-ins, preserving boundary security and eliminating "blue code" (PowerShell dependency).

  • vox doctor --fix-cuda-path
  • vox ci kill-stuck-tests

Phase 1 cleanups (done)

Phase 2 (implemented in vox-cli)

vox ci mens-gate (Windows)

  • --windows-isolated-runnercargo build -p vox-cli to OS temp …/vox-targets/<repo-hash>/mens-gate-safe by default (or --gate-build-target-dir), copy vox.exe to %TEMP%, set VOX_MENS_GATE_INNER=1, re-run gate steps (see matrix.rs).
  • --gate-log-file <path> — tee child stdout/stderr (isolated runner only).
  • Detach for IDE timeouts remains in scripts/populi/mens_gate_safe.ps1 (Start-Process); non-detach path calls vox with the flags above.

vox mens watch-telemetry (alias watch)

  • Default paths { target/dogfood/train.err.log, target/dogfood/telemetry.jsonl; --interval-ms (default 3000).
  • See watch_telemetry.rs.

vox ci cuda-release-build

vox ci toestub-self-apply

  • Release-builds vox-toestub then runs full-repo toestub binary (replaces ad-hoc cargo-only scripts).

Boundary policy (keep vs migrate)

LayerOwnsDo not move into Vox language core
Bootstrapvox-bootstrap, install.*HTTPS, manifest parse, archive extract
CLIvox, vox ci, vox mens, vox scholaPolicy guards, nested cargo, training orchestration
Container / OSentrypoints, ensure_cuda_path, stuck-test killerPID1, curl provider APIs, registry env writes
Future Vox scripts.vox + hostNarrow host::* ABI: process, env, fs, optional gated http_fetchdeny-by-default in sandbox

Goal: one Rust CLI + minimal POSIX glue where the OS requires it — not a POSIX shell inside the language.

Acceptance metrics

MetricTarget
Wrapper script reduction50% of scripts/check_*.sh / twin .ps1 removable from default docs/CI once callers use vox ci … directly
Canonical command parityEvery non-essential script row in script-registry.json has replacement = single vox … or vox-bootstrap line
Workflow stabilityNo CI job regression: same profiles for mens-gate, SSOT checks, manifest, feature matrix
Docker trainVOX_JOB_KIND=train invokes vox mens train with HF data dir and output dir
Dead pathsZero empty or misleading “checker” files next to Rust modules

Maintenance: When adding scripts, update docs/agents/script-registry.json and this inventory table in the same PR.