Repository navigation
refactor(paths): centralize server process PATH policy - #1221
Merged
Merged
Conversation
joelteply
pushed a commit
that referenced
this pull request
May 14, 2026
… HOME-unset surfaces as Unsupported Two non-blocking review nits from sibling on PR #1229: 1. **HOME-unset diagnostics**: previous shape used unwrap_or_else(|_| /) which silently returned the wrong path /Library/... when HOME is unset, then surfaced as NotFound. New shape returns Unsupported with reason '/Users/joelteply env var not set' — distinct from 'platform not supported' (macOS IS supported, the host is just misconfigured) and from 'file not present' (the path can't even be resolved). 2. **paths::docker policy module**: extracted the Docker-related path resolution into a dedicated paths::docker module mirroring codex's ProcessPathPolicy.ts pattern (#1221). The probe (modules::docker_tier) asks 'go stat this known path'; the policy (paths::docker) answers 'what IS the known path on this OS'. Separating them means future consumers (cap-on-install logic in #1222 PR-2 that touches Docker settings.json) don't have to import the probe just to know paths. ## New module shape src/workers/continuum-core/src/paths/ mod.rs — module index + the 'why this exists' rationale docker.rs — DockerRawPath enum + raw_image_path() resolver DockerRawPath is a total enum (Resolved / HomeUnset / Unsupported(os)) so callers handle every case exhaustively. Same shape rule as DockerTierProbe + AnalysisError — typed at the boundary. ## Tests paths::docker: - raw_image_path_never_panics — total-shape contract - macos_with_home_resolves_to_docker_raw — cfg(macos), asserts the happy path produces a path ending in Docker.raw under com.docker.docker modules::docker_tier: - All 5 tests still pass (probe_never_panics, serde round-trip, not_found diagnostics, macOS detect-or-not-found, ts-rs binding) Total 7 tests pass. Clippy stays at baseline 162. ## Why this matters for the umbrella The 'policy lives once' rule from Joel directive 18:40 ('we code concurrency ONCE then incorporate it') extends to path resolution. paths::docker is the Rust analog of codex's ProcessPathPolicy.ts: any 'where does X live on disk' question gets one answer in one place. Future tiers (HF cache, NVMe pool) slot in as paths::hf_cache, paths::nvme_pool — same shape, no inline path strings scattered across modules. Refs #1222, addresses sibling review nits 1+2 on PR #1229.
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.
Summary
Validation
Refs #1212.