Repository navigation
A leased job's adapter is reported by its files' digests and its base's fingerprint, never the trainer's path (card 3fd98325, S3-1) - #5418
Merged
Conversation
…'s fingerprint, never the trainer's path (card 3fd98325, S3-1)
genome/lease/poll passed the trainer's Completed{artifact} through unchanged, so the origin
received a local_path that exists only on the peer and no digest to verify anything against.
- The format owns which files an artifact IS (TrainingArtifact::payload): a GGUF LoRA is its
file; an MLX or PEFT adapter is its final weights and config, never the intermediate
checkpoints MLX leaves in the same directory. Provider-hosted and Candle skeletons have no
local gene to return, which is final.
- On the first completed poll the receiver describes the artifact (each file's name, size,
SHA-256, hashed off the runtime) and records it once on the lease row. Every later poll
answers from that record, even if the file on disk changes, so serving the bytes (S3-2) can
refuse what no longer matches.
- The manifest carries the base it fits: the registry id the lease named (now recorded at
admission) and lora_base_fingerprint of this node's GGUF of it: architecture, {arch}.*
hyperparameters, tokenizer.ggml.* and tensor names and shapes, with quantization, naming
and the chat template left out. A GGUF LoRA may omit tokenizer metadata (Codex), so the
origin checks this against its own base rather than trusting a model id.
- lease/poll answers Completed{artifact} or Unreturnable{reason}; the origin maps
Unreturnable to a final Failed and keeps Completed pending until its import lands (S3-2).
training_lease_return is still not emitted, so no origin leases yet.
RecordingFineTuningAdapter gains with_local_artifact, so a test moves real files.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
…r digest is compatibility only (Codex on #5418) The header fingerprint cannot tell a base from a fine-tuned sibling with the same architecture, tokenizer and shapes. The manifest's base now carries sourceSha256, the whole base GGUF's content digest, which the origin must match exactly; the header digest stays as compatibility evidence. Only a GGUF LoRA is returned: an MLX or PEFT trainer resolves an HF snapshot at start and records no revision, so a revision read afterwards would be a guess; those read Unreturnable until their trainers record it. The negative fixture describes one adapter on a base and on a same-header sibling: same compatibility digest, different source. The two GGUF test writers are one fixture with a weight parameter. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
…at lane launch; never what the registry resolves at poll time (Codex on #5418) The receiver resolved the base GGUF from the registry when it first saw the job completed and hashed that file: proof of the bytes at poll time, not of what the trainer read. A path or registry replacement between training and the poll could label an adapter trained on A as B. - Serving stamps the weights file a lane is launched on (path, size, mtime, file identity on its volume) before spawn, on LaneRecord.weights; no hashing at launch. - The engine trainer copies its lane's stamp onto the persisted run spec and the finished artifact (JobMetrics.trained_on, ts-skipped), so a re-attached run names the same base. - describe drops the registry resolver: it hashes stamp.path only through one handle proved to be the stamped file before and after the read (WeightsStamp::content_sha256). A path that now names another file, or none, is final Unreturnable; a job with no stamp is Unreturnable, never stamped from the registry. The stamp never crosses the wire. - The bound, stated in weights_stamp.rs: a stat cannot see a same-file, same-size, same-mtime rewrite in place, nor a replacement in the instant between the stamp and the engine's open. - File identity moves down to continuum-host::file_identity (mod.rs logic, unix/windows calls), and expert_placement::preparation's cfg-branched copy migrates onto it. Fixtures: trained on A, the path replaced by a same-header sibling B before the first poll is refused (never reported as B); an unstamped job is Unreturnable; a replaced path is another file (host); the stamped file alone hashes (engine). Also fixes the life test's assertion text. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
…the stamped file; a deleted or invalid replacement is final (Codex on #5418) describe parsed the base header from the path before checking the stamp, so a base deleted or replaced by something that is not a GGUF failed as a retryable header error before the final 'gone' could be decided. WeightsStamp::read_verified now opens one handle, proves it is the stamped file, runs the reader (header fingerprint, then the whole-file hash, on that same handle), proves it again, and only then reports the reader's own failure: a replacement outranks any read error. lora_base_fingerprint takes a reader, not a path; the test-only path variant and content_sha256 are gone. Fixtures: replacement by a non-GGUF and deletion both read final Unreturnable through describe; read_verified ranks Changed above the reader's error. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
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.
What this serves
This is the receiver half of returning an adapter trained across the grid: path step 3 (Learning) and line 16's drivers. A resident's adapter trained on a peer has to come back to her node, be verified there, and enter the examiner's held-out, gene-off comparison. This PR makes the peer report the trained artifact in a form the origin can verify. Design: #continuum-dev 2026-10-25; transport agreed with Codex as a chunked range read behind
ArtifactSource, which lands in S3-2.The defect
genome/lease/pollpassed the trainer'sCompleted{artifact}through unchanged (lease.rs:274 on a59c2bf). The origin received alocal_paththat exists only on the peer, and no digest.Change
TrainingArtifact::payload, a newartifact_payload.rs).adapters.safetensors+adapter_config.json, never the0000300_adapters.safetensorscheckpoints in the same directory.adapter_model.safetensors+adapter_config.json.lease_artifact.rs). On the first completed poll, each file's name, size and SHA-256 are hashed inspawn_blockingand recorded once on the lease row (AttemptLedger::record_return, first write wins). Later polls answer from the record even if the file changes, so S3-2's byte reads can refuse a mismatch.LaneRecord.weights: path, size, mtime, file identity). There is no hashing at launch.JobMetrics.trained_on. It's ts-skipped and never sent on the wire.WeightsStamp::content_sha256). A replaced or missing path is finalUnreturnable, and so is an unstamped job.LeaseArtifactBasecarriessourceSha256(identity, matched exactly by the origin) andfingerprint(lora_base_fingerprint, header-only, compatibility only: a same-header sibling has the same fingerprint). The registrymodelIdis the one the lease named.weights_stamp.rs: a stat cannot see a same-file, same-size, same-mtime rewrite in place, nor a replacement in the instant between the stamp and the engine opening the file.continuum-host::file_identity(logic inmod.rs, calls inunix.rs/windows.rs).expert_placement::preparation's cfg-branched copy migrates onto it.Unreturnablerather than carrying a guessed revision. Follow-up: card d3889a9e.LeasePollOutcome::{Completed{artifact}, Unreturnable{reason}}. The origin mapsUnreturnableto a finalFailedand keepsCompletedpending (Transient) until its import lands in S3-2.training_lease_returnis still not emitted, so no origin leases yet.RecordingFineTuningAdapter::with_local_artifactextends the existing fixture, with no new mock.Tests (
what this catcheson each)an_artifact_returns_only_the_files_its_format_names(genome): directory and path leakage, and unreturnable artifacts treated as retryable.a_completed_artifact_is_described_by_its_bytes_and_the_base_its_trainer_read:only_the_stamped_file_is_vouched_for(engine) anda_replaced_path_is_another_file(host).the_base_digest_is_its_tokenizer_and_shapes_not_its_quantization(engine): F32 and F16 copies give the same digest; a different tokenizer, or no architecture, does not.a_completed_lease_is_reported_by_its_recorded_manifest: the command path end to end. The report stays the first record after the file is replaced.Unreturnableat the receiver and a finalFailedat the origin.Measured
Nothing live. This is source plus unit tests, and the receiver isn't reachable until S3-2 emits
training_lease_return. CI is the compile: no cargo runs on enrico while it serves.🤖 Generated with Claude Code
https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE