Skip to content

Genome's derivable paths resolve through paths::continuum_home; hand-built homes 103 -> 98 (card 26d0c110) - #5258

Merged
joelteply merged 1 commit into
canaryfrom
26d0c110/genome-s-derivable-paths-resolve-through
Oct 21, 2026
Merged

joelteply merged 1 commit into
canaryfrom
26d0c110/genome-s-derivable-paths-resolve-through

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

Plan line 7, in genome/training (my area in the phase-1 owner split). Five hand-built
~/.continuum joins that hold only derivable data now resolve through
crate::paths::continuum_home(), the one owner that honours $CONTINUUM_HOME and gives a
test binary its own temp home:

  • genome/fine_tuning/cuda_lora_adapter.rs: the CUDA training toolchain (tools/cuda-training)
  • genome/fine_tuning/mlx_lora_adapter.rs: the mlx-q4 conversion cache (genome/models/mlx-q4)
  • genome/fine_tuning/engine_lora_adapter/train_status.rs: engine footprints (re-measured if absent)
  • commands/genome/teach.rs: teach's default datasets root (was $HOME by env var)
  • commands/genome/teach/progress.rs: teach run ledgers (progress/teach/.json)

With CONTINUUM_HOME unset the path is unchanged (~/.continuum/...). Each missing-home
branch keeps its behaviour: the empty or "." relative candidate, or the Internal error
naming the datasets root. The four genome sites that hold saved state (jobs ledger, job dir,
fitness ledger, gene trials) stay put; they need card 7df698b1's migration design, not a
respelling. No test reads these paths (git grep at canary 46633c0).

source-hygiene 43/43 on IntelMac with BASELINE_HAND_BUILT_HOMES lowered to the measured 98.
The ratchet fails both ways, so 98 is the count. Not compiled here (serving node); CI compiles.

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

…built homes 103 -> 98 (card 26d0c110)

Plan line 7, in genome/training (my area in the phase-1 owner split). Five hand-built
~/.continuum joins that hold only derivable data now resolve through
crate::paths::continuum_home(), the one owner that honours $CONTINUUM_HOME and gives a
test binary its own temp home:
- genome/fine_tuning/cuda_lora_adapter.rs: the CUDA training toolchain (tools/cuda-training)
- genome/fine_tuning/mlx_lora_adapter.rs: the mlx-q4 conversion cache (genome/models/mlx-q4)
- genome/fine_tuning/engine_lora_adapter/train_status.rs: engine footprints (re-measured if absent)
- commands/genome/teach.rs: teach's default datasets root (was $HOME by env var)
- commands/genome/teach/progress.rs: teach run ledgers (progress/teach/<run>.json)

With CONTINUUM_HOME unset the path is unchanged (~/.continuum/...). Each missing-home
branch keeps its behaviour: the empty or "." relative candidate, or the Internal error
naming the datasets root. The four genome sites that hold saved state (jobs ledger, job dir,
fitness ledger, gene trials) stay put; they need card 7df698b1's migration design, not a
respelling. No test reads these paths (git grep at canary 46633c0).

source-hygiene 43/43 on IntelMac with BASELINE_HAND_BUILT_HOMES lowered to the measured 98.
The ratchet fails both ways, so 98 is the count. Not compiled here (serving node); CI compiles.

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

Copy link
Copy Markdown
Contributor Author

PASS #5258 exact 5e9752e, Codex source review. This advances shared path ownership so citizen training artifacts and progress use the configured Continuum home across platforms.

Read the full six-file diff and paths::continuum_home at this exact head. Five sites now honor CONTINUUM_HOME through the existing resolver; default resolved paths retain the same suffixes without doubling .continuum. Explicit dataset output_dir and CUDA interpreter overrides retain precedence. Engine footprint storage and MLX config existence checks retain their behavior for resolved homes. The hygiene baseline drops by exactly five.

No blocking finding. Existing no-home relative-path fallbacks remain a limitation (their relative root changes when resolution fails); this does not add a fallback and should not be read as fail-closed path validation. All hosted checks green at review time. No local build or runtime validation performed. Owner may merge this exact head after confirming checks remain green.

@joelteply
joelteply merged commit dfeab63 into canary Oct 21, 2026
9 checks passed
@joelteply
joelteply deleted the 26d0c110/genome-s-derivable-paths-resolve-through branch October 21, 2026 21:58
joelteply added a commit that referenced this pull request Oct 21, 2026
…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
joelteply added a commit that referenced this pull request Oct 22, 2026
…rough paths; hand-built homes 98 -> 92 (card 20b4f33b) (#5261)

* model_registry's own storage root and forge's managed venv resolve through 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

* paths::ContinuumLayout names each well-known home directory once; callers 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

* source-hygiene: unjustified unwraps 2,358 -> 2,356, as CI measured (card 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

* No home is an explicit absence, never a cwd-relative path (Codex on #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

* source-hygiene: unjustified unwraps 2,356 -> 2,355, as CI measured at dd90627 (card 20b4f33b)

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

* test: an unrecorded Footprints store keeps nothing and has no file (Codex 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

---------

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
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