Derive scientific model version from plant#3
Merged
Conversation
resolve_request() now re-derives the model_id's scientific version from plant::model_version() instead of trusting the hand-typed "@vn". The scientific version flows into the request fingerprint, so a plant scientific-version bump changes the fingerprint and forces reruns, while a software-only plant release leaves it untouched and cached results are reused. Callers may pass a bare model name ("FF16") or a full id ("FF16@v1"); parse_model_id() accepts both. A pinned version that disagrees with the installed plant is a hard error rather than a silent stale cache hit. Bare and matching-pinned ids resolve identically, so existing archives stay valid. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
parse_model_id() now returns the version as a string and accepts compound, dot-separated versions (e.g. "TF24f@v2.1"), since TF24f is a fast approximation of TF24 and plant reports its version as "<TF24 version>.<revision>". The mismatch guard in resolve_request() compares version strings. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Resolves #4
Context
logpilecontent-addresses simulations by the SHA-256 fingerprint of their resolved inputs, andmodel_id("FF16@v1") is one of those inputs. Until now the@vNscientific version was hand-typed on the logpile side, and theplantpackage version was recorded only as inertbuild_hashmetadata that never triggered a rerun — so a behaviouralplantchange silently produced stale cache hits (the known gotcha inAGENTS.md).Depends on traitecoevo/plant#560, which adds
plant::model_version()/plant::model_id().What this changes
resolve_request()now re-derives the model's scientific version fromplant::model_version()rather than trusting the request's@vN. The authoritative version flows into the fingerprint, so:plantscientific-version bump changes the fingerprint → reruns happen;plantrelease leaves it untouched → cached results are reused.parse_model_id()now accepts a bare model name ("FF16"), a full id ("FF16@v1"), or a compound version ("TF24f@v2.1", since TF24f is a fast approximation of TF24). The version is handled as a string.plantis a hard error, not a silent stale hit.FF16andFF16@v1produce the same fingerprint).AGENTS.mdgotcha updated to reflect the new behaviour.Verification
plant#560 installed.FF16@v1; bare and pinned fingerprints identical;FF16@v99errors; bumping the resolved version changes the fingerprint.🤖 Generated with Claude Code