feat: support multikind casting manifest - #178
Merged
Merged
Conversation
Nageshbansal
force-pushed
the
feat/runner
branch
from
August 11, 2026 07:31
3c3d49f to
87289fe
Compare
Nageshbansal
marked this pull request as ready for review
August 13, 2026 08:55
A casting file held one document. sigs.k8s.io/yaml takes the first document of a stream and reports no error for the rest, so a second document was silently dropped. A file now holds one document per kind. The loader splits the stream, resolves each document against its own Kind, and hands the pipeline the whole set in cast order: a substrate before the workloads that run on it. One casting.yaml.lock records the resolved set, separated by ---, and it is what cast reads. One ordered table of loaders carries everything a Kind needs, and its two readers are methods on it: resolve for a declared document, read for one the lock already resolved. Collecting the set by kind makes both invariants structural, so a duplicate is caught as it is inserted and walking the table emits the set in cast order. kind is now required. The schema already said so; only the loader's fallback to Installation kept it optional, and a file with several documents cannot default one of them. YAMLStream reads a stream as the documents it holds, yielding those that declare something with the position a reader counts in the file. Splitting is lexical, which is what lets an error name the document that is malformed, and YAMLMaterial reads its documents through the same splitter. Plan builds one planner per document, and gauge, forge and cast run against that set: a command reads the casting file once and plans once. Gauge reports a tool once however many documents ask for it, and the ledger posts an event per document, tied together by a run id so an invocation still counts as one run.
Nageshbansal
force-pushed
the
feat/config/multidocument
branch
from
August 13, 2026 10:36
99e7bd0 to
453ad1f
Compare
therealpandey
approved these changes
Aug 14, 2026
therealpandey
approved these changes
Aug 14, 2026
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.
Features
casting.yamlcan now hold more than one document, one per kind, so an installation and a collection agent live in the same file:casting.yaml.lockrecords them in that ordergaugechecks the whole file's tools at once: a tool shared by two documents is checked once, and every missing tool is reported togetherforgewrites the lock and the pours only after every document forges, so a failing document leaves the previous generation untouchedkindstill reads as an Installation, so existing casting files keep workingThere is no casting registered for Infrastructure yet, so a file carrying one is read and ordered but cannot be forged on this branch.
Refactors
v1alpha1.Kinds()now returns the kinds in cast orderTests
Related: https://github.com/SigNoz/platform-pod/issues/2527