Skip to content

Enforce ADR 0107 bot authorization in the GitLab poll and webhook event path before routing #9065

Open

Description

@fullsend-ai-triage

Context

Part of ADR 0107 bot authorization for GitLab events (parent tracking issue #8329; original scope in #9059). GitLab source events enter through Poller.Run (scheduled/event polling) and Poller.RunWebhook (native webhook fast path). Both use Poller.toNormalizedEvent in internal/poll/convert.go and the same dispatch spine, currently routed through dispatch.HarnessRouter. Jira events sent to GitLab with jira-poll --target-forge gitlab are out of scope.

Depends on

The trusted actor-ID to bot-role resolver and the legacy project-access-token bot ID sub-issues. Do not start until both have landed.

What should happen

  • In the shared converter, resolve positively identified bots with the trusted resolver. Bots keep actor.role: none and carry actor.bot_role and actor.role_verified as appropriate. internal/normevent already defines and validates these fields (a set bot_role requires role_verified: true).
  • Deny non-label bot events with a successful no-match or lookup failure before dispatch.EventRouter (currently HarnessRouter) and pipeline dispatch. Never fall back to project-membership authorization for bots.
  • Preserve the existing human permission mapping and the current bot-event loop filters. Registration alone must not admit every bot-authored comment or transition.
  • Preserve label-added authorization only when GitLab provides authoritative actor-to-transition evidence per ADR 0107; otherwise use the ordinary gate.
  • If GitLab later moves to the CEL dispatch adapter, keep bot authorization ahead of CEL evaluation.

Tests

Run each case through both polling and webhook paths: registered bot (Analyst ID, treated as review), bot during rotation (old and new IDs), unregistered bot who is a project member, human-owned supplied credential, legacy project-access-token bot, lookup failure, human writer, bot label with authoritative evidence, and bot label without it. Assert actor.role, bot_role and role_verified. Denied rows must assert zero agent dispatches; positive controls must prove the harness ran.

Docs

Update the authorization and normalized-event documentation.

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:49 AM UTC

    Commit: c7652ad · View workflow run →

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

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

    @fullsend-ai-triage
    Author

    This issue is well specified, but it cannot be started yet. As its description says, it depends on two sub-issues that are both still open, with no pull requests in flight for either:

    Once both are closed, this issue can be re-triaged and implementation can begin. No other blockers or open questions were found.

    Blocked by:

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

    blockedready-for-triage

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions