chore(metamodel): regenerate to fix the dropped typeof:/abstract: keys - #115
Merged
Conversation
…erge The reproducibility criterion was wrong. GENERATED_FROM listed the generator commits not in linkml/main and declared that the crate "cannot be reproduced from upstream linkml alone" until they merged -- which made every regen wait on an upstream review queue for no reason. Naming the changes is enough. Each extra commit is now resolved to every pull request whose head carries it, and the stamp reads as a recipe: apply these PRs on top of linkml/main, run ./regen.sh. A generator fix therefore has to be identifiable, not merged -- pushed, with a PR open, so the stamp names something a reader can fetch rather than a sha that only exists on the author's disk. PR lookup is best effort (needs gh, network, and the commit pushed to the searched repo) and falls back to naming the commit alone. LINKML_PR_REPO overrides the repo searched; it defaults to linkml/linkml. Also warn when the generator checkout has uncommitted changes: the recorded revision then does not determine the output, which is the one thing the stamp is supposed to promise. A warning rather than a refusal, since the diff may be unrelated to the generator. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Regenerated with the rust generator from linkml/linkml#3919, which emits #[serde(rename = "<linkml name>")] for every field whose Rust name had to be escaped. `typeof` and `abstract` now line up with their `typeof_`/`abstract_` fields instead of being dropped without error, so a derived type has a parent again: type_ancestors walks the whole chain, and the datatype and IRI disposition it carries are inherited. The seven tests 03d64e9 left #[ignore]d for this go green unchanged, which is what they were for. Fixes #108. The user-visible half is in turtle output: a `typeof: uri` range now emits a named node rather than a literal, and a `typeof: integer` range carries ^^xsd:integer rather than serializing plain. Nothing was hand-patched; the renames are the generator's own output, derived generically from "was this name escaped" rather than from a list, so the fix covers every escaped field. On meta.yaml that is exactly five: typeof on TypeDefinition and abstract on four structs. The generator branch also carries two changes that sit under the fix, so the regen brings them along: * the concrete base class is now a variant of its own *OrSubtype enum -- ExtensionOrSubtype::Extension and EnumExpressionOrSubtype::EnumExpression, with the matching From, PyO3, from_pair_*, stub and poly.rs dispatch arms. This is why the Python stubs move: every `extensions` field widens from Annotation to Annotation | Extension (#110). * the type-designator serde tag, which changes nothing here because meta.yaml declares no type designator (#111). GENERATED_FROM names all three, each resolved to the PR carrying it, so the crate is reproducible from that list without waiting for those PRs to merge. `./regen.sh --check` is clean against the revision in the stamp. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
kervel
force-pushed
the
chore/regenerate-metamodel-typeof
branch
from
August 25, 2026 10:12
351e064 to
e641216
Compare
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.
Lands the fix for #108 by regenerating the metamodel, and corrects the reproducibility rule
#112 introduced.
The criterion was wrong
GENERATED_FROMlisted the generator commits not inlinkml/mainand declared that the crate"cannot be reproduced from upstream linkml alone" until they merged. That made every regen wait
on an upstream review queue for no reason.
Naming the changes is enough. Each extra commit is now resolved to every PR whose head carries
it, and the stamp reads as a recipe:
So a generator fix has to be identifiable, not merged: pushed, with a PR open, so the stamp
names something a reader can fetch rather than a sha that only exists on the author's disk.
All three commits resolve to #3919 because they are stacked on that branch — the older PRs
#3661/#3662 carry pre-rebase versions with different shas, and fetching #3919 gets you all three.
regen.shalso warns when the generator checkout has uncommitted changes: the recorded revisionthen does not determine the output, which is the one thing the stamp promises. A warning, not a
refusal — the diff may be unrelated to the generator.
The regen
typeofandabstractnow line up with theirtypeof_/abstract_fields instead of beingdropped, so a derived type has a parent again. The seven tests #112 left
#[ignore]d go greenunchanged, which is what they were for, and the ignores are removed. Fixes #108.
User-visible, in turtle output:
Nothing is hand-patched. The renames are the generator's own output, derived generically from
"was this name escaped" rather than from a list of names — on
meta.yamlthat comes to exactlyfive (
typeofonTypeDefinition,abstracton four structs;type_does not occur).What rides along
Two generator commits sit under the fix on that branch, so regenerating brings them:
*OrSubtypeenum —ExtensionOrSubtype::Extension,EnumExpressionOrSubtype::EnumExpression, with the matchingFrom, PyO3,from_pair_*, stub andpoly.rsdispatch arms (Track linkml/linkml#3662: *OrSubtype enums omit the concrete base class as a variant #110). This is the only reasonthe Python stubs move: every
extensionsfield widens fromAnnotationtoAnnotation | Extension, 82 lines of exactly that substitution.stub_gen --checkfailswithout regenerating them, so they are regenerated here.
meta.yamldeclares no type designator.
Verification
cargo test --workspace74 suites green,cargo fmt --all --check, clippy with-D warnings, andstub_gen --checkall clean../regen.sh --checkreportsOK: committed crate reproduces from v1.11.1-288-ge7015ec5c, so the gate works in bothdirections — it reported drift before this regen and is clean after.
Note for whoever bumps a downstream pin
A consumer asserting the buggy behaviour on purpose will now fail, which is the intended signal.
In asset360 that is
sparql_terms.rs::typeof_only_type_has_no_datatype_and_is_not_numeric:trackLengthbecomesxsd:integerand numeric, so the assertion inverts.