Skip to content

Let harness scripts resolve a bot's registered role (ADR 0107) #9602

Done

Description

@tpouyer

Problem

Shipped agent scripts need to know whether a comment on an issue or PR was written by a registered Fullsend bot. They have no way to get that answer under ADR 0107, so they recognise the bot by its GitHub App name instead.

ADR 0107 and Authorization v2 require more than a naming convention. A bot counts only when its verified identity resolves to an exact registered actor.bot_role, through the mint or an equivalent trusted lookup. A name list also lets anyone who can register an App with a matching slug pass as the triage or review bot.

The resolver exists (internal/botidentity, the mint's POST /v1/bot-role), but only fullsend dispatch uses it (internal/cli/dispatch_botrole.go). A harness pre- or post-script can't call the mint itself. The lookup authenticates with the job's GitHub Actions OIDC token, and fullsend run withholds ACTIONS_ID_TOKEN_REQUEST_URL and ACTIONS_ID_TOKEN_REQUEST_TOKEN from child scripts (oidcDenyKeys in internal/cli/run.go, ADR 0073), which is correct.

What should change

Give host-side harness scripts the ADR 0107 bot-role result for a comment, without giving them the OIDC token. On GitLab and Jira one account can post for several roles, so the question is which role produced a comment, not which role a login holds (agreed in review on #9661):

  • fullsend bot-role --entity <entity.id> --comment <action id>, available to pre- and post-scripts under fullsend run. <entity.id> is the canonical fullsend:entity:v1:… ID from the normalized entity spec, and <action id> is the comment's action id from the same spec.
  • The answer means the same as the snapshot's entity.comments[].actor.bot_role: the registered role of the comment's current-revision actor, so an edit by someone else answers for the editor. It prints the role or no_match, and a lookup that cannot be completed exits non-zero with empty stdout.
  • Only comments on the run's own entity are answered, and fullsend run exports that entity's ID to the scripts.
  • GitHub resolves the actor through the mint (ADR 0107) with the runner's own OIDC token. GitLab and Jira exit non-zero until signature verification (#9263) or an equivalent trusted lookup exists there.

The entity-context-snapshot in ADR 0141 will carry bot_role for every admitted comment and can answer the same question once it exists.

Done when

Activity

  1. self-assigned this
    on Nov 17, 2026
  2. fullsend-ai-triage commented on Nov 17, 2026

    @fullsend-ai-triage

    🤖 Finished Triage · ✅ Success · Started 2:20 PM UTC · Completed 2:22 PM UTC

    Commit: 3e8fae6 · View workflow run →

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

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

    @fullsend-ai-triage

    Triage found this ready for implementation. Findings beyond the issue text:

    Proposed test case

    With a fake BotRoleResolver:
    1. registered login -> prints exact role, exit 0
    2. unregistered login -> prints no_match, exit 0
    3. resolver returns ErrLookup -> distinct failure outcome, no role printed
    4. OIDC token never appears in output or in the script's environment
    5. missing mint URL / OIDC env -> lookup failure, not no_match
    

    Next steps:

    • /fs-code — agent creates a PR to implement this issue
    • /fs-code <your instruction> — agent implements with your specific guidance
  5. added 6 commits that reference this issue on Nov 18, 2026
  6. 128 remaining items

  7. added 12 commits that reference this issue on Nov 26, 2026
  8. added a commit that references this issue on Nov 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

pr-open

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions