From /simplify codebase sweep (2026-06-10). Framed as design options -- the always-sync behaviour is a deliberate consistency guarantee (stale-lockfile protection), so this needs a decision, not a drop-in fix.
Observed (deps/bootstrap.py:573-712 maybe_bootstrap; deps/probe.py:31-90): before the sentinel re-exec, every raitap run
- composes the Hydra config (Hydra composes it again in the pipeline),
- runs
detect_hardware() -- spawns nvidia-smi, and on Windows without it a powershell Get-CimInstance Win32_VideoController query that typically takes 1-3s,
- in the dev-with-uv case unconditionally runs
uv sync and re-execs the interpreter -- even when the environment already satisfies every inferred extra.
Cost: several seconds of fixed startup latency per CLI run on an already-provisioned machine; config parsed twice.
Options (each with a counterpoint, needs discussion):
- Fast-path: check inferred extras' distributions via
importlib.metadata first; skip probe + sync + re-exec when everything is importable. Hardware probe only when an install command must be rendered. Counterpoint: loses the stale-lockfile auto-heal in dev; a lockfile-mtime check or --no-sync escape hatch could preserve it.
- Cache the hardware probe result (keyed by lockfile hash + platform) instead of skipping it.
- Minimal: keep behaviour, only deduplicate the double Hydra composition.
From /simplify codebase sweep (2026-06-10). Framed as design options -- the always-sync behaviour is a deliberate consistency guarantee (stale-lockfile protection), so this needs a decision, not a drop-in fix.
Observed (
deps/bootstrap.py:573-712maybe_bootstrap;deps/probe.py:31-90): before the sentinel re-exec, everyraitaprundetect_hardware()-- spawnsnvidia-smi, and on Windows without it apowershell Get-CimInstance Win32_VideoControllerquery that typically takes 1-3s,uv syncand re-execs the interpreter -- even when the environment already satisfies every inferred extra.Cost: several seconds of fixed startup latency per CLI run on an already-provisioned machine; config parsed twice.
Options (each with a counterpoint, needs discussion):
importlib.metadatafirst; skip probe + sync + re-exec when everything is importable. Hardware probe only when an install command must be rendered. Counterpoint: loses the stale-lockfile auto-heal in dev; a lockfile-mtime check or--no-syncescape hatch could preserve it.