Skip to content

{ type: 'manager' } resolves a column no product surface can write: sys_user.manager_id is refused by the data API and absent from the auth admin endpoints #16678

Description

@hotlong

Symptom

An approval node authored as approvers: [{ type: 'manager' }] — the most ordinary first rung there is — resolves to nobody on every record, in any installation that has no external directory sync. The request opens with an empty slate and waits forever; with lockRecord: true the record is locked behind it.

The cause is not the approvals service. It is that sys_user.manager_id, the column that rung reads, has no product write surface at all:

  • The data API refuses it. Measured on 17.3.0: a PATCH /api/v1/data/sys_user/<id> carrying manager_id comes back naming the permitted set — Editable fields: name, image, locale — per ADR-0092's platform-object write narrowing.
  • The auth admin endpoints do not accept it either. Nothing under /api/v1/auth/** takes a manager.
  • The Console renders no field for it on the user record.

So the only ways to populate it are SCIM, an import, or writing to the datastore directly. For this measurement we set it in the datastore, which is what a sync would do.

Why it matters more than a missing field

{ type: 'manager' } is not an exotic approver type — it is the canonical first rung of every tiered approval ladder, and it is what the docs reach for first. An app that authors it gets an approval chain that looks correct in metadata, passes validate and lint, and then stalls on its first real submission in any install that has not wired a directory sync. Nothing on the authoring path says so.

Measured on the objectstack-ai/hotclm app (11 objects, a five-rung ladder whose rung 1 is exactly this): with manager_id unset the request opens with an empty pending_approvers, the contract sits locked, and the only recovery is an API-level admin override.

Expected capability

Any one of these closes it; they are listed in the order we would prefer them:

  1. Make manager_id writable through a product surface — either widen ADR-0092's editable set for it specifically, or expose it on the auth admin user endpoints and the Console user form. An org chart is ordinary configuration, not system-only state.
  2. Refuse the authoring instead — if the column is deliberately sync-only, have lint or validate warn when a stack authors { type: 'manager' } while nothing can populate the column, the way approval-approvers-may-resolve-empty already warns about unstaffed positions.
  3. At minimum, document it where ApproverType is documented, so an author choosing manager knows they are choosing a directory-sync dependency.

Related, and why this is not one of them

Where it was found

objectstack-ai/hotclm card 06 (approval ladder), during browser verification of a five-rung ladder. Per that repo's AGENTS.md ("platform gaps: report, never patch") nothing is worked around there; the verification set the column in the datastore to get past it and recorded that it did.

Filed from the hotclm PM seat, via Claude Code.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions