feat(kiota): admin wave — account_group, role, user, endpoint_label, alert_suppression_window - #108
Merged
Merged
Conversation
… 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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/packagesdump of builders, accessor maps, constructors, and ParseX companions) instead of guessed-then-corrected. Two rules did the heavy lifting:{param}to the builder's singleBy*indexer (with its real parameter type).UserRequest.AllAccountGroupRoleIds []stringvsUserDetail.AllAccountGroupRoles []Roleable). A both-sides wire must agree on both models.bindings checkpassed 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. NewInRefseam mirrors PR 1'sItemRef:*inunder struct access,inunder 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 staysint64. 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/FrameworkToPtrDateOnly—endRepeat.date.KiotaEnumSliceToFrameworkSet/FrameworkSetToKiotaEnumSlice— int-enum slices throughParseX(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 cassettesprovider generate -check: 0 drift on both pilots (resty byte-identity held through the emitter change)Next: PR 3 (13
tests_*resources), PR 4 (alert_rule, dashboard, dashboard_filter).🤖 Generated with Claude Code