Skip to content

Move to the released SDK and say ValidationErrors - #226

Merged
bgrant0607 merged 1 commit into
mainfrom
validation-errors-rename
Sep 9, 2026
Merged

bgrant0607 merged 1 commit into
mainfrom
validation-errors-rename

Conversation

@bgrant0607

Copy link
Copy Markdown
Member

The ConfigHub API renamed Unit.ApplyGates to ValidationErrors and
ApplyWarnings to ValidationWarnings. The examples now use the new names.

The SDK bump is a prerequisite, not a tidy-up

The rename needs a released SDK that has the field, and the only one that does
is v0.4.12 — v0.4.11 predates it. v0.4.12 also carries the Ref/Resolve
rework, so there is no version that gives one without the other. That migration
is most of this diff:

ResolveSpace(ctx, c, slug)    ->  ResolveSpace(ctx, c, ParseRef(slug), ResolveOpts{})
ResolveFilter(ctx, c, id, s)  ->  ResolveFilter(ctx, c, ParseRef(s), ResolveOpts{Space: id})

and those helpers now return Extended* envelopes, so sp.SpaceID became
sp.Space.SpaceID and a returned *Invocation became inv.Invocation.

The envelope fixes were applied at the lines the compiler named, not by
substitution: some sp in the same files come from EnsureSpace, which still
returns a plain *Space, and a blanket rewrite broke exactly that in
managerkit/guardrails/pack.go.

On the TypeScript side, @confighub/api and @confighub/rtk-query go to
^0.4.6, the first release carrying the field. Several apps had node_modules
as old as 0.1.2 — below their own declared ^0.4.4 floor — so seven
lockfiles move with them.

triggers-and-applygates is left alone throughout: it is the name of a skill,
not a field.

Verified, not assumed

A version bump is not proof anything compiles, and four of the apps
(sec-scanner, rbac-manager, promoter, cost-estimator) have no test
files at all
, so npm test exits 0 there without checking anything. Those
were built instead, which is what actually typechecks the rename.

result
10 Go modules go build and go vet clean
fleet-ql 298 tests pass
configboard 166 tests pass
webkit 29 tests pass
sec-scanner, rbac-manager, promoter, cost-estimator, configboard build clean

Reviewing this

The migration and the rename are in one commit because they are genuinely
coupled — the rename does not compile without the bump. If it helps, the
mechanical parts are the go.mod/package.json/lockfile changes and the
Resolve* call sites; everything else is the terminology.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Ge1C6Wm1qR3WUCxEZKPboc

The ConfigHub API renamed Unit.ApplyGates to ValidationErrors and ApplyWarnings
to ValidationWarnings. The examples now use the new names.

**The SDK bump is a prerequisite, not a tidy-up.** The rename needs a released
SDK that has the field, and the only one that does is v0.4.12: v0.4.11 predates
it. v0.4.12 also carries the Ref/Resolve rework, so moving to it means adapting
to that at the same time — there is no version that gives one without the other.

    ResolveSpace(ctx, c, slug)   ->  ResolveSpace(ctx, c, ParseRef(slug), ResolveOpts{})
    ResolveFilter(ctx, c, id, s) ->  ResolveFilter(ctx, c, ParseRef(s), ResolveOpts{Space: id})

and those helpers now return Extended* envelopes, so `sp.SpaceID` became
`sp.Space.SpaceID` and a returned `*Invocation` became `inv.Invocation`. Applied
at the lines the compiler named rather than by substitution — some `sp` in the
same files come from EnsureSpace, which still returns a plain *Space, and a
blanket rewrite broke exactly that.

The npm packages needed the same treatment: `@confighub/api` and
`@confighub/rtk-query` go to ^0.4.6, which is the first release carrying the
field. Several apps had node_modules as old as 0.1.2 — below their own declared
floor — so the lockfiles move too.

`triggers-and-applygates` is left alone throughout: it is the name of a skill,
not a field.

Verified rather than assumed, since a version bump is not proof anything
compiles: all ten Go modules build and vet clean; fleet-ql (298 tests),
configboard (166) and webkit (29) pass; and sec-scanner, rbac-manager,
promoter, cost-estimator and configboard build, which is what typechecks the
rename in the four apps that have no test files at all.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ge1C6Wm1qR3WUCxEZKPboc
@bgrant0607
bgrant0607 force-pushed the validation-errors-rename branch from 9a8f0e0 to 40288fb Compare September 9, 2026 22:18
@bgrant0607
bgrant0607 merged commit 0eb2b3b into main Sep 9, 2026
7 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.

1 participant