Repository navigation
Conversation
Add --type to access-profiles create and update, mapping to the RequestCatalog.type field. Accepted values: birthright (alias: role) → REQUEST_CATALOG_TYPE_BUNDLE, catalog → REQUEST_CATALOG_TYPE_CATALOG, hybrid → REQUEST_CATALOG_TYPE_CATALOG_AND_BUNDLE. Full REQUEST_CATALOG_TYPE_* values pass through for forward compatibility. Birthright profiles reject --published and all enrollment/unenrollment behavior flags client-side (exit 2), quoting the server error "access profile type Birthright does not support entitlement request settings". Docs also cover the update-time constraint "turn off requests before changing the profile type to Birthright". Closes: global-w291.1 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The writer-guard TestNoPresenceAsContent flagged the new validateBirthrightConstraints helper's Changed() calls. They are a legitimate presence check (the server rejects these flags if passed at all with --type birthright, regardless of value), so add a reasoned allowlist entry.
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.
What
Adds a
--type birthright|catalog|hybridflag toaccess-profiles createandaccess-profiles update, mapping to thetypefield on theRequestCatalogAPI object (REQUEST_CATALOG_TYPE_BUNDLE/CATALOG/CATALOG_AND_BUNDLE;roleis an alias forbirthright). Documents the Birthright constraints discovered along the way in--help, README, andcmd/agents.md, and rejects--published/--enrollment-behavior/--unenrollment-behavior/--unenrollment-entitlement-behaviorclient-side (exit 2) when combined with--type birthright, quoting the server's own error.Why
access-profiles create/updatehad no--typeflag, so creating or updating Birthright (Role) profiles required a rawc1i apicall with a hand-builtprofileTypefield. 25 rawPOST /api/v1/catalogscalls and 2 rawPOST /api/v1/catalogs/{id}calls were observed in one day as a workaround. The Birthright-specific constraints (no entitlement request settings; must disable live requests before switching a profile to Birthright) were undocumented.Bead: global-w291.1
Fixes #296
Verification
go build ./...,go vet ./...— cleango test ./...— all packages passgo test -count=1 -shuffle=on ./...— all packages passgo run github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.15.0 run --timeout=3m ./...— 0 issues--typeenum mapping (create and update) and the client-side Birthright rejection of--published/enrollment/unenrollment flags, plus a regression guard that non-birthright profiles still accept--publishedtypeenum and docstrings viac1i docs endpoint /api/v1/catalogs(CATALOG/BUNDLE/CATALOG_AND_BUNDLE/UNSPECIFIED; the undocumentedPROFILEvalue is intentionally not exposed as a CLI alias)origin/main(4cc8d43; already up to date, no conflicts)TestNoPresenceAsContent) by adding a reasoned allowlist entry for the new presence check invalidateBirthrightConstraintsOpened from Charles's local c1i issue triage.