Repository navigation
fountain: emit map list items in inline-dash form so parseManifest can read its own output - #1287
Merged
Merged
Conversation
toYaml wrote a map list item as a bare `-` on its own line with the map
indented beneath it. That form is spec-legal, but chant's parseYAML
can't read it: the list collapses to {}, the item's keys leak to the
top level, and a later spec.metadata overwrites the document metadata —
so parseManifest returns every resource with an empty name and bulk
apply 422s on the serializer's own output (#1286).
Fold the item's first line onto the dash instead (`- key: value`).
`- ` is exactly one indent level wide, so the body's continuation
lines already align and the substitution is a same-width replacement
of the first line's indentation.
Adds a shape test and a serialize→parseManifest round-trip test over
the exact shape that collapsed (a list-of-maps field plus a spec-level
metadata key), so the emitter and parser can't drift apart silently
again.
Fixes #1286
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
jhgaylor
added a commit
to jhgaylor/agent-specs
that referenced
this pull request
Aug 1, 2026
INTENTIUS/chant#1287 (released in 0.34.1) makes the fountain serializer emit map list items in inline-dash form, so parseManifest can read the serializer's own output again and the direct POST /api/apply workaround in apply.mjs is no longer needed. Drop it and the yaml devDependency; apply.mjs calls fountainApply({manifestContent}) with the infisical:// URIs resolved by text substitution on the manifest. Verified against live fountain: 27 resources updated, 38 secrets upserted, matching the workaround-era applies. 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.
Fixes #1286.
Problem
toYamlin the fountain serializer wrote a map list item as a bare-on its own line with the map indented beneath it. Spec-legal YAML, but chant'sparseYAMLcan't read that form: the list collapses to{}, the item's keys leak to the top level, and a laterspec.metadata(themanaged-by: chantmarker every chant-managed resource carries) overwrites the document-levelmetadata.parseManifestthen extractsname: ""for every resource and bulkPOST /api/apply422s on the serializer's ownchant buildoutput — every real manifest has a list-of-maps field, so 0.33.1's apply path is broken end to end.Fix
Fold the item's first line onto the dash (
- key: value), the idiomatic block-sequence form.-is exactly one indent level wide, so the recursive body's continuation lines already align — the fold is a same-width replacement of the first line's indentation, no re-indenting needed. Nested cases (list-of-lists) come out as- - x, which is valid.Before / after:
Tests
parseManifestround-trip test over the exact shape that collapsed (list-of-maps field + spec-levelmetadatakey), asserting names, list contents, andspec.metadataall survive — so the emitter and parser can't drift apart silently again.vitest run lexicons/fountain: the serializer and fountain-apply suites pass (28/28). The 10 pre-existing failures in the LSP/plugin/composites suites are identical on a clean checkout of main and untouched by this change.An alternative (or complement) is teaching
parseYAMLthe dash-alone form — happy to do that as a follow-up if you want the parser hardened too, but fixing the emitter both repairs the round-trip and makes the output match what standard YAML tooling emits.🤖 Generated with Claude Code