Skip to content

Fix endpoint additions to flow-style YAML lists - #1845

Merged
simonw merged 3 commits into
simonw:mainfrom
remote-controlled-man:codex/prflow-42857da86ccd
Nov 3, 2026
Merged

simonw merged 3 commits into
simonw:mainfrom
remote-controlled-man:codex/prflow-42857da86ccd

Conversation

@remote-controlled-man

Copy link
Copy Markdown
Contributor

Removing the last saved endpoint leaves [] in extra-openai-models.yaml. Adding another endpoint then reported success but appended a block entry after the closing bracket, leaving invalid YAML and preventing saved models from loading.

Insert new records inside flow-style lists instead, preserving existing records, comments, formatting, trailing commas, and aliases. The regression exercises add → remove → add → list through the CLI, with additional coverage for hand-written flow-style configuration.

Validation: full pytest suite, Black, Ruff, mypy, Cog, package build, and the plugin-loading smoke test.

AI assistance: OpenAI Codex assisted with investigation, implementation, and validation.

Copilot AI balanced review requested due to automatic review settings November 3, 2026 06:36

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@simonw simonw added the bug Something isn't working label Nov 3, 2026
@simonw
simonw merged commit 6ee57e6 into simonw:main Nov 3, 2026
17 checks passed
simonw added a commit that referenced this pull request Nov 3, 2026
Removing the last saved endpoint leaves "[]" in
extra-openai-models.yaml. Since #1845 the next llm openai endpoint add
inserts into that flow-style list, so the file and every later addition
ended up on one long line. A file containing exactly "[]" is now
replaced with a block style list instead. Bracketed lists with any
other content, such as comments, still use the flow-style insertion
that preserves them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
simonw added a commit that referenced this pull request Nov 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants