Skip to content

OBJECT_API_METHOD_NOT_ALLOWED names an operation its own allowed array contains — the refusal reports the conjunct that PASSED #15416

Description

@hotlong

Measured in passing while driving sys_user write doors for cloud#1989, on a real
walled boot of the cloud control plane at framework pin 5b2ad1b41.

What was measured

sys_user declares enable.apiMethods: ['get','list','update','bulk']
(packages/platform-objects/src/identity/sys-user.object.ts:907). Three requests,
each refused, each naming an operation that its own allowed array contains:

POST /api/v1/data/sys_user/deleteMany   -> 405
{"error":"API operation 'bulk' is not allowed on object 'sys_user'",
 "code":"OBJECT_API_METHOD_NOT_ALLOWED","object":"sys_user",
 "allowed":["get","list","update","bulk","aggregate","history","search","import","export"]}

POST /api/v1/data/sys_user/createMany   -> 405   (identical envelope)
POST /api/v1/batch                      -> 405   (identical envelope)

POST /api/v1/data/sys_user/import       -> 405
{"error":"API operation 'import' is not allowed on object 'sys_user'", ...
 "allowed":[... ,"import","export"]}

bulk is in the allowed set and the refusal says bulk is not allowed. Same for
import. Meanwhile POST /api/v1/data/sys_user/updateMany and
POST /api/v1/data/sys_user/batch — which also need bulk — are ADMITTED and
answer 200. So the refusal is correct in outcome (deleteMany needs bulk AND
delete; createMany needs bulk AND create; import needs a create face) but the
message names the wrong conjunct: it reports the conjunct that PASSED.

Why this is worth a card rather than a shrug

The allowed array is load-bearing as a DISCRIMINATOR, not decoration.
apps/cloud/test/unscoped-control-plane-tenant-wall.test.ts states the rule it
inherited from cloud#1225: a declaration re-widened to create/update can still
405 for an unrelated reason, so only the set proves WHICH gate answered. An
envelope whose set contradicts its own message cannot serve that purpose — a
future measurement reading it concludes the object still has the verb open when
the gate in fact closed a different conjunct, or the reverse.

Suggested shape

The refusal should name the conjunct that actually failed (delete / create),
or the allowed set should be the set the gate evaluated against. Either one
makes message and set agree; shipping both as they are makes the envelope
self-contradicting.

Filed with no assignee by the cloud#1989 measurement seat. Not repaired there:
that card is measurement-only and this is a framework-owned surface.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions