Skip to content

feat(kiota): admin wave — account_group, role, user, endpoint_label, alert_suppression_window - #108

Merged
ShocOne merged 1 commit into
mainfrom
feat/kiota-admin-wave
Aug 5, 2026
Merged

feat(kiota): admin wave — account_group, role, user, endpoint_label, alert_suppression_window#108
ShocOne merged 1 commit into
mainfrom
feat/kiota-admin-wave

Conversation

@ShocOne

@ShocOne ShocOne commented Aug 5, 2026

Copy link
Copy Markdown
Member

Why

PR 2 of 4 toward full kiota/resty parity (plan approved with #107). Five admin-surface resources join the kiota pilot: account_group, role, user, endpoint_label, alert_suppression_window — taking it from 2 resources to 7. Bindings: 83 → 174, all verified against the generated SDK.

How the port was done

Every SDK name is resolved against the real generated surface (a go/packages dump of builders, accessor maps, constructors, and ParseX companions) instead of guessed-then-corrected. Two rules did the heavy lifting:

  • Chains walked from path templates — each literal segment resolves to the actual builder method, {param} to the builder's single By* indexer (with its real parameter type).
  • Direction-aware accessor resolution — an expand wire resolves against the request model, a flatten against the response, because kiota's request/response types are genuinely different shapes (e.g. UserRequest.AllAccountGroupRoleIds []string vs UserDetail.AllAccountGroupRoles []Roleable). A both-sides wire must agree on both models.

bindings check passed first try on all 174.

Emitter fix the wave surfaced

A single-object flatten helper always dereferenced its parameter (item := *in) — impossible for an interface-typed kiota model. New InRef seam mirrors PR 1's ItemRef: *in under struct access, in under method access. Resty output proven byte-identical by the drift check; unit-pinned in the fluent emitter tests.

New converter families (pilot convert)

  • PtrInt32ToFrameworkInt64 / FrameworkInt64ToPtrInt32 — kiota types every plain integer *int32; the curated schema stays int64. Write side deliberately non-generic: a setter parameter gives Go nothing to infer a type argument from.
  • FrameworkToPtrTime — RFC 3339 only, because the recordings prove that's the shape the API echoes (2027-06-01T00:00:00Z); a looser parse would render back differently and pin a permanent diff.
  • PtrDateOnlyToFramework / FrameworkToPtrDateOnlyendRepeat.date.
  • KiotaEnumSliceToFrameworkSet / FrameworkSetToKiotaEnumSlice — int-enum slices through ParseX (daysOfWeek), refusing values outside the closed set.
  • PtrInt32ToFrameworkString — a string-modelled attribute over an integer SDK field (test interval).

Verification

  • bindings check: ✅ 174/174 (7 resources, 2 data sources, 1 list facet, 1 action, 1 ephemeral)
  • probe verify: all 7 resources reproduce their recorded facts from the shared cassettes
  • provider generate -check: 0 drift on both pilots (resty byte-identity held through the emitter change)
  • Root + kiota pilot test suites: 0 failures; gofmt clean

Next: PR 3 (13 tests_* resources), PR 4 (alert_rule, dashboard, dashboard_filter).

🤖 Generated with Claude Code

… alert_suppression_window

Five more resources join the kiota pilot, ported from the resty curation
with every SDK name resolved against the generated surface rather than
guessed: builder chains walked from the path templates, accessors matched
per wire direction -- an expand against the request model, a flatten
against the response -- because kiota's request and response types are
genuinely different shapes (UserRequest carries AllAccountGroupRoleIds
where UserDetail carries AllAccountGroupRoles). 174 bindings now verify
against the SDK, first try.

The port surfaced one emitter gap: a single-object flatten helper always
dereferenced its parameter, which an interface-typed model cannot be. The
new InRef seam mirrors ItemRef -- *in for a struct-access SDK, in for
method access -- and the resty tree is proven byte-identical around it.

Four converter families the admin surface needed: int32 widening to the
schema's int64 (write side deliberately non-generic -- a setter parameter
gives Go nothing to infer from), RFC 3339 string to *time.Time (the shape
the recordings prove the API echoes), yyyy-mm-dd to *serialization.DateOnly,
and Kiota int-enum slices through the ParseX companions (daysOfWeek).

All seven resources reproduce their recorded facts under probe verify;
both pilots' drift checks and all three test suites are green.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@ShocOne
ShocOne merged commit 6154829 into main Aug 5, 2026
14 of 19 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