Add labels to BaseArtifact - #183
Merged
chdominguez merged 3 commits intoSep 2, 2026
Merged
Conversation
Free-form key/value metadata that travels with an artifact through serialization. The runtime never interprets it. A domain expresses its own structure through labels instead of the runtime growing a field per domain, so one mechanism serves any of them. Not part of any cache key: _fingerprint hashes artifact content digests rather than artifact models. Closes temple-compute#181
quietflareco-sudo
force-pushed
the
add-artifact-labels
branch
from
September 2, 2026 07:22
3f6ee16 to
6609963
Compare
Contributor
Author
|
@chdominguez FYI! Could you please review this? Thanks! |
chdominguez
requested changes
Sep 2, 2026
chdominguez
left a comment
Member
There was a problem hiding this comment.
Small change on the docstring and ready to go!
Review feedback: the field needs a line and an example, not the rationale. That lives in temple-compute#181 and the PR.
Member
|
Docs PR: temple-compute/horus-docs#58 |
chdominguez
added a commit
to temple-compute/horus-docs
that referenced
this pull request
Sep 2, 2026
Companion to temple-compute/horus-runtime#183, which adds BaseArtifact.labels: free-form string metadata the runtime never interprets or uses for caching, for whatever reads the workflow afterwards (a UI, a lineage query).
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.
Summary
Closes #181.
The runtime never interprets them. They travel with the artifact through serialization and exist for whatever reads a workflow afterwards: a UI grouping nodes, or a lineage reader answering "everything derived from subject X". A domain expresses its own structure through labels instead of the runtime growing a field per domain.
Docstring shortened per review.
Not a cache concern
HorusTask._fingerprinthashes artifact content digests plus a hash of the runtime and executor models. Artifact models are not in it, so labels cannot reach a cache decision. Relabelling describes an artifact differently, it does not make its contents stale.Why
strvaluesStrings stay serializable in YAML and JSON without surprises and can be used directly as index keys. Easy to widen to
dict[str, Any]later, hard to narrow. Happy to change it.Tests
Four: defaults to empty, not shared between instances (a mutable default would leak one artifact's labels into every other), survives a
model_dump/model_validateround trip, rejects non-string values.737 passed, coverage 91.29%,
make lintclean.Documentation impact
If a user, plugin, or GUI can observe the difference, it requires documentation.
horus-docs PR: to follow.
This is a new field workflow authors write in YAML, so it belongs in
sdk/core/artifact.mdxandguides/writing-workflows-yaml.mdx. Happy to write it, or leave it to you.