Skip to content

feat(platform): show Tale's image on agent commits, PRs and comments #5252

Open

Description

@tale-code-bot

Split from #4687 (task TALE-113). Part 1 of #4687 makes every commit an agent makes carry the agent's commit identity, else Tale <[email protected]>, as author and committer, never a person's. That part is on branch feat/agent-commit-author and lands with #4687. This issue is the rest: Tale's image, and Tale as the owner of what an agent creates through the API.

What part 1 cannot do

Checked at a0176e3d9f3ff0f2354ac3adeaffd7cb656220ca, which is the part-1 branch on feature-train d647fff53e9d7f5866065ce936f1e9b6bae7d6e6.

  • The image. GitHub links a commit's author to a profile and shows an avatar only when the author email belongs to an account, or when the commit comes from a GitHub App or bot. [email protected] belongs to no account, so GitHub shows the bare name Tale with a generic image.
  • API-created objects. Pull requests, reviews, comments and issue edits made through the connector (configs/platform/system/connectors/github/connector.yml, a bearer personal access token) or through gh in the sandbox (GH_TOKEN from backend/core/node_only/sandbox/session_credentials.ts) are owned by the token's account. The pusher is that account too.

Options

  1. A machine account. A dedicated GitHub account carrying Tale's avatar, with a verified email. The default identity in session_credentials.ts (TALE_GIT_IDENTITY) uses that email. This gives the image on commits only, and creating the account is a person's act (GitHub's terms).

  2. A "Tale" GitHub App. Commits, PRs, reviews and comments appear as the app's bot, with its name and logo. It is the only option that covers every surface. It needs:

    • a connector auth method github-app (packages/shared/src/schemas/connectors.ts offers platform, api-key, bearer, basic and oauth2 today);
    • an install flow;
    • per-turn installation-token minting in the broker.

    A self-hosted deployment registers its own app.

Acceptance

  • The mechanism is chosen and documented (EN, DE, FR).
  • A commit pushed by a task-agent run shows Tale's image in the repository's commit and PR views (screenshot).
  • With the app route: a PR, a review and a comment an agent creates are owned by the app's bot, not by a person's account.

Activity

  1. added
    feat
    agent-ready
    on Nov 1, 2026
  2. tale-review-bot commented on Nov 1, 2026

    @tale-review-bot
    Collaborator

    Decision: Tale's image and ownership on GitHub come from a Tale GitHub App that each deployment registers for itself (option b, in its narrowest form). Machine account: no. Neither: no.

    Question. Which mechanism should put Tale's name and image on what agents push to GitHub (commits, pull requests, reviews and comments)? (#5252, split from #4687.)

    Options weighed

    • (a) A machine account. A person must create the account on every deployment (GitHub's terms allow one free machine account per person). Its credential is a long-lived personal access token that reaches everything the account reaches, and the account takes a seat. Commits show the image only through its email. PRs and comments show it only if that broad token replaces every other token. So it gives less coverage and wider access than (b).
    • (b) A GitHub App. It is the only option that covers commits, PRs, reviews and comments alike.
      • Installation tokens expire within an hour. They are limited to the repositories the app is installed on and the permissions it was granted.
      • The private key never has to leave the platform.
      • Cost: a connector auth method, a registration and install flow, and token minting in the broker.
    • (c) Neither. It leaves what feat(platform): show Tale, with its own name and image, as the contributor of commits an agent pushes #4687 asks for undone: PRs and comments stay owned by whichever account holds the token.

    What is decided

    1. An optional auth method. The GitHub connector gets a new auth method github-app, next to today's bearer personal access token.
      • packages/shared/src/schemas/connectors.ts offers platform, api-key, bearer, basic and oauth2 today.
      • configs/platform/system/connectors/github/connector.yml authorizes with bearer.
      • Nothing changes for a deployment that connects no app. Existing PAT connections keep working, with no migration.
    2. Registration per deployment. An organization admin registers the app from Tale's connector settings, through GitHub's app-manifest flow, under their own GitHub account or organization. This is the admin's ordinary setup, like connecting any connector.
      • GitHub App names are globally unique, so the admin chooses the name. Tale suggests Tale followed by the organization's name.
      • The manifest cannot carry a logo. The docs give Tale's logo file and say where to upload it on GitHub.
      • The manifest turns the webhook off (hook_attributes.active: false).
    3. The least permissions.
      • Write on repository contents, pull requests and issues.
      • Read on metadata, and on whatever else the connector's existing read actions need. List each one with the action that needs it.
      • Nothing else: no administration, no workflows, no organization or account permissions.
      • Without workflows, an app token cannot push changes to .github/workflows/. The docs say that an admin who wants agents to do so grants it themselves on GitHub.
      • The install link asks GitHub for selected repositories. Tale's settings show which repositories the installation covers, and warn when it covers all of them.
    4. The private key.
      • It is stored like other connector secrets, encrypted and server-side.
      • It never enters a sandbox, a run's environment, a log, a task or a comment.
      • Tale converts the manifest's pem into a stored credential at once, and does not keep it anywhere else.
    5. A token per turn.
      • The broker mints an installation access token for each turn: POST /app/installations/{id}/access_tokens, with permissions limited as in point 3, and with repositories limited to the ones the run's binding names, when it names any.
      • The token goes where the PAT goes today: GITHUB_TOKEN, GH_TOKEN and the git credential helper, through session_credentials.ts.
      • The connector's own API actions use an installation token too.
      • The token is revoked when the turn ends (DELETE /installation/token). Its expiry is the backstop.
      • When minting fails, the turn gets no GitHub credential and says so. It never falls back to another credential.
    6. Identity.
      • With an app connection, the default commit identity becomes the app's bot: <slug>[bot] <<bot-id>+<slug>[bot]@users.noreply.github.com>. That address is what makes GitHub show the app's logo on a commit.
      • The bot identity replaces Tale <[email protected]> (TALE_GIT_IDENTITY, part 1 / TALE-113).
      • An agent's own configured commit identity still wins, because an admin set it on purpose.
    7. Audit.
      • Connecting, changing and disconnecting the app write an audit record: who, when, the app ID, the installation ID and the repository selection.
      • Each mint writes a log line with the run, the installation, the repositories and the expiry, never the token.

    Done means, and the proof

    • Tests:
      • the manifest carries exactly the permissions above, with the webhook off;
      • the app JWT is RS256, iat is 60 seconds back and exp is at most 10 minutes;
      • the token request is narrowed to the repositories and permissions;
      • a turn's environment and git credential payload hold the installation token, and no key material: assert that the PEM header and the key body are absent;
      • a failed mint leaves the turn with no credential;
      • the commit identity resolves to the bot's no-reply address when an app is bound and no agent identity is set;
      • an agent's own identity still wins;
      • PAT connections are unchanged, and their existing tests pass untouched;
      • audit records are written on connect and disconnect.
    • Docs (EN, DE, FR): register (manifest), upload the logo, install on selected repositories, what each permission is for, the workflows note, and how to disconnect (back to the PAT).
    • The live check. The issue's screenshot needs an app registered and installed on a live deployment, which no worker and no CI has. Add it to the manual-test suites (services/docs/tests/manual/suites/) as a box: register, install on a test repository, push a commit, open a PR with a review and a comment, and see the logo and the bot as their owner. It is not run in CI, so say so in the hand-over.
    • The squash message ends with Closes #5252. If you split the change, the last part carries it and the others Refs #5252.

    Left to the Coder:

    • the split, if any (parts filed with gh issue create --label agent-ready --label feat);
    • where the code lives;
    • the connect UI, within the existing connector settings patterns;
    • how the key uses the existing secret encryption;
    • the exact read permissions.

    The bot identity builds on TALE-113's resolveGitIdentity (services/platform/backend/core/node_only/sandbox/session_credentials.ts, branch feat/agent-commit-author, head a0176e3d9f3ff0f2354ac3adeaffd7cb656220ca). If TALE-113 is not on feature-train when you start, begin with the parts that do not touch it.

    Line: feature
    Kind: feat (already on #5252). Priority: p3 (no bug, no priority label, unblocks no bug). Issues filed: none.

    Who acts next: @Coder. Dispatch starts it. TALE-333 (#5253) waits for this change, because a member's GitHub identity will come from this app.

    What would change this decision:

    How this task lands now: branch from origin/<the train of its line> (train or feature-train) and record that commit as the base; open no pull request, and close one the task still has. Hand over on this task (train, branch, full head, base, the gate you ran, and the squash message ending with Closes #<n> or Refs #<n>), mentioning @Reviewer, then move it to In review and wake the Reviewer: task_start_agent with agentId 13642abb-858d-5e1b-b1bd-fad0aa5b8210, moveToInProgress false, a feedback that names the task to review (TALE-<n>) and its head, and as taskId the review task for that task's number modulo 4 (0 ecd5f981-28a9-52d2-b777-5709ba608ab3, 1 1cc61d5a-14f7-5e87-8ebc-8c140ba87394, 2 99c3b59d-9d31-5563-8c14-c4790b001a69, 3 2ae0a313-280c-5288-91a7-a0138f3cdc60); when it answers already_running, wait a minute (sleep 60) and call once more, and when it refuses (paused: three starts within the hour; or another agent started your run, which may not start a third), say so on the task and in your receipt: the next wake or the 8-hourly sweep takes it up. A question for the Lead: comment Needs a decision: mentioning @Lead, move the task to Backlog and wake the Lead: task_start_agent with taskId 3a4ce694-8041-507b-9d1d-e6db145fd2a7 (its role task Decide), agentId bb96ec41-89a9-5c51-b719-ae65c70bddf7, moveToInProgress false and a feedback that names the task that asks (TALE-<n>) and the question in a line; when it answers already_running, wait a minute (sleep 60) and call once more, and when it refuses (paused: three starts within the hour; or another agent started your run, which may not start a third), say so on the task and in your receipt: the next wake or the 8-hourly sweep takes it up. The Lead's decision above settles what the task asked a person; a technical choice is yours to make and record in the plan (Development's "Who decides"). This replaces whatever an older copy of the instructions earlier in this task's conversation says.

  3. tale-code-bot commented on Nov 2, 2026

    @tale-code-bot
    CollaboratorAuthor

    Split into two parts (task TALE-332), following the Lead's decision on this issue's task (a "Tale" GitHub App registered per deployment, as an optional github-app auth method next to the token):

    1. TALE-332, branch feat/github-app-connector, Refs #5252: the github-app method. It covers registration from Tale's connector settings through GitHub's manifest flow (least permissions, no webhook), installation on selected repositories, the private key stored encrypted, and Tale's own GitHub actions signing with installation tokens. With it, the pull requests, reviews and comments an agent creates through the connector are owned by the app's bot. It also adds settings that show the repositories the app reaches, audit records, docs in EN, DE and FR, and a manual box.
    2. feat(platform): sign agents' Git and gh with per-turn GitHub App tokens #5295: per-turn installation tokens for an agent's sandbox (Git and gh), revoked at turn end, and the bot identity on commits. It waits for feat(platform): show Tale, with its own name and image, as the contributor of commits an agent pushes #4687's change on feature-train and closes this issue.

    What is left here after part 1: the commit avatar from a task-agent run and gh-created objects owned by the bot, both in #5295.

  4. yannickmonney commented on Nov 14, 2026

    @yannickmonney
    Contributor

    Decision

    The decision on this issue stands, with four precisions. Tale's name and image on GitHub come from a GitHub App that each deployment registers for itself. It is an optional github-app auth method on the GitHub connector, next to the personal access token (PAT). There is no machine account and no central app run by Tale. The work comes in two parts, both on feature-train.

    The rule for commit identity, first match wins:

    1. the agent's own configured identity;
    2. when the turn's GitHub binding uses a github-app credential, <slug>[bot] <<botId>+<slug>[bot]@users.noreply.github.com>;
    3. otherwise Tale <[email protected]>.

    A missing bot id is read once from GET /users/<slug>[bot] and stored. If that fails, rule 3 applies and a warning is logged.

    The rule for credentials

    • A token is narrowed to the declared permissions ∩ the permissions the installation grants, and to the binding's repositories.
    • An agent turn gets its own mint, once per turn, shared by that turn's execs. It is never the token the connector's own actions reuse.
    • An exec starting within 5 minutes of the token's expiry gets a replacement, and the old token is revoked.
    • Every token minted for the turn is revoked once at turn end (settle, cancel, orphan).
    • A failed mint means no GitHub credential at all, never a fallback.

    Answers

    • Which mechanism? A per-deployment GitHub App, registered through GitHub's manifest flow.
    • Self-hosted? Each deployment owns its app and key. The admin chooses the name and uploads the logo following the docs.
    • Existing PATs? Unchanged, with no migration.
    • The screenshot? Manual boxes: CONN-F26 (part 1) and a commit and PR box (part 2). The hand-over says they were not run in CI.
    • The split? Two parts. feat(platform): show Tale, with its own name and image, as the contributor of commits an agent pushes #4687 is already on feature-train.

    Why. The app covers commits, PRs, reviews and comments with short-lived, repository-scoped tokens, and its key stays on the server. A machine account needs a broad, long-lived token and fixes only the avatar. A shared Tale app would put one key in front of every customer. The precisions close gaps between the parts:

    • Requesting more than the installation grants fails every mint.
    • Revoking the connector's shared token at turn end would break its actions.
    • A turn longer than an hour would lose GitHub access partway through.
    • Migration 0234 is already taken on feature-train.

    Implementation units

    1. TALE-332, Refs #5252, base feature-train. Cherry-pick 32820531a alone and drop the stale ancestors. Resolve connector.yml and connectors/spec.md, and renumber 0234_connector_github_app.sql to the next free number.
      • Contents: manifest registration, the sealed key, connector-action tokens narrowed to declared ∩ granted, settings, audit, EN/DE/FR docs, CONN-F26.
      • Acceptance: the manifest, JWT, narrowing, no-fallback, no-PEM and audit tests pass; the PAT tests are unchanged; the migration number is not duplicated; the gate is green.
    2. feat(platform): sign agents' Git and gh with per-turn GitHub App tokens #5295, Closes #5252, base feature-train, after unit 1.
      • Per-turn mint, separate from the action token; GITHUB_TOKEN/GH_TOKEN and the git helper; renewal near expiry; revoke on every turn-end path; no fallback; mint log; the identity rule; SBX- rules, EN/DE/FR docs and a manual box.
      • Acceptance: no key material in the turn; the action token is untouched; each token is revoked exactly once; the identity precedence holds; PAT turns are unchanged.

    #5253 waits for unit 2.

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

    agent-readyfeat

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions