Skip to content

model_registry's own storage root and forge's managed venv resolve through paths; hand-built homes 98 -> 92 (card 20b4f33b) - #5261

Merged
joelteply merged 6 commits into
canaryfrom
20b4f33b/model-registry-s-own-storage-root-and-fo
Oct 22, 2026
Merged

joelteply merged 6 commits into
canaryfrom
20b4f33b/model-registry-s-own-storage-root-and-fo

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

Plan line 7. model_registry/artifacts.rs had its own copy of two decisions that paths owns:

  • storage_root() re-implemented paths::configured_storage_root (CONTINUUM_STORAGE_PATH from
    the environment, then a hand-parsed ~/.continuum/config.env), and fell back to
    /tmp/.continuum when there was no home. It's now configured_storage_root(), else
    continuum_home(), and None with neither: no guessed /tmp.
  • local_model_roots() hand-built ~/.continuum/genome/models next to the storage tier's. It's
    now the home's and the configured tier's, deduplicated.
  • device_fit_cache_dir() returns Option. resolve_device_fit_override already returned
    Option, so it uses ?. serving_daemon/tick.rs reads None as "no cached tiers", the same
    result the nonexistent /tmp path gave, so the division actuator is still built.

modules/forge/forge_module.rs: resolve_mlx_python and the mlx dataset dir resolve through
paths::continuum_home (HOME by env var before). The forge adapter output dir and the
adapter manifest hold state and stay for card 7df698b1. With CONTINUUM_HOME and
CONTINUUM_STORAGE_PATH unset every path is unchanged.

Test: mlx_python_defaults_to_managed_venv_not_unsloth asserted the literal
".continuum/genome/venv". Under test the home is the per-process temp home, so it now
asserts the resolved path equals continuum_home()/genome/venv/bin/python3 (still never
.unsloth).

BASELINE_HAND_BUILT_HOMES 98 -> 92, counted by the ratchet's own pattern over the two
files (4 + 2 joins removed). Not measured locally: this is a serving node, so no cargo
here; CI's ratchet, which fails both ways, is the measurement.

Co-Authored-By: Claude Opus 5.5 (1M context) [email protected]
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE

…rough paths; hand-built homes 98 -> 92 (card 20b4f33b)

Plan line 7. model_registry/artifacts.rs had its own copy of two decisions that paths owns:
- storage_root() re-implemented paths::configured_storage_root (CONTINUUM_STORAGE_PATH from
  the environment, then a hand-parsed ~/.continuum/config.env), and fell back to
  /tmp/.continuum when there was no home. It's now configured_storage_root(), else
  continuum_home(), and None with neither: no guessed /tmp.
- local_model_roots() hand-built ~/.continuum/genome/models next to the storage tier's. It's
  now the home's and the configured tier's, deduplicated.
- device_fit_cache_dir() returns Option. resolve_device_fit_override already returned
  Option, so it uses `?`. serving_daemon/tick.rs reads None as "no cached tiers", the same
  result the nonexistent /tmp path gave, so the division actuator is still built.

modules/forge/forge_module.rs: resolve_mlx_python and the mlx dataset dir resolve through
paths::continuum_home (HOME by env var before). The forge adapter output dir and the
adapter manifest hold state and stay for card 7df698b1. With CONTINUUM_HOME and
CONTINUUM_STORAGE_PATH unset every path is unchanged.

Test: mlx_python_defaults_to_managed_venv_not_unsloth asserted the literal
".continuum/genome/venv". Under test the home is the per-process temp home, so it now
asserts the resolved path equals continuum_home()/genome/venv/bin/python3 (still never
.unsloth).

BASELINE_HAND_BUILT_HOMES 98 -> 92, counted by the ratchet's own pattern over the two
files (4 + 2 joins removed). Not measured locally: this is a serving node, so no cargo
here; CI's ratchet, which fails both ways, is the measurement.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
joelteply and others added 3 commits October 21, 2026 18:14
…lers stop spelling paths (card 20b4f33b)

paths::continuum_home owns WHERE the home is. Nothing owned WHAT is under it: every caller
spelled its own subdirectory ("genome/venv/bin/python3", "datasets", "genome/models",
"progress/teach", "tools/cuda-training"). My own #5258 and this PR added two more spellings
of the datasets root, beside modules::dataset::default_datasets_root, which already owned it.

- paths/layout.rs: ContinuumLayout { root }, with home() (via continuum_home), at(root) (a
  storage tier or test dir laid out the same way), home_or_unrooted() (the one no-home
  decision for lookups of possibly-absent things, written once instead of at three call
  sites), and datasets(), genome(), genome_models(), genome_venv_python(), progress(),
  tools().
- default_datasets_root() delegates to the layout. genome/teach and forge's mlx split call
  that owner instead of re-joining "datasets".
- local_model_roots(): the home and the configured storage tier are two layouts, each
  asked for genome_models().
- The genome sites from #5258 (cuda tools, mlx-q4 cache, engine footprints, teach run
  ledgers) and forge's venv python ask the layout.

Paths are unchanged: every method returns the string its callers built. Left for their
owners: floor_fetch's models dir (saved state, card 7df698b1), disk_reporters' tracked
genome-models row (system_resources), and mlx_lora_adapter's venv line (Fable's open #5215
rewrites it; it can call genome_venv_python() there).

Not compiled here (serving node); CI compiles. The unwrap ratchet moves (three call-site
fallbacks become one); the baseline follows CI's measured number.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
…ard 20b4f33b)

The layout's home_or_unrooted() owns the no-home fallback that three call sites spelled;
the hygiene job at a9facc2 reported 'BASELINE_UNJUSTIFIED fell to 2356'.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
…5261; card 20b4f33b)

Codex: home_or_unrooted() said a relative candidate is "refused by the caller's existence
check", but an existing cwd-relative genome/venv/bin/python3 passes it. That was a
fallback dressed as a refusal, and it was already present before this PR (HOME unset ->
relative path). It's removed. Each caller now types "no home":
- cuda_lora_adapter: python is Option<PathBuf> (override, else <home>/tools/cuda-training).
  With neither, start() fails naming CUDA_TRAIN_PYTHON and the missing home.
- forge resolve_mlx_python() -> Result<PathBuf, String>: MLX_PYTHON, else
  <home>/genome/venv. With neither, the train command fails naming both.
- mlx_lora_adapter: the local q4 conversion is looked up only under a resolved home;
  without one it trains against the id as given (the existing no-q4 path).
- Footprints.path is Option<PathBuf>, with Footprints::unrecorded() for no home: reads are
  empty and records are skipped, so every shape re-measures. Before, a missing home wrote
  engine-footprints.json into the working directory.

ContinuumLayout keeps home() and at(): the layout never invents a root.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
@github-actions github-actions Bot added size: L and removed size: M labels Oct 21, 2026
joelteply and others added 2 commits October 21, 2026 18:26
…odex on #5261; card 20b4f33b)

A record succeeds and keeps nothing (get None, read_all empty), the store has no path,
and its per-engine view stays unrecorded. Before the typed absence a missing home
resolved to a cwd-relative engine-footprints.json and wrote it there.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
@joelteply
joelteply merged commit a27e155 into canary Oct 22, 2026
9 checks passed
@joelteply
joelteply deleted the 20b4f33b/model-registry-s-own-storage-root-and-fo branch October 22, 2026 00:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant