Skip to content

pkg: Rename stores as tagged or untagged - #630

Open
timflannagan wants to merge 1 commit into
agentregistry-dev:mainfrom
timflannagan:cleanup/tag-storage-terminology
Open

pkg: Rename stores as tagged or untagged#630
timflannagan wants to merge 1 commit into
agentregistry-dev:mainfrom
timflannagan:cleanup/tag-storage-terminology

Conversation

@timflannagan

Copy link
Copy Markdown
Collaborator

Description

Rename the v1alpha1 storage classification from "tagged artifact" and
"mutable object" to "tagged" and "untagged". The old pairing implied that
tags provided an immutability guarantee, but applying changed content to an
existing tag replaces that row.

This is a terminology cleanup only. Tagged storage remains keyed by
namespace/name/tag, while untagged storage remains keyed by namespace/name.

Change Type

/kind cleanup

Changelog

NONE

Additional Notes

There are no database migrations, HTTP API changes, manifest changes, or
persistence behavior changes. Exported Go identifiers are renamed without
compatibility aliases, so embedders should update those call sites with the
dependency bump.

Focused tests passed for the v1alpha1 API, store, resource handlers, CLI,
client, and API routing packages. OpenAPI and the generated TypeScript client
were regenerated.

Storage classification is about whether metadata.tag participates in identity,
not whether writes are mutable. Use tagged and untagged names across kind
registration, stores, routes, CLI dispatch, generated APIs, and documentation.

Tags remain replaceable slots: applying changed content to the same tag replaces
its row. This is a terminology-only API rename with no persistence or HTTP
behavior change.

Signed-off-by: timflannagan <timflannagan@gmail.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 performs a terminology cleanup across the v1alpha1 API/storage/CLI/UI surfaces by renaming the storage classification from “tagged artifact / mutable object” to “tagged / untagged”, clarifying that tags are addressable slots rather than immutability guarantees.

Changes:

  • Renames v1alpha1 kind storage modes and store behaviors/constructors to “Tagged” vs “Untagged” across Go code.
  • Updates routing/handler/CLI logic and tests to use the new “tagged/untagged” terminology (including docs and comments).
  • Regenerates OpenAPI and the generated TypeScript client comments to reflect the new wording.

Reviewed changes

Copilot reviewed 41 out of 41 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
ui/lib/api/types.gen.ts Updates generated TS parameter docs to say “tagged resource kinds” instead of “tagged artifact kinds”.
test/e2e/declarative_test.go Renames an e2e test to match the new “tagged” terminology.
pkg/types/types.go Renames app option field to V1Alpha1UntaggedStoreKinds and updates related comments.
pkg/registry/v1alpha1store/tables.go Switches store construction to NewTaggedStore / NewUntaggedStore based on kind storage.
pkg/registry/v1alpha1store/tables_test.go Updates table/store behavior assertions for the renamed behaviors.
pkg/registry/v1alpha1store/store.go Renames behaviors and constructors; updates docs/comments and internal branching names.
pkg/registry/v1alpha1store/store_test.go Updates store tests to use NewTaggedStore / NewUntaggedStore constructors.
pkg/registry/v1alpha1store/store_tagging_test.go Updates tagging/auditor tests and messaging for “untagged” vs “mutable”.
pkg/registry/v1alpha1store/migrations/012_models_tagged_artifact.up.sql Updates migration comments to reflect “untagged → tagged” wording.
pkg/registry/v1alpha1store/migrations/011_models_table.up.sql Updates migration comments to refer to Models as an “untagged” kind.
pkg/registry/v1alpha1store/migrations_upgrade_test.go Updates migration upgrade tests to use NewUntaggedStore.
pkg/registry/v1alpha1store/helpers.go Updates helper comments for “untagged” terminology.
pkg/registry/v1alpha1store/annotations_test.go Updates annotation tests to use NewTaggedStore.
pkg/registry/resource/handler.go Updates route docs/registration to use IsTaggedKind and introduces registerApplyUntagged.
pkg/registry/resource/handler_test.go Updates handler tests to use new constructors and new “untagged” wording.
pkg/registry/resource/core.go Updates default-tag logic to use IsTaggedKind.
pkg/registry/resource/apply.go Updates apply/delete docs to use “untagged” wording.
pkg/registry/resource/apply_test.go Updates apply tests to use new constructors and “untagged” naming.
pkg/api/v1alpha1/validation.go Updates validation logic to use IsTaggedKind for tag pinning checks.
pkg/api/v1alpha1/scheme.go Replaces IsTaggedArtifactKind with IsTaggedKind and updates storage enum checks.
pkg/api/v1alpha1/scheme_test.go Updates scheme tests for renamed storage enums and kind classification helper.
pkg/api/v1alpha1/runtime.go Registers Runtime with WithUntaggedStorage.
pkg/api/v1alpha1/ref.go Updates reference docs to describe “tagged” vs “untagged” resources.
pkg/api/v1alpha1/plugin.go Updates Plugin doc comment to describe it as “tagged”.
pkg/api/v1alpha1/object.go Updates ObjectMeta docs to describe identity as tagged vs untagged.
pkg/api/v1alpha1/model.go Updates Model docs to avoid “versioned” wording and align with tag semantics.
pkg/api/v1alpha1/model_validate.go Updates validation docs to say “tagged” instead of “versioned”.
pkg/api/v1alpha1/kinds.go Renames storage enum values and option helper to WithUntaggedStorage; updates defaults.
pkg/api/v1alpha1/deployment.go Registers Deployment with WithUntaggedStorage.
openapi.yaml Updates OpenAPI parameter descriptions to say “tagged resource kinds”.
internal/registry/registry_app.go Wires V1Alpha1UntaggedStoreKinds and uses NewTaggedStore / NewUntaggedStore for extra kinds.
internal/registry/registry_app_integration_test.go Updates auditor propagation test comment wording and still references option propagation path.
internal/registry/api/router/v0.go Updates router docs to describe tagged vs untagged route shapes.
internal/registry/api/handlers/v0/crud/crud.go Updates CRUD handler docs to describe tagged vs untagged route shapes.
internal/mcp/registryserver/server_integration_test.go Updates integration test comments for expected tag behavior on tagged vs untagged kinds.
internal/client/client.go Updates client comments to describe tagged vs untagged semantics for list/get/delete.
internal/cli/scheme/registry.go Updates CLI scheme option docs to refer to “untagged” latest-row behavior.
internal/cli/declarative/get_test.go Updates CLI scheme tests and comments to refer to “untagged” kinds lacking /tags support.
internal/cli/declarative/declarative.go Renames CLI kind registration helpers from mutable→untagged and updates related docs.
internal/cli/declarative/all_tags_test.go Updates CLI --all-tags tests/comments for “untagged” kinds.
docs/declarative-cli.md Updates user docs section to explain “Tagged and Untagged Resources” and tag replaceability.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +95 to 98
// reaches every constructed Store. We drive a tagged Upsert
// and assert the auditor saw the expected ResourceTagCreated event,
// proving the option survived the
// NewStores -> NewStore option chain.
Comment on lines +391 to 397
if v1alpha1.IsTaggedKind(kind) {
registerGetTagged(api, cfg, newObj, kind, itemTagPath)
registerDeleteTagged(api, cfg, newObj, kind, itemTagPath)
} else {
registerApplyMutable(api, cfg, newObj, kind, itemPath)
registerApplyUntagged(api, cfg, newObj, kind, itemPath)
registerDeleteMutable(api, cfg, newObj, kind, itemPath)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants