Skip to content

Make the state publish meta data clearer to review and edit - #3868

Open
icanhasmath wants to merge 2 commits into
version/0-48-2-RC2from
marcg/0-48-2-RC2-namespace-edits
Open

icanhasmath wants to merge 2 commits into
version/0-48-2-RC2from
marcg/0-48-2-RC2-namespace-edits

Conversation

@icanhasmath

@icanhasmath icanhasmath commented Oct 28, 2026 •

Copy link
Copy Markdown
Collaborator

Follow-up to #3867, from testing the 0.48.2-RC2 Windows build: changing the namespace in the state publish editor was refused, and nothing said in advance which fields were fixed.

Changes

  • Default namespace: without --namespace (or a namespace in the --meta file), state publish --build now uses private/<org>/python when the source directory has a pyproject.toml. Otherwise it still uses private/<org>.

  • Namespace edits: a new ingredient's namespace can now be changed in the editor. --build writes the name and version into the package, but not the namespace. The new namespace gets the same checks as --namespace:

    • it can't be empty
    • with --build, it must be under the project's organization
    • the version must not already exist in it

    If it fails a check, the previous namespace is put back, the user's other edits are kept, and the reason is shown. With --edit the namespace still can't be changed, because it identifies the ingredient being revised.

  • Fixed fields stated up front: with --build or --edit, the confirmation prompt and the editor notice say which fields can't be changed and why. If one is changed anyway, the error names that field (e.g. "The name can't be changed at this point, because it was already built into the package") instead of "name, namespace or version".

  • No help comments in the meta data: the confirmation preview and the editor no longer show a comment on every field (# The name of the ingredient, ...). They now show the same plain yaml as saved meta files and state export ingredient-meta. The fields are described in a table in the publish guide instead. The yaml-comment module, and maruel/natural which only it used, are removed from go.mod and vendor/.

  • Description in export and --edit:

    • state export ingredient-meta left the description empty, although it is published. The description belongs to the ingredient, not the version, so export now fetches it from there.
    • state publish --edit no longer refuses a description that differs on an existing version. The confirmation shows the current description and says the change is ignored, and the other edits can still be published. The description is still left out of the request for a revision, because the platform rejects it.
    • Authors on an existing version are still refused.

Testing

  • The new tests in confirm_test.go cover the default namespace, a namespace edit that is kept, each check that puts the old namespace back, and the fixed-field errors for --build and --edit. Tests also cover the preview having no comments, the exported description, and an ignored description change. Each test fails when its fix is reverted.
  • The readme and changelog are updated.

🤖 Generated with Claude Code

Follow-up to #3867 from testing the 0.48.2-RC2 build:

- Without --namespace, a --build publish from a pyproject.toml now defaults
  to private/<org>/python (otherwise private/<org>, as before).
- A new ingredient's namespace can be changed in the editor. It is checked
  like --namespace and put back, with the reason, if it can't be used.
- The confirmation and editor say up front which fields can't be changed and
  why, and the error for changing one names it.
- The preview and editor show plain yaml without a help comment on every
  field; the fields are described in the publish guide instead. The
  yaml-comment module is no longer used and is removed.
- state export ingredient-meta now includes the ingredient's description.
  state publish --edit no longer refuses a different description on an
  existing version: it keeps the current one and says the change is ignored.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@icanhasmath icanhasmath changed the title Allow namespace edits in state publish and say up front what's fixed Make the state publish meta data clearer to review and edit Oct 28, 2026
@icanhasmath
icanhasmath force-pushed the marcg/0-48-2-RC2-namespace-edits branch from 9b12c5f to 11e5bf1 Compare October 28, 2026 23:38
@icanhasmath
icanhasmath requested a review from MDrakos October 28, 2026 23:41


The Scan job failed on both: x/net v0.60.0 is affected and v0.62.0 fixes them.
go get also raised x/crypto, x/sys, x/term, x/text, x/sync and x/tools to the
versions x/net v0.62.0 requires.
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.

1 participant