Requirements
- The Agent Golf GitHub App, installed on the pull request’s repositories. See GitHub Integration.
- A running uplink instance that stores the sessions.
- Session content in your harness telemetry. When a harness sends less content, Uplink finds fewer automatic links. You can still link a session by hand.
Where linked sessions show
- Pull Requests: the agent icon with the number of linked sessions in each row. See Pull Requests.
- Session Attribution on each pull request page: the linked sessions and the share of each session’s cost.
- Dashboard: Your Pull Requests shows the agent icon for each pull request. Needs Attention shows a notice when merged pull requests have no linked session.
- Sessions: the Pull Requests card of each session lists its linked pull requests, with the share of the session cost that goes to each.
What a linked session means
A session links to a pull request through attribution evidence from Uplink, through a manual link, or through both. The evidence gives the session a role: authored or reviewed. A manual link gives no role. A session can link to several pull requests, and a pull request can include sessions from several developers. Without the View Team Activity permission, the counts and costs include only your own sessions. See Default roles. An epoch is one period of the pull request, from one change of its content to the next. Automatic links have two limits:- Time. In the first epoch of a pull request, only evidence from 2 hours before its first commit or its opening, whichever is earlier, counts. A session authors a pull request only with work near its commits. A session can review a pull request until the pull request is merged or closed.
- Authors. A session cannot author a pull request when the person who ran it did not author the pull request or one of its commits. It can still review the pull request. Agent Golf applies this limit only when it knows each author as a workspace user with a linked GitHub account.
Link a session by hand
When attribution finds no link, the session owner can add one. The pull request must already show on the Pull Requests page. Before you begin:- You own the session. A user who can open other users’ sessions cannot link them.
- You have the Attribute Own Sessions permission.
- Open Sessions, then open the session.
- In the Pull Requests card, select Link a Pull Request.
- In Pull Request URL, enter the GitHub pull request URL, for example
https://github.com/acme/widgets/pull/42. - Select Link Pull Request.
agentgolf attribute.
A manual link adds the session to the pull request’s counts, but not to its cost. See Cost of a pull request.
If the dashboard shows The session or pull request was not found for your account., check that the pull request shows on the Pull Requests page and that you own the session.
Cost of a pull request
The cost of a pull request counts only the work of its sessions in their attributed epochs. An attributed epoch of a session is an epoch in which the evidence links the session as authored or reviewed.- Each model request counts for the pull requests whose attributed epochs contain the time of the request. A request outside every attributed epoch adds no cost.
- When the attributed epochs of more than one pull request contain a request, its cost splits evenly between them. The shares add up to the cost of the request.
- The first epoch of a pull request has no start time. When a session works on pull request A, A merges, and the same session then opens pull request B, the work for A counts only for A.
- A session that only a manual link connects adds no cost. The cost shows “N manual links not counted”.
- Without View Team Activity, the cost includes only your own sessions. The split of a request does not change.
Pull request comments
A comment that a session posts on a pull request with the GitHub CLI can count as evidence, for example withgh pr comment or gh pr review. This covers a comment, a review body, and an inline review comment. Uplink matches the comment’s lines with the comments on the pull request, and sends attribution evidence, not the text.
- Evidence from a comment only raises the confidence of a link. It does not link a session by itself, and it gives a session no role.
- A comment does not start a new epoch. Agent Golf reads new comments at the pull request’s next code change and at the merge, so a comment after the last push still counts.
More comment rules
More comment rules
- Evidence from a comment stays when someone deletes the comment.
- The Agent Golf GitHub App’s own comments do not count.
- A comment in the code is part of the diff, so it counts as a normal code change.