Skip to content

GitLab ​

A GitLab account connects Clusto to gitlab.com or a self-managed GitLab instance. One host node holds the account's token and polls GitLab (optional standby nodes take over while it is offline): the projects of the account's group (subgroups included) and their open merge requests, each with the status of its head pipeline. The software factory uses a Factory GitLab account to open merge requests in that group. There is no GitLab view in the app yet; Settings shows each account's token status, what the last poll found and any error. GitLab accounts are free on every plan.

Early access

GitLab accounts ship behind the gitlab.accounts release flag, which is off by default. Turn it on in Settings -> Labs. The flag only shows or hides the Settings -> GitLab tab; accounts saved earlier keep polling either way. See Feature Flags.

Set up ​

  1. Open Settings -> GitLab and press Add GitLab account.
  2. Fill in the fields:
    • Name: a label for the account.
    • Host node: the node that normally polls GitLab and holds the token. Pick a node no agent can read: the token can write to every project it covers.
    • Standby nodes: optional. A checkbox list under Host node; the nodes that take over polling while the host is offline, in the order you check them (see Standby nodes).
    • GitLab URL: keep https://gitlab.com, or enter your self-managed instance (https://gitlab.example.com, a path prefix is fine). Plain http:// is accepted only for a loopback host, such as a local test instance.
    • Group: the full path of the top-level group or user namespace the account works in (acme or acme/platform). Subgroups are included. Leave it empty on a Browse account to list the projects you are a member of. A Factory account needs it.
    • Purpose: Browse only polls. Factory marks the account the software factory may use, and only inside its group.
    • Poll interval: 30 to 3600 seconds (default 120).
    • Squash commits by default: the merge default the factory uses.
  3. Press Create token in GitLab. It opens your instance's personal access token page with the name Clusto and the api scope filled in. Create the token, paste it into Personal access token and press Save.

The host checks the token with GitLab before saving it and shows the user it authenticates as. For a Factory account, use a dedicated bot user (or a group access token) that is a member of the factory's group only.

Factory accounts ​

A Factory account lets the software factory open merge requests in the account's group. Repositories are written group/.../project and must sit inside the account's Group; anything outside it is refused. The factory labels each merge request with its risk tier, reads head pipelines and failed job traces, retries failed jobs once before a fix attempt, and merges with the expected head commit. The factory runs from the same Factory account on the host node; the token never reaches the agent. See Software factory for the repository files and the item flow.

Standby nodes ​

A standby node keeps the account working while the host is down, for example a laptop that sleeps. Under Host node in the account form, check the nodes that should stand by. Pick nodes that stay on and that no agent can read: each one holds the token. The order you check them is the failover order.

  • Who polls. The first node of the host list (the host, then the standbys in order) that is online, as seen by the node you are connected to, polls GitLab and serves every request and action. When the host comes back it takes over again. If no node of the list is online, the account shows its last snapshot and is read only.
  • The token follows the list. A token you save once is copied over the encrypted, identity-pinned peer links to every node of the host list and to no other node. The newest save wins. Removing the token is replicated too, so an old copy cannot come back, and a node that was offline gets the current token when its link returns.
  • What you see. Each account row in Settings -> GitLab shows Polling on <node>. An amber line, <host> is offline, <standby> polls instead, shows a standby at work; a red one says no host node is online, or that the host is offline so the account is read only and you should add a standby node that stays on. With standbys, the row also shows Token kept on <nodes>.
  • The factory stays on the host. Work the software factory does for a Factory account still runs on its host node only, because its pipeline state lives in that node's database.

What the host polls ​

  • Projects: the group's projects and those of its subgroups, or the projects of a user namespace, read again every 10 minutes and whenever you save the account or press Refresh. Archived projects are listed as archived.
  • Open merge requests: one request for the whole group. For a user namespace or a member-projects account, the 30 most recently active projects are read one by one.
  • Pipelines: the newest pipeline of each merge request's head commit, up to 40 per poll. A finished pipeline is not read again until the head commit changes.

When GitLab rejects the token (401), polling backs off from 2 minutes up to 30 minutes until you save a new token. When GitLab rate-limits, the host waits as long as GitLab asks.

Token security ​

  • The token lives only in the config ([gitlab] section) of the nodes in the account's host list: the host node and its standby nodes. It is copied to no other node, never sent back to any app and never written to logs. Every node of the host list must be one your agents cannot read. The account list itself is shared across the cluster.
  • Only a host can change an account's host list. A change made on another node is forwarded to the account's host, which must be online to accept it.
  • The token is pinned to the GitLab URL it was checked against. If the account's URL changes, the host stops using the token and asks for it again, so a changed URL can never send the token to another server.
  • Moving the account to another host node hands the token over to the new host list. Removing the account or the token deletes it from every node of the list.
  • Setting or removing a token is recorded in the node's audit log, without the token.

Troubleshooting ​

  • No token: the host has no token for the account, or the account's URL changed since it was saved. Paste a token and save.
  • Read only, host offline: no node of the host list is online. Bring the host back, or add a standby node that stays on.
  • GitLab rejected the token: it expired, was revoked or lacks the api scope. Create a new one.
  • Could not read the GitLab group: the group path is wrong, or the token's user is not a member of it.

Clusto - remote AI coding agents over WebSocket.