Skip to content

[Bug]: urlcode extensions add reformats the whole app/urlcode.yaml #715

Closed

Description

@jimhoyd

Problem or use case

urlcode extensions add <name> rewrites the whole app/urlcode.yaml when it adds the extensions.<name> block. In urlcode-ai, adding mcp changed about 100 unrelated lines:

  • flow collections were respaced ([GET] → [ GET ], {value: x} → { value: x })
  • long plain scalars were wrapped over several lines
  • one-line flow maps were exploded into multi-line { ... } blocks

Comments survived, but the diff buries the one semantic change, the extensions: block. That makes the reviewed-revision process harder, and we reverted the file and added the block by hand.

Proposed behavior and alternatives

  • Preserve the document's existing formatting and edit only the inserted or changed nodes (for example yaml's Document with keepSourceTokens, or toString options that keep flow spacing and disable line folding with lineWidth: 0).
  • At minimum, don't fold long scalars and keep flowCollectionPadding: false, so untouched lines stay byte-identical.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions