fix(core): chant build --components --generate --format json forwards env (#2060) - #2201
Merged
Conversation
… env The JSON printer at build.ts:66 only emitted stages, jobs and yaml, dropping the environment the generator resolved and returned on GenerateComponentsResult.env (#2046, PR #2050). A consumer reading the structured output, like behold, had no environment identity except by parsing the YAML back, which #2046 was meant to retire. Forward result.env into the JSON payload the same way handlers/graph.ts already does for the IR pipeline projection: {stages, jobs, yaml, ...(result.env ? { env: result.env } : {})}. The text/yaml output path is unchanged. Closes #2060 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FoXyD9UvKQ5ZdhiR9JT1yB
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.
Closes #2060.
#2046 put
envon the components generator result so a structured consumer can tell which environment a generated pipeline deploys. The JSON printer in the build handler never forwarded it:chant build --components --generate --format jsonemitted onlystages,jobsandyaml, so the consumer had to re-parse the YAML to recover the environment. Thegraph --components --format irprojection path already forwardedenv; this makes the build handler match it.envis spread into the JSON result when the generator returns one and omitted otherwise, so existing consumers of the three-key shape see nothing new unless the generator has an environment to report. Text output is unchanged.Tests in
build.test.ts: env present in JSON output, env omitted when the generator returns none, text format prints only the raw YAML. The build reference page's description of the JSON shape now listsenv.Gates
Run by the orchestrator in the worktree after the agent's own run.
🤖 Generated with Claude Code
https://claude.ai/code/session_01FoXyD9UvKQ5ZdhiR9JT1yB