The genie_space permissions prefix was registered as "/genie/spaces/",
which parsePermissionsID interprets as 4 segments and routes to
PUT /api/2.0/permissions/genie/spaces/<id>. That endpoint does not
exist; the workspace API returns 404 ENDPOINT_NOT_FOUND, which is what
motivated the earlier rejection mutator.
The actual permissions path is /api/2.0/permissions/genie/<id>
(3 segments, RequestObjectType="genie"). This matches:
- the SDK iam path builder at service/iam/impl.go (uses
"/api/2.0/permissions/%v/%v")
- the CLI's own "databricks permissions get/set genie <id>" command,
which lists "genie" as a valid REQUEST_OBJECT_TYPE
(cmd/workspace/permissions/permissions.go)
Fix the bundle prefix and the matching testserver whitelist entry,
which both had the same wrong path and therefore masked the bug in
acceptance tests. Regenerate the affected acceptance fixtures.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Summary
Five-line fix on top of #5282. The genie_space permissions prefix was registered as
/genie/spaces/— a 4-segment path thatparsePermissionsIDreads asRequestObjectType="genie/spaces", routing to:That endpoint does not exist (404 ENDPOINT_NOT_FOUND, which is what motivated
41b19bb5b"reject genie_space permissions during plan"). The actual production path is 3-segment:with
RequestObjectType="genie". This matches:service/iam/impl.go(uses"/api/2.0/permissions/%v/%v")databricks permissions get/set genie <id>command —genieis listed as a validREQUEST_OBJECT_TYPEincmd/workspace/permissions/permissions.go:100databricks permissions set genie <id> --json …(I run this in a Genie-space Git-versioning tool against a real workspace daily)The acceptance test passes today only because
libs/testserver/permissions.gohas the same"genie/spaces": "genie-space"entry — both halves of the wire format agree on the wrong path, so production breakage is invisible in CI.If #5282 ships with
/genie/spaces/, any deploy withpermissions:on a genie_space will 404 against production. Sincee4809d65a"Agent review" already deleted the rejection mutator and added the positive test, this just makes the positive test exercise the right URL.Changes (5 lines)
bundle/direct/dresources/permissions.go"/genie/spaces/"→"/genie/"libs/testserver/permissions.go"genie/spaces"→"genie"bundle/direct/dresources/all_test.goObjectIDmatches new prefixacceptance/.../current_can_manage/out.requests.deploy.direct.json-update:PUT /api/2.0/permissions/genie/[FOO_ID]acceptance/.../current_can_manage/out.plan.direct.json/genie/${...id}Test plan
go test ./bundle/... ./libs/testserver/...— passgo test ./acceptance -run 'TestAccept/bundle/resources/permissions/genie_spaces'— pass after-update./task lint-q— 0 issuesDrive-by observation (out of scope for this PR)
Independent of this fix, two acceptance fixtures on #5282 reproduce as stale without my changes:
acceptance/bundle/resources/genie_spaces/simple/out.plan.json—serial: 7vs actual1acceptance/bundle/refschema/out.fields.txt— missingresources.genie_spaces.*.etagBoth look like they need
./task test-updatefrom a clean rebase. Flagging here rather than fixing — out of scope.Closes when
#5282 lands. Either cherry-pick
6767037directly, or this becomes a normal PR againstmainafter #5282 merges.