Skip to main content

Module liveness

Module liveness 

Source
Expand description

GitLab LivenessProbe impl per ADR-021 §6.

Hits GET /api/v4/personal_access_tokens/self with the supplied token. The endpoint returns the token’s own metadata when authenticated:

{
  "id": 1,
  "name": "deploy",
  "active": true,
  "expires_at": "2026-08-01",
  "scopes": ["api", "read_repository"]
}

expires_at (when present) is plumbed straight into LivenessResult::expires_at so P9.3 can write it back into the global index. active = false maps to LivenessStatus::Revoked.

Error mapping:

StatusMapping
200, active=trueLive
200, active=falseRevoked
401Revoked
403Revoked
429Throttled (Retry-After)
otherError