Skip to content

fix(init): ignore unknown data keys in AI config stream#40

Merged
miguelsanchez-upsun merged 2 commits intomainfrom
fix/ignore-unknown-data-keys
Apr 9, 2026
Merged

fix(init): ignore unknown data keys in AI config stream#40
miguelsanchez-upsun merged 2 commits intomainfrom
fix/ignore-unknown-data-keys

Conversation

@pjcdawkins
Copy link
Copy Markdown
Contributor

Summary

  • The NDJSON stream handler in upsun init errored on unrecognized data keys, which broke the CLI when the API added a new topology key
  • Ignore unknown keys so future API additions don't break older CLI versions

Generated with Claude Code

The NDJSON stream handler errored on unrecognized data keys, which
broke the CLI when the API added a new "topology" key. Ignore unknown
keys so future API additions don't break older CLI versions.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings April 9, 2026 06:06
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the upsun init AI NDJSON stream processing to be forward-compatible with new API “data” keys (e.g., topology) by no longer erroring on unrecognized keys.

Changes:

  • Stop treating unknown data keys in the AI config stream as fatal errors.
  • Continue unmarshalling the expected output payload while ignoring everything else.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread internal/init/command.go
@miguelsanchez-upsun miguelsanchez-upsun merged commit 2201e83 into main Apr 9, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants