Read the catalog sidecar in the loader - #29
Merged
Conversation
The reduction moved kind, the entry union's discriminator, into the manifest sidecar, and the loader had no reference to that file at all, so every four-field entry failed discrimination on the real load path. The store now reads the manifest beside the entries and merges each name's derived fields before the union discriminates. A present-but-unparseable manifest raises naming the file rather than being treated as absent: returning nothing there sends the loader looking for an inline discriminator and hides the real cause behind the same opaque union error. Recovered from a worker that died with the work uncommitted.
The reduction moved the entry union's discriminator into the manifest sidecar while the loader had no reference to that file, so every four-field entry failed discrimination on the real load path. A present-but-unparseable sidecar now raises naming the file rather than reading as absent, which would send the loader looking for an inline discriminator and hide the cause behind the same opaque union error.
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.
The catalog loader reads the manifest sidecar and merges each name's derived
fields into its entry before the entry union discriminates.
The reduced reviewable entry carries only name, description, documentation and
unit, which moves
kind— the union's discriminator — into the sidecar. Theloader had no reference to that file, so every reduced entry failed
discrimination on the real load path with an opaque union error, even though
the model accepts the merged form.
A sidecar that is present but unparseable now raises, naming the file. Reading
it as absent would send the loader looking for an inline discriminator and hide
the real cause behind the same opaque error the fix exists to remove.
The sidecar is located beside the entries: at the repository root above them in
the standard layout, or in the entry directory itself when entries sit at the
root. A genuinely absent sidecar still loads entries that carry their own kind.
Suite: 2049 passed, 34 skipped, 82 xfailed.