Repository navigation
fix(web): accept Apple's zero-total placeholder on Bundle ID App Group graphs - #2855
Merged
rudrankriyam merged 1 commit intoOct 3, 2026
Conversation
…p graphs
App Group assign, unassign and set refused every Bundle ID with a
capability: Apple reports the selected bundleIdCapabilities relationship
with a paging total of 0 beside the linkage it returns, echoing the
requested include limit ({"total":0,"limit":50}), and the nested appGroups
relationship of the APP_GROUPS capability with the unbounded placeholder
Services IDs already carry ({"total":0,"limit":2147483647}).
The placeholder is accepted only when it proves the relationship complete:
with an include limit requested, the reported limit must be that one and
fewer resources must come back than it allows; with none requested, it must
be the unbounded limit. A continuation link, a different or missing limit,
a full page, or a real shortfall still fail closed before any write.
Fixes rorkai#2854
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.
Fixes #2854.
Problem
asc web app-groups assign,unassignandsetrefuse every Bundle ID that has a capability:Apple returns two zero-total placeholders on the Bundle ID detail read (captured 2026-10-03):
bundleIdCapabilitiesrelationship reports{"total":0,"limit":50}, echoing the requestedlimit[bundleIdCapabilities], beside complete linkage.appGroupsrelationship of theAPP_GROUPScapability reports{"total":0,"limit":2147483647}, the same unbounded placeholder already handled for Services IDs (serviceIDCapabilityPlaceholderLimit). With only the first fixed, the write is accepted but its verification read fails withAPP_GROUPS appGroups relationship returned 1 of 0 resources.Fix
validateDeveloperRelationshipCompletenessaccepts a zero total only when it proves the relationship complete:A continuation link, a different or missing limit, a full page at the requested limit, or a real shortfall still fail closed before any write.
Tests
TestAssignDeveloperAppGroupAcceptsZeroTotalCapabilityPlaceholder: an end-to-end assign using both captured shapes, before and after the PATCH. It was RED with the reported error, then the verification error, and is now GREEN.TestValidateDeveloperRelationshipCompletenessZeroTotalPlaceholder: a table of accepted placeholders and the cases that must stay rejected.Verification
already-assignedfor both, read back through the fixed verification path.make format(no changes outside this diff),make lint(0 issues),make check-docs,make build, andASC_BYPASS_KEYCHAIN=1 go test ./internal/web/all pass./reviewgate.ASC_BYPASS_KEYCHAIN=1 make testreports four failures that also fail on unmodifiedmainon this host (Go 1.27.1, newer than the module'sgo 1.26.6):TestVerifyMachOAgreesWithCodesignOnSystemBinaryand…OnLaunchConstrainedBinary: x509 rejects SHA1-RSA in Apple's chain.TestParseCapabilitySettingsRejectsInvalidStructureandTestBundleIDCapabilitiesSettingsValidationStopsBeforeHTTP: the expectedencoding/jsonerror text differs.They're unrelated to this change.