Skip to content

Add a trusted GitLab actor-ID to ADR 0107 bot role resolver from role registry and rotation state #9064

Open

Description

@fullsend-ai-triage

Context

Part of ADR 0107 bot authorization for GitLab events (parent tracking issue #8329; original scope in #9059). The poller currently resolves every actor through project membership. It needs a reusable, trusted lookup that maps an exact numeric GitLab user ID to a canonical ADR 0107 bot role.

What should happen

  • Add a small shared reader (likely in or alongside internal/gitlabroles, reading rotation state types from internal/repos) that builds an exact numeric-ID to role map from FULLSEND_GITLAB_ROLE_REGISTRY (role policy) and FULLSEND_GITLAB_ROLE_ROTATION (account IDs: managed_user_id and supplied_user_id), including current and overlapping identities during rotation. Prefer this recorded mapping over runtime account enumeration.
  • For this scope assume the shared Analyst credential identity maps to the ADR 0107 role review. The Analyst account is shared by review, triage and retro, and account identity alone cannot tell them apart, so all of them resolve to review.
  • Verify the actor is a bot or service account before assigning a bot role. A supplied credential can belong to a human, so its owner ID alone must not grant bot authorization.
  • Return distinct outcomes: verified match (role), verified no-match (empty role, verified), and lookup failure (unverified). The latter two both deny at the gate, but must stay distinguishable.
  • Treat credentials flagged ambiguous (see the legacy project-access-token sub-issue) as no canonical role, and deny.
  • The registration must come only from administrator-controlled installation state, never repository or event content.

Open question for the implementer

Confirm the poller and dispatcher CI jobs can read the rotation variable at runtime. If they cannot, determine how the trusted mapping reaches them.

Acceptance

Unit tests cover: registered Analyst ID, rotation with old and new IDs, an unregistered bot, a human-owned supplied credential, ambiguous credential, missing or malformed state (lookup failure), and no-match.

Relationships

Blocks the poller wiring sub-issue.

Activity

  1. added
    ready-for-triage
    on Nov 3, 2026
  2. fullsend-ai-triage commented on Nov 3, 2026

    @fullsend-ai-triage
    Author

    🤖 Finished Triage · ✅ Success · Started 9:48 AM UTC · Completed 9:50 AM UTC

    Commit: c7652ad · View workflow run →

    Runtime: claude · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $0.13

  3. added
    feature
    triaged
    on Nov 3, 2026
  4. fullsend-ai-triage commented on Nov 3, 2026

    @fullsend-ai-triage
    Author

    Triage notes for the implementer:

    Proposed test case:

    Table-driven resolver tests:
    - registered Analyst ID -> verified match, role 'review'
    - rotation overlap (old + new IDs) -> both resolve to same role
    - unregistered bot ID -> verified no-match (empty role)
    - human-owned supplied credential -> denied
    - ambiguous-flagged credential -> no role, denied
    - missing/malformed registry or rotation state -> lookup failure (unverified)
    - zero/negative IDs -> never match
    

    Next steps:

    • /fs-code — agent creates a PR to implement this issue
    • /fs-code <your instruction> — agent implements with your specific guidance
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureready-for-triagetriaged

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions